Пример #1
0
 def setUp(self):
     super(TestCompute, self).setUp()
     self.flavor = pick_flavor(self.user_cloud.list_flavors())
     if self.flavor is None:
         self.assertFalse('no sensible flavor available')
     self.image = self.pick_image()
     self.server_name = self.getUniqueString()
Пример #2
0
 def setUp(self):
     super(TestCompute, self).setUp()
     self.flavor = pick_flavor(self.demo_cloud.list_flavors())
     if self.flavor is None:
         self.assertFalse('no sensible flavor available')
     self.image = pick_image(self.demo_cloud.list_images())
     if self.image is None:
         self.assertFalse('no sensible image available')
     self.server_name = self.getUniqueString()
Пример #3
0
 def setUp(self):
     super(TestCompute, self).setUp()
     self.cloud = openstack_cloud(cloud='devstack')
     self.nova = self.cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertFalse('no sensible flavor available')
     self.image = pick_image(self.nova.images.list())
     if self.image is None:
         self.assertFalse('no sensible image available')
Пример #4
0
 def setUp(self):
     super(TestCompute, self).setUp()
     self.cloud = openstack_cloud(cloud='devstack')
     self.nova = self.cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertFalse('no sensible flavor available')
     self.image = pick_image(self.nova.images.list())
     if self.image is None:
         self.assertFalse('no sensible image available')
Пример #5
0
 def setUp(self):
     super(TestCompute, self).setUp()
     self.cloud = openstack_cloud(cloud='devstack')
     self.flavor = pick_flavor(self.cloud.list_flavors())
     if self.flavor is None:
         self.assertFalse('no sensible flavor available')
     self.image = pick_image(self.cloud.list_images())
     if self.image is None:
         self.assertFalse('no sensible image available')
     self.server_name = self.getUniqueString()
Пример #6
0
    def setUp(self):
        # OS_TEST_TIMEOUT is 60 sec by default
        # but on a bad day, test_attach_detach_volume can take more time.
        self.TIMEOUT_SCALING_FACTOR = 1.5

        super(TestCompute, self).setUp()
        self.flavor = pick_flavor(self.user_cloud.list_flavors())
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = self.pick_image()
        self.server_name = self.getUniqueString()
Пример #7
0
 def setUp(self):
     super(TestCompute, self).setUp()
     # Shell should have OS-* envvars from openrc, typically loaded by job
     self.cloud = openstack_cloud()
     self.nova = self.cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertFalse('no sensible flavor available')
     self.image = pick_image(self.nova.images.list())
     if self.image is None:
         self.assertFalse('no sensible image available')
Пример #8
0
 def setUp(self):
     super(TestCompute, self).setUp()
     # Shell should have OS-* envvars from openrc, typically loaded by job
     self.cloud = openstack_cloud()
     self.nova = self.cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertFalse("no sensible flavor available")
     self.image = pick_image(self.nova.images.list())
     if self.image is None:
         self.assertFalse("no sensible image available")
Пример #9
0
    def setUp(self):
        # OS_TEST_TIMEOUT is 60 sec by default
        # but on a bad day, test_attach_detach_volume can take more time.
        self.TIMEOUT_SCALING_FACTOR = 1.5

        super(TestCompute, self).setUp()
        self.flavor = pick_flavor(
            self.user_cloud.list_flavors(get_extra=False))
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = self.pick_image()
        self.server_name = self.getUniqueString()
Пример #10
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        self.flavor = pick_flavor(
            self.user_cloud.list_flavors(get_extra=False))
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = self.pick_image()

        # Generate a random name for these tests
        self.new_item_name = self.getUniqueString()

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #11
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        self.flavor = pick_flavor(
            self.user_cloud.list_flavors(get_extra=False))
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = self.pick_image()

        # Generate a random name for these tests
        self.new_item_name = self.getUniqueString()

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #12
0
 def setUp(self):
     super(TestInventory, self).setUp()
     # This needs to use an admin account, otherwise a public IP
     # is not allocated from devstack.
     self.inventory = inventory.OpenStackInventory()
     self.server_name = 'test_inventory_server'
     self.nova = self.operator_cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertTrue(False, 'no sensible flavor available')
     self.image = self.pick_image()
     self.addCleanup(self._cleanup_servers)
     self.operator_cloud.create_server(
         name=self.server_name, image=self.image, flavor=self.flavor,
         wait=True, auto_ip=True)
Пример #13
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        self.cloud = openstack_cloud(cloud='devstack')
        self.nova = self.cloud.nova_client
        if self.cloud.has_service('network'):
            self.neutron = self.cloud.neutron_client
        self.flavor = pick_flavor(self.nova.flavors.list())
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = pick_image(self.nova.images.list())
        if self.image is None:
            self.assertFalse('no sensible image available')

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #14
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        self.nova = self.user_cloud.nova_client
        if self.user_cloud.has_service('network'):
            self.neutron = self.user_cloud.neutron_client
        self.flavor = pick_flavor(self.nova.flavors.list())
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = self.pick_image()

        # Generate a random name for these tests
        self.new_item_name = self.getUniqueString()

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #15
0
 def setUp(self):
     super(TestInventory, self).setUp()
     # This needs to use an admin account, otherwise a public IP
     # is not allocated from devstack.
     self.inventory = inventory.OpenStackInventory()
     self.server_name = self.getUniqueString('inventory')
     self.flavor = pick_flavor(
         self.user_cloud.list_flavors(get_extra=False))
     if self.flavor is None:
         self.assertTrue(False, 'no sensible flavor available')
     self.image = self.pick_image()
     self.addCleanup(self._cleanup_server)
     server = self.operator_cloud.create_server(
         name=self.server_name, image=self.image, flavor=self.flavor,
         wait=True, auto_ip=True)
     self.server_id = server['id']
Пример #16
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        # Shell should have OS-* envvars from openrc, typically loaded by job
        self.cloud = openstack_cloud()
        self.nova = self.cloud.nova_client
        if self.cloud.has_service('network'):
            self.neutron = self.cloud.neutron_client
        self.flavor = pick_flavor(self.nova.flavors.list())
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = pick_image(self.nova.images.list())
        if self.image is None:
            self.assertFalse('no sensible image available')

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #17
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        # Shell should have OS-* envvars from openrc, typically loaded by job
        self.cloud = openstack_cloud()
        self.nova = self.cloud.nova_client
        if self.cloud.has_service('network'):
            self.neutron = self.cloud.neutron_client
        self.flavor = pick_flavor(self.nova.flavors.list())
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = pick_image(self.nova.images.list())
        if self.image is None:
            self.assertFalse('no sensible image available')

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #18
0
 def setUp(self):
     super(TestInventory, self).setUp()
     # Shell should have OS-* envvars from openrc, typically loaded by job
     self.cloud = openstack_cloud()
     self.inventory = inventory.OpenStackInventory()
     self.server_name = 'test_inventory_server'
     self.nova = self.cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertTrue(False, 'no sensible flavor available')
     self.image = pick_image(self.nova.images.list())
     if self.image is None:
         self.assertTrue(False, 'no sensible image available')
     self.addCleanup(self._cleanup_servers)
     self.cloud.create_server(
         name=self.server_name, image=self.image, flavor=self.flavor,
         wait=True, auto_ip=True)
Пример #19
0
    def setUp(self):
        super(TestFloatingIP, self).setUp()
        self.nova = self.demo_cloud.nova_client
        if self.demo_cloud.has_service('network'):
            self.neutron = self.demo_cloud.neutron_client
        self.flavor = pick_flavor(self.nova.flavors.list())
        if self.flavor is None:
            self.assertFalse('no sensible flavor available')
        self.image = pick_image(self.nova.images.list())
        if self.image is None:
            self.assertFalse('no sensible image available')

        # Generate a random name for these tests
        self.new_item_name = self.getUniqueString()

        self.addCleanup(self._cleanup_network)
        self.addCleanup(self._cleanup_servers)
Пример #20
0
 def setUp(self):
     super(TestInventory, self).setUp()
     # This needs to use an admin account, otherwise a public IP
     # is not allocated from devstack.
     self.inventory = inventory.OpenStackInventory()
     self.server_name = 'test_inventory_server'
     self.nova = self.operator_cloud.nova_client
     self.flavor = pick_flavor(self.nova.flavors.list())
     if self.flavor is None:
         self.assertTrue(False, 'no sensible flavor available')
     self.image = pick_image(self.nova.images.list())
     if self.image is None:
         self.assertTrue(False, 'no sensible image available')
     self.addCleanup(self._cleanup_servers)
     self.operator_cloud.create_server(
         name=self.server_name, image=self.image, flavor=self.flavor,
         wait=True, auto_ip=True)
Пример #21
0
 def setUp(self):
     super(TestInventory, self).setUp()
     # This needs to use an admin account, otherwise a public IP
     # is not allocated from devstack.
     self.inventory = inventory.OpenStackInventory()
     self.server_name = self.getUniqueString('inventory')
     self.flavor = pick_flavor(
         self.user_cloud.list_flavors(get_extra=False))
     if self.flavor is None:
         self.assertTrue(False, 'no sensible flavor available')
     self.image = self.pick_image()
     self.addCleanup(self._cleanup_server)
     server = self.operator_cloud.create_server(name=self.server_name,
                                                image=self.image,
                                                flavor=self.flavor,
                                                wait=True,
                                                auto_ip=True)
     self.server_id = server['id']