def test_create_container_vcpus_2(self, image_info=None): flavor = utils.get_test_flavor(options={ 'name': 'vcpu_2', 'flavorid': 'vcpu_2', 'vcpus': 2 }) instance_href = utils.get_test_instance(flavor=flavor) if image_info is None: image_info = utils.get_test_image_info(None, instance_href) image_info['disk_format'] = 'raw' image_info['container_format'] = 'docker' self.connection.spawn(self.context, instance_href, image_info, 'fake_files', 'fake_password') self._assert_cpu_shares(instance_href, vcpus=2) self.assertEqual(self.mock_client.name, "nova-{0}".format( instance_href['uuid']))
def test_create_container_vcpus_2(self, image_info=None): flavor = utils.get_test_flavor(options={ 'name': 'vcpu_2', 'flavorid': 'vcpu_2', 'vcpus': 2 }) instance_href = utils.get_test_instance(flavor=flavor) if image_info is None: image_info = utils.get_test_image_object(None, instance_href) image_info.disk_format = 'raw' image_info.container_format = 'docker' self.connection.spawn(self.context, instance_href, image_info, 'fake_files', 'fake_password') self._assert_cpu_shares(instance_href, vcpus=2) self.assertEqual(self.mock_client.name, "nova-{0}".format( instance_href['uuid']))
def test_migrate_disk_and_power_off(self): instance_ref, network_info = self._get_running_instance() flavor_ref = test_utils.get_test_flavor() self.connection.migrate_disk_and_power_off(self.ctxt, instance_ref, 'dest_host', flavor_ref, network_info)
def test_migrate_disk_and_power_off(self): instance_ref, network_info = self._get_running_instance() flavor_ref = test_utils.get_test_flavor() self.connection.migrate_disk_and_power_off( self.ctxt, instance_ref, 'dest_host', flavor_ref, network_info)