diff options
Diffstat (limited to 'snaps/openstack/utils/tests')
-rw-r--r-- | snaps/openstack/utils/tests/heat_utils_tests.py | 2 | ||||
-rw-r--r-- | snaps/openstack/utils/tests/nova_utils_tests.py | 8 | ||||
-rw-r--r-- | snaps/openstack/utils/tests/settings_utils_tests.py | 15 |
3 files changed, 13 insertions, 12 deletions
diff --git a/snaps/openstack/utils/tests/heat_utils_tests.py b/snaps/openstack/utils/tests/heat_utils_tests.py index 2f1e7cc..298dc31 100644 --- a/snaps/openstack/utils/tests/heat_utils_tests.py +++ b/snaps/openstack/utils/tests/heat_utils_tests.py @@ -313,7 +313,7 @@ class HeatUtilsCreateComplexStackTests(OSComponentTestCase): servers = heat_utils.get_stack_servers( self.heat_client, nova, self.stack) for server in servers: - vm_settings = settings_utils.create_vm_inst_settings( + vm_settings = settings_utils.create_vm_inst_config( nova, neutron, server) img_settings = settings_utils.determine_image_config( glance, server, diff --git a/snaps/openstack/utils/tests/nova_utils_tests.py b/snaps/openstack/utils/tests/nova_utils_tests.py index 6d4bc3c..c4bc9cb 100644 --- a/snaps/openstack/utils/tests/nova_utils_tests.py +++ b/snaps/openstack/utils/tests/nova_utils_tests.py @@ -21,12 +21,12 @@ import os from snaps import file_utils from snaps.config.flavor import FlavorConfig from snaps.config.network import PortConfig +from snaps.config.vm_inst import VmInstanceConfig from snaps.config.volume import VolumeConfig from snaps.openstack import create_instance from snaps.openstack.create_flavor import OpenStackFlavor from snaps.openstack.create_image import OpenStackImage -from snaps.openstack.create_instance import ( - VmInstanceSettings, OpenStackVmInstance) +from snaps.openstack.create_instance import OpenStackVmInstance from snaps.openstack.create_network import OpenStackNetwork from snaps.openstack.create_volume import OpenStackVolume from snaps.openstack.tests import openstack_tests @@ -265,7 +265,7 @@ class NovaUtilsInstanceTests(OSComponentTestCase): self.port = neutron_utils.create_port( self.neutron, self.os_creds, port_settings) - self.instance_settings = VmInstanceSettings( + self.instance_settings = VmInstanceConfig( name=guid + '-vm_inst', flavor=self.flavor_creator.flavor_settings.name, port_settings=[port_settings]) @@ -385,7 +385,7 @@ class NovaUtilsInstanceVolumeTests(OSComponentTestCase): port_settings = PortConfig( name=guid + '-port', network_name=network_settings.name) - instance_settings = VmInstanceSettings( + instance_settings = VmInstanceConfig( name=guid + '-vm_inst', flavor=self.flavor_creator.flavor_settings.name, port_settings=[port_settings]) diff --git a/snaps/openstack/utils/tests/settings_utils_tests.py b/snaps/openstack/utils/tests/settings_utils_tests.py index b34e68b..d0390e2 100644 --- a/snaps/openstack/utils/tests/settings_utils_tests.py +++ b/snaps/openstack/utils/tests/settings_utils_tests.py @@ -22,6 +22,7 @@ from snaps.config.network import SubnetConfig, NetworkConfig, PortConfig from snaps.config.flavor import FlavorConfig from snaps.config.keypair import KeypairConfig from snaps.config.qos import Consumer +from snaps.config.vm_inst import VmInstanceConfig, FloatingIpConfig from snaps.domain.flavor import Flavor from snaps.domain.volume import ( Volume, VolumeType, VolumeTypeEncryption, QoSSpec) @@ -144,7 +145,7 @@ class SettingsUtilsNetworkingTests(OSComponentTestCase): class SettingsUtilsVmInstTests(OSComponentTestCase): """ - Tests the ability to reverse engineer VmInstanceSettings objects from + Tests the ability to reverse engineer VmInstanceConfig objects from existing VMs/servers deployed to OpenStack """ @@ -238,11 +239,11 @@ class SettingsUtilsVmInstTests(OSComponentTestCase): name=self.port_1_name, network_name=self.pub_net_config.network_settings.name)) - instance_settings = create_instance.VmInstanceSettings( + instance_settings = VmInstanceConfig( name=self.vm_inst_name, flavor=self.flavor_creator.flavor_settings.name, port_settings=ports_settings, - floating_ip_settings=[create_instance.FloatingIpSettings( + floating_ip_settings=[FloatingIpConfig( name=self.floating_ip_name, port_name=self.port_1_name, router_name=self.pub_net_config.router_settings.name)]) @@ -317,16 +318,16 @@ class SettingsUtilsVmInstTests(OSComponentTestCase): # super(self.__class__, self).__clean__() - def test_derive_vm_inst_settings(self): + def test_derive_vm_inst_config(self): """ - Validates the utility function settings_utils#create_vm_inst_settings - returns an acceptable VmInstanceSettings object + Validates the utility function settings_utils#create_vm_inst_config + returns an acceptable VmInstanceConfig object """ self.inst_creator.create(block=True) server = nova_utils.get_server( self.nova, vm_inst_settings=self.inst_creator.instance_settings) - derived_vm_settings = settings_utils.create_vm_inst_settings( + derived_vm_settings = settings_utils.create_vm_inst_config( self.nova, self.neutron, server) self.assertIsNotNone(derived_vm_settings) self.assertIsNotNone(derived_vm_settings.port_settings) |