aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vping
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-11-21 12:09:29 -0700
committerJose Lausuch <jalausuch@suse.com>2017-11-21 21:46:48 +0000
commitc36f96b80c00a23164a194c6c74d7281c9835e12 (patch)
tree3fd5762ab52552b85a5ea6be1e28684fdbb7c4a4 /functest/opnfv_tests/openstack/vping
parent6fa563f54ff36c091f9f98b17b410e95879ec921 (diff)
Removal of deprecated SNAPS-OO classes.
JIRA: SNAPS-202 Change-Id: I115b4927b287a5525f4c1b95128d91f5229c7856 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/vping')
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_base.py17
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_ssh.py50
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_userdata.py12
3 files changed, 39 insertions, 40 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py
index e719145b..de431fe1 100644
--- a/functest/opnfv_tests/openstack/vping/vping_base.py
+++ b/functest/opnfv_tests/openstack/vping/vping_base.py
@@ -16,10 +16,11 @@ from functest.core import testcase
from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.utils.constants import CONST
+from snaps.config.flavor import FlavorConfig
+from snaps.config.network import NetworkConfig, SubnetConfig
+from snaps.config.router import RouterConfig
from snaps.openstack import create_flavor
-from snaps.openstack.create_flavor import FlavorSettings, OpenStackFlavor
-from snaps.openstack.create_network import NetworkSettings, SubnetSettings
-from snaps.openstack.create_router import RouterSettings
+from snaps.openstack.create_flavor import OpenStackFlavor
from snaps.openstack.tests import openstack_tests
from snaps.openstack.utils import deploy_utils
@@ -130,12 +131,12 @@ class VPingBase(testcase.TestCase):
"Creating network with name: '%s'" % private_net_name)
self.network_creator = deploy_utils.create_network(
self.os_creds,
- NetworkSettings(
+ NetworkConfig(
name=private_net_name,
network_type=vping_network_type,
physical_network=vping_physical_network,
segmentation_id=vping_segmentation_id,
- subnet_settings=[SubnetSettings(
+ subnet_settings=[SubnetConfig(
name=private_subnet_name,
cidr=private_subnet_cidr)]))
self.creators.append(self.network_creator)
@@ -146,7 +147,7 @@ class VPingBase(testcase.TestCase):
ext_net_name = snaps_utils.get_ext_net_name(self.os_creds)
self.router_creator = deploy_utils.create_router(
self.os_creds,
- RouterSettings(
+ RouterConfig(
name=self.router_name,
external_gateway=ext_net_name,
internal_subnets=[private_subnet_name]))
@@ -160,8 +161,8 @@ class VPingBase(testcase.TestCase):
flavor_metadata = create_flavor.MEM_PAGE_SIZE_LARGE
flavor_creator = OpenStackFlavor(
self.os_creds,
- FlavorSettings(name=self.flavor_name, ram=512, disk=1, vcpus=1,
- metadata=flavor_metadata))
+ FlavorConfig(name=self.flavor_name, ram=512, disk=1, vcpus=1,
+ metadata=flavor_metadata))
flavor_creator.create()
self.creators.append(flavor_creator)
diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py
index 1a04ad02..0d92a7e1 100644
--- a/functest/opnfv_tests/openstack/vping/vping_ssh.py
+++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py
@@ -22,13 +22,13 @@ from functest.core.testcase import TestCase
from functest.energy import energy
from functest.opnfv_tests.openstack.vping import vping_base
from functest.utils.constants import CONST
-from snaps.openstack.create_instance import FloatingIpSettings, \
- VmInstanceSettings
-from snaps.openstack.create_keypairs import KeypairSettings
-from snaps.openstack.create_network import PortSettings
-from snaps.openstack.create_security_group import Direction, Protocol, \
- SecurityGroupSettings, SecurityGroupRuleSettings
+from snaps.config.keypair import KeypairConfig
+from snaps.config.network import PortConfig
+from snaps.config.security_group import (
+ Direction, Protocol, SecurityGroupConfig, SecurityGroupRuleConfig)
+from snaps.config.vm_inst import FloatingIpConfig, VmInstanceConfig
+
from snaps.openstack.utils import deploy_utils
@@ -68,16 +68,16 @@ class VPingSSH(vping_base.VPingBase):
self.logger.info(log)
kp_creator = deploy_utils.create_keypair(
self.os_creds,
- KeypairSettings(name=self.kp_name,
- private_filepath=self.kp_priv_file,
- public_filepath=self.kp_pub_file))
+ KeypairConfig(
+ name=self.kp_name, private_filepath=self.kp_priv_file,
+ public_filepath=self.kp_pub_file))
self.creators.append(kp_creator)
# Creating Instance 1
- port1_settings = PortSettings(
+ port1_settings = PortConfig(
name=self.vm1_name + '-vPingPort',
network_name=self.network_creator.network_settings.name)
- instance1_settings = VmInstanceSettings(
+ instance1_settings = VmInstanceConfig(
name=self.vm1_name, flavor=self.flavor_name,
vm_boot_timeout=self.vm_boot_timeout,
vm_delete_timeout=self.vm_delete_timeout,
@@ -98,17 +98,17 @@ class VPingSSH(vping_base.VPingBase):
sg_creator = self.__create_security_group()
self.creators.append(sg_creator)
- port2_settings = PortSettings(
+ port2_settings = PortConfig(
name=self.vm2_name + '-vPingPort',
network_name=self.network_creator.network_settings.name)
- instance2_settings = VmInstanceSettings(
+ instance2_settings = VmInstanceConfig(
name=self.vm2_name, flavor=self.flavor_name,
vm_boot_timeout=self.vm_boot_timeout,
vm_delete_timeout=self.vm_delete_timeout,
ssh_connect_timeout=self.vm_ssh_connect_timeout,
port_settings=[port2_settings],
security_group_names=[sg_creator.sec_grp_settings.name],
- floating_ip_settings=[FloatingIpSettings(
+ floating_ip_settings=[FloatingIpConfig(
name=self.vm2_name + '-FIPName',
port_name=port2_settings.name,
router_name=self.router_creator.router_settings.name)])
@@ -218,24 +218,22 @@ class VPingSSH(vping_base.VPingBase):
"""
sg_rules = list()
sg_rules.append(
- SecurityGroupRuleSettings(sec_grp_name=self.sg_name,
- direction=Direction.ingress,
- protocol=Protocol.icmp))
+ SecurityGroupRuleConfig(
+ sec_grp_name=self.sg_name, direction=Direction.ingress,
+ protocol=Protocol.icmp))
sg_rules.append(
- SecurityGroupRuleSettings(sec_grp_name=self.sg_name,
- direction=Direction.ingress,
- protocol=Protocol.tcp, port_range_min=22,
- port_range_max=22))
+ SecurityGroupRuleConfig(
+ sec_grp_name=self.sg_name, direction=Direction.ingress,
+ protocol=Protocol.tcp, port_range_min=22, port_range_max=22))
sg_rules.append(
- SecurityGroupRuleSettings(sec_grp_name=self.sg_name,
- direction=Direction.egress,
- protocol=Protocol.tcp, port_range_min=22,
- port_range_max=22))
+ SecurityGroupRuleConfig(
+ sec_grp_name=self.sg_name, direction=Direction.egress,
+ protocol=Protocol.tcp, port_range_min=22, port_range_max=22))
log = "Security group with name: '%s'" % self.sg_name
self.logger.info(log)
return deploy_utils.create_security_group(self.os_creds,
- SecurityGroupSettings(
+ SecurityGroupConfig(
name=self.sg_name,
description=self.sg_desc,
rule_settings=sg_rules))
diff --git a/functest/opnfv_tests/openstack/vping/vping_userdata.py b/functest/opnfv_tests/openstack/vping/vping_userdata.py
index deaacfcc..4cc8f42f 100644
--- a/functest/opnfv_tests/openstack/vping/vping_userdata.py
+++ b/functest/opnfv_tests/openstack/vping/vping_userdata.py
@@ -9,9 +9,9 @@
import time
+from snaps.config.network import PortConfig
+from snaps.config.vm_inst import VmInstanceConfig
from snaps.openstack.utils import deploy_utils
-from snaps.openstack.create_instance import VmInstanceSettings
-from snaps.openstack.create_network import PortSettings
from functest.core.testcase import TestCase
from functest.opnfv_tests.openstack.vping import vping_base
@@ -37,10 +37,10 @@ class VPingUserdata(vping_base.VPingBase):
super(VPingUserdata, self).run()
# Creating Instance 1
- port1_settings = PortSettings(
+ port1_settings = PortConfig(
name=self.vm1_name + '-vPingPort',
network_name=self.network_creator.network_settings.name)
- instance1_settings = VmInstanceSettings(
+ instance1_settings = VmInstanceConfig(
name=self.vm1_name,
flavor=self.flavor_name,
vm_boot_timeout=self.vm_boot_timeout,
@@ -58,10 +58,10 @@ class VPingUserdata(vping_base.VPingBase):
self.vm1_creator.get_port_ip(port1_settings.name))
if userdata:
# Creating Instance 2
- port2_settings = PortSettings(
+ port2_settings = PortConfig(
name=self.vm2_name + '-vPingPort',
network_name=self.network_creator.network_settings.name)
- instance2_settings = VmInstanceSettings(
+ instance2_settings = VmInstanceConfig(
name=self.vm2_name,
flavor=self.flavor_name,
vm_boot_timeout=self.vm_boot_timeout,