# Path: pulp_auto/pulp.py
# class Request(object):
#     pulp_path = pulp_path
#     '''a callable request compatible with Pulp.send''' 
#     def __init__(self, method, path='/', data={}, headers=cidict({'content-type': 'application/json'}),
#             params={}):
#         self.method = method
#         self.path = path
#         if 'content-type' in headers and headers['content-type'] == 'application/json':
#             self.data = json.dumps(data)
#         else:
#             self.data = data
#         self.headers = headers
#         self.params = params
# 
#     def __call__(self, url, auth):
#         return requests.Request(
#             self.method,
#             normalize_url(path_join(url, self.pulp_path, self.path)),
#             params=self.params,
#             auth=auth,
#             data=self.data,
#             headers=self.headers
#         ).prepare()
# 
#     def __repr__(self):
#         return self.__class__.__name__ + "(%r, %r, data=%r, headers=%r)" % (self.method, self.path, self.data, self.headers)


from unit import (AbstractUnit, RpmUnit, UnitFactory)
from pulp_auto.pulp import Request


class AbstractOrphan(AbstractUnit):
    """Orphans are Units just like the rest; only path differs. This is rather an abstract
    Orphan type"""
    path = '/content/orphans/'


# Path: pulp_auto/pulp.py
# class Request(object):
#     pulp_path = pulp_path
#     '''a callable request compatible with Pulp.send''' 
#     def __init__(self, method, path='/', data={}, headers=cidict({'content-type': 'application/json'}),
#             params={}):
#         self.method = method
#         self.path = path
#         if 'content-type' in headers and headers['content-type'] == 'application/json':
#             self.data = json.dumps(data)
#         else:
#             self.data = data
#         self.headers = headers
#         self.params = params
# 
#     def __call__(self, url, auth):
#         return requests.Request(
#             self.method,
#             normalize_url(path_join(url, self.pulp_path, self.path)),
#             params=self.params,
#             auth=auth,
#             data=self.data,
#             headers=self.headers
#         ).prepare()
# 
#     def __repr__(self):
#         return self.__class__.__name__ + "(%r, %r, data=%r, headers=%r)" % (self.method, self.path, self.data, self.headers)


# Path: pulp_auto/units/orphan.py
from unit import (AbstractUnit, RpmUnit, UnitFactory)
from pulp_auto.pulp import Request



class AbstractOrphan(AbstractUnit):
    """Orphans are Units just like the rest; only path differs. This is rather an abstract
    Orphan type"""
    path = '/content/orphans/'


    @classmethod