Beispiel #1
0
 def get_id(self):
     from mist.io.helpers import b58_encode
     if self.provider != 'bare_metal':
         concat = '%s%s%s' % (self.provider, self.region, self.apikey)
     else:
         concat = '%s%s%s' % (self.provider, '', self.title)
     return b58_encode(int(sha1(concat).hexdigest(), 16))
Beispiel #2
0
 def get_id(self):
     from mist.io.helpers import b58_encode
     if self.provider != 'bare_metal':
         concat = '%s%s%s' % (self.provider, self.region, self.apikey)
     else:
         name = self.machines.values()[0].name
         concat = '%s%s%s' % (self.provider, '', name)
     return b58_encode(int(sha1(concat).hexdigest(), 16))
Beispiel #3
0
 def get_id(self):
     from mist.io.helpers import b58_encode
     if self.provider != 'bare_metal':
         concat = '%s%s%s' % (self.provider, self.region, self.apikey)
     else:
         name = self.machines.values()[0].name
         concat = '%s%s%s' % (self.provider, '', name)
     return b58_encode(int(sha1(concat).hexdigest(), 16))
Beispiel #4
0
 def get_id(self):
     from mist.io.helpers import b58_encode
     if self.provider == 'docker':
         concat = '%s%s%s' % (self.provider, self.title, self.apiurl)
     elif self.provider == 'bare_metal':
         name = self.machines.values()[0].name
         concat = '%s%s%s' % (self.provider, '', name)
     elif self.provider == 'openstack' or 'hpcloud' in self.provider:
         concat = "%s%s%s%s%s" % (self.provider, self.region, self.apikey, self.apiurl, self.tenant_name)
     else:
         concat = '%s%s%s' % (self.provider, self.region, self.apikey)
     return b58_encode(int(sha1(concat).hexdigest(), 16))
Beispiel #5
0
 def get_id(self):
     from mist.io.helpers import b58_encode
     if self.provider == 'docker':
         concat = '%s%s%s' % (self.provider, self.title, self.apiurl)
     elif self.provider == 'bare_metal':
         name = self.machines.values()[0].name
         concat = '%s%s%s' % (self.provider, '', name)
     elif self.provider == 'openstack' or 'hpcloud' in self.provider:
         concat = "%s%s%s%s%s" % (self.provider, self.region, self.apikey, self.apiurl, self.tenant_name)
     elif self.provider == 'libvirt':
         concat = "%s%s" % (self.provider, self.apiurl)
     elif self.provider in ['vcloud', 'indonesian_vcloud', 'vsphere']:
         concat = "%s%s%s%s" % (self.provider, self.apikey, self.apisecret, self.apiurl)
     else:
         concat = '%s%s%s' % (self.provider, self.region, self.apikey)
     return b58_encode(int(sha1(concat).hexdigest(), 16))