Exemplo n.º 1
0
 def test_get_pool_does_not_create_new_pool_if_exists(self):
     pool_info = {'address': '127.0.0.1',
                  'username': '******',
                  'password': '******',
                  'host': self.console.host,
                  'console_type': self.console.driver.console_type,
                  'compute_host': 'sometesthostname'}
     new_pool = db.console_pool_create(self.context, pool_info)
     pool = self.console.get_pool_for_instance_host(self.context,
                                                    'sometesthostname')
     self.assertEqual(pool['id'], new_pool['id'])
Exemplo n.º 2
0
 def test_get_pool_does_not_create_new_pool_if_exists(self):
     pool_info = {'address': '127.0.0.1',
                  'username': '******',
                  'password': '******',
                  'host': self.console.host,
                  'console_type': self.console.driver.console_type,
                  'compute_host': 'sometesthostname'}
     new_pool = db.console_pool_create(self.context, pool_info)
     pool = self.console.get_pool_for_instance_host(self.context,
                                                    'sometesthostname')
     self.assertEqual(pool['id'], new_pool['id'])
Exemplo n.º 3
0
 def test_get_pool_does_not_create_new_pool_if_exists(self):
     pool_info = {
         "address": "127.0.0.1",
         "username": "******",
         "password": "******",
         "host": self.console.host,
         "console_type": self.console.driver.console_type,
         "compute_host": "sometesthostname",
     }
     new_pool = db.console_pool_create(self.context, pool_info)
     pool = self.console.get_pool_for_instance_host(self.context, "sometesthostname")
     self.assertEqual(pool["id"], new_pool["id"])