Ejemplo n.º 1
0
 def detach(self, export):
     try:
         client = cinderclient.get_conn(self.conf,
                                        tenant_id=export.volume.account_id)
         client.detach(export.id)
         client.terminate_connection(export.id)
     except cinderclient.CinderError, e:
         log.error("While detaching %s - %s" % (export.id, e))
Ejemplo n.º 2
0
Archivo: detach.py Proyecto: audip/lunr
 def detach(self, export):
     try:
         client = cinderclient.get_conn(self.conf,
                                        tenant_id=export.volume.account_id)
         client.detach(export.id)
         client.terminate_connection(export.id)
     except cinderclient.CinderError, e:
         log.error("While detaching %s - %s" % (export.id, e))
Ejemplo n.º 3
0
 def test_get_conn_from_config(self):
     conf = LunrConfig({
         'cinder': {
             'username': '******',
             'password': '******',
             'auth_url': 'https://auth',
             'cinder_url': 'https:cinder',
             'rax_auth': 'true',
         }
     })
     client = cinderclient.get_conn(conf)
     self.assertEquals(client.username, 'johnny')
     self.assertEquals(client.password, 'admin')
Ejemplo n.º 4
0
 def test_get_conn_from_config(self):
     conf = LunrConfig({
         'cinder': {
             'username': '******',
             'password': '******',
             'auth_url': 'https://auth',
             'cinder_url': 'https:cinder',
             'rax_auth': 'true',
         }
     })
     client = cinderclient.get_conn(conf)
     self.assertEquals(client.username, 'johnny')
     self.assertEquals(client.password, 'admin')