Exemple #1
0
    def __init__(self, response):
        self.raw = response
        self.name = response['name']
        self.version = response['version']
        self.description = response['description']
        self.preseeds = response['preseeds']

        AttrDict.__init__(self)
Exemple #2
0
    def __init__(self, response):
        self.raw = response
        self.name = response["name"]
        self.version = response["version"]
        self.description = response["description"]
        self.preseeds = response["preseeds"]

        AttrDict.__init__(self)
Exemple #3
0
 def __init__(self, z_pres, z_where, z_what, h, c, bl_c, bl_h, z_pres_p):
     """
     Note that z_where is for object to image transformation.
     I add z_pres_p only for loggin purpose.
     """
     AttrDict.__init__(self,
                       z_pres=z_pres,
                       z_where=z_where,
                       z_what=z_what,
                       h=h,
                       c=c,
                       bl_h=bl_h,
                       bl_c=bl_c,
                       z_pres_p=z_pres_p)
Exemple #4
0
    def __init__(self, response):
        self.raw = response
        self.address = response['address']
        self.backup_id = response['backup_id']
        self.server_id = response['server_id']
        self.turnkey_version = response['turnkey_version']
        self.skpp = self._key_has_passphrase(response['key'])

        self.created = self._parse_datetime(response['date_created'])
        self.updated = self._parse_datetime(response['date_updated'])

        self.size = int(response['size'])  # in MBs
        self.label = response['description']

        AttrDict.__init__(self)
Exemple #5
0
    def __init__(self, response):
        self.raw = response
        self.address = response['address']
        self.backup_id = response['backup_id']
        self.server_id = response['server_id']
        self.turnkey_version = response['turnkey_version']
        self.skpp = self._key_has_passphrase(response['key'])

        self.created = self._parse_datetime(response['date_created'])
        self.updated = self._parse_datetime(response['date_updated'])

        self.size = int(response['size']) # in MBs
        self.label = response['description']

        AttrDict.__init__(self)
Exemple #6
0
 def __init__(self, api, response):
     self.api = api
     self._parse_response(response)
     AttrDict.__init__(self)
Exemple #7
0
def __init__(self, *args, **kwargs):
    for key in self.columns:
        if key != 'id':
            super(AttrDict, self).__setitem__(key, None)
    AttrDict.__init__(self, *args, **kwargs)
	def __init__(self, name):

		zipped = zip(columns("Locations"), name_lookup(name))
		loc_dict = {k:v for k,v in zipped}
		
		AttrDict.__init__(self, loc_dict)