summaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/openstack
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-11-22 12:43:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-22 12:43:56 +0000
commit01a5192428eb99afcb94047e6faa54e1d57114d1 (patch)
treed6c0b1aa427a2162edc5ed10cf8d4d9b1b6100ef /functest/tests/unit/openstack
parent185dbcfb6ed774cc2f0478b05041d9e3a4e2f303 (diff)
parentc36f96b80c00a23164a194c6c74d7281c9835e12 (diff)
Merge "Removal of deprecated SNAPS-OO classes."
Diffstat (limited to 'functest/tests/unit/openstack')
-rw-r--r--functest/tests/unit/openstack/vping/test_vping.py40
1 files changed, 22 insertions, 18 deletions
diff --git a/functest/tests/unit/openstack/vping/test_vping.py b/functest/tests/unit/openstack/vping/test_vping.py
index a28c61ae..dbfb679f 100644
--- a/functest/tests/unit/openstack/vping/test_vping.py
+++ b/functest/tests/unit/openstack/vping/test_vping.py
@@ -10,15 +10,19 @@ import unittest
import mock
+from snaps.config.keypair import KeypairConfig
+from snaps.config.network import NetworkConfig, PortConfig, SubnetConfig
+from snaps.config.router import RouterConfig
+from snaps.config.security_group import SecurityGroupConfig
+from snaps.config.vm_inst import VmInstanceConfig
+
from snaps.openstack.create_image import OpenStackImage
-from snaps.openstack.create_instance import OpenStackVmInstance, \
- VmInstanceSettings
-from snaps.openstack.create_keypairs import OpenStackKeypair, KeypairSettings
-from snaps.openstack.create_network import OpenStackNetwork, NetworkSettings, \
- SubnetSettings, PortSettings
-from snaps.openstack.create_router import OpenStackRouter, RouterSettings
-from snaps.openstack.create_security_group import OpenStackSecurityGroup, \
- SecurityGroupSettings
+from snaps.openstack.create_instance import OpenStackVmInstance
+from snaps.openstack.create_keypairs import OpenStackKeypair
+from snaps.openstack.create_network import OpenStackNetwork
+from snaps.openstack.create_router import OpenStackRouter
+from snaps.openstack.create_security_group import OpenStackSecurityGroup
+
from snaps.openstack.os_credentials import OSCreds
from functest.core.testcase import TestCase
@@ -54,14 +58,14 @@ class VPingUserdataTesting(unittest.TestCase):
return_value=OpenStackImage(self.os_creds, None)), \
mock.patch('snaps.openstack.utils.deploy_utils.create_network',
return_value=OpenStackNetwork(
- self.os_creds, NetworkSettings(name='foo'))), \
+ self.os_creds, NetworkConfig(name='foo'))), \
mock.patch('snaps.openstack.utils.deploy_utils.'
'create_vm_instance',
return_value=OpenStackVmInstance(
self.os_creds,
- VmInstanceSettings(
+ VmInstanceConfig(
name='foo', flavor='bar',
- port_settings=[PortSettings(
+ port_settings=[PortConfig(
name='foo', network_name='bar')]),
None)), \
mock.patch('snaps.openstack.create_instance.'
@@ -120,32 +124,32 @@ class VPingSSHTesting(unittest.TestCase):
mock.patch('snaps.openstack.utils.deploy_utils.create_network',
return_value=OpenStackNetwork(
self.os_creds,
- NetworkSettings(
+ NetworkConfig(
name='foo',
subnet_settings=[
- SubnetSettings(
+ SubnetConfig(
name='bar',
cidr='10.0.0.1/24')]))), \
mock.patch('snaps.openstack.utils.deploy_utils.'
'create_vm_instance',
return_value=OpenStackVmInstance(
self.os_creds,
- VmInstanceSettings(
+ VmInstanceConfig(
name='foo', flavor='bar',
- port_settings=[PortSettings(
+ port_settings=[PortConfig(
name='foo', network_name='bar')]),
None)), \
mock.patch('snaps.openstack.utils.deploy_utils.create_keypair',
return_value=OpenStackKeypair(
- self.os_creds, KeypairSettings(name='foo'))), \
+ self.os_creds, KeypairConfig(name='foo'))), \
mock.patch('snaps.openstack.utils.deploy_utils.create_router',
return_value=OpenStackRouter(
- self.os_creds, RouterSettings(name='foo'))), \
+ self.os_creds, RouterConfig(name='foo'))), \
mock.patch('snaps.openstack.utils.deploy_utils.'
'create_security_group',
return_value=OpenStackSecurityGroup(
self.os_creds,
- SecurityGroupSettings(name='foo'))), \
+ SecurityGroupConfig(name='foo'))), \
mock.patch('snaps.openstack.create_instance.'
'OpenStackVmInstance.'
'get_vm_inst', return_value=os_vm_inst), \