diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-11-21 12:09:29 -0700 |
---|---|---|
committer | Jose Lausuch <jalausuch@suse.com> | 2017-11-21 21:46:48 +0000 |
commit | c36f96b80c00a23164a194c6c74d7281c9835e12 (patch) | |
tree | 3fd5762ab52552b85a5ea6be1e28684fdbb7c4a4 /functest/opnfv_tests/openstack/vping/vping_ssh.py | |
parent | 6fa563f54ff36c091f9f98b17b410e95879ec921 (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/vping_ssh.py')
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_ssh.py | 50 |
1 files changed, 24 insertions, 26 deletions
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)) |