Skip to content

Commit

Permalink
PEP8 of integration/smoke/test_vpc_vpn
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Andersen committed Dec 22, 2015
1 parent 42885d9 commit 24cc83e
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions test/integration/smoke/test_vpc_vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ def __init__(self):
}



class TestVpcRemoteAccessVpn(cloudstackTestCase):

@classmethod
Expand All @@ -286,8 +285,10 @@ def setUpClass(cls):

cls.hypervisor = testClient.getHypervisorInfo()

cls.logger.debug("Downloading Template: %s from: %s" %(cls.services["template"][cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"]))
cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower()], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id)
cls.logger.debug("Downloading Template: %s from: %s" % (cls.services["template"][
cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"]))
cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower(
)], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id)
cls.template.download(cls.apiclient)

if cls.template == FAILED:
Expand Down Expand Up @@ -463,8 +464,10 @@ def setUpClass(cls):

cls.hypervisor = testClient.getHypervisorInfo()

cls.logger.debug("Downloading Template: %s from: %s" %(cls.services["template"][cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"]))
cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower()], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id)
cls.logger.debug("Downloading Template: %s from: %s" % (cls.services["template"][
cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"]))
cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower(
)], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id)
cls.template.download(cls.apiclient)

if cls.template == FAILED:
Expand Down Expand Up @@ -824,8 +827,10 @@ def setUpClass(cls):

cls.hypervisor = testClient.getHypervisorInfo()

cls.logger.debug("Downloading Template: %s from: %s" %(cls.services["template"][cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"]))
cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower()], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id)
cls.logger.debug("Downloading Template: %s from: %s" % (cls.services["template"][
cls.hypervisor.lower()], cls.services["template"][cls.hypervisor.lower()]["url"]))
cls.template = Template.register(cls.apiclient, cls.services["template"][cls.hypervisor.lower(
)], cls.zone.id, hypervisor=cls.hypervisor.lower(), account=cls.account.name, domainid=cls.domain.id)
cls.template.download(cls.apiclient)

if cls.template == FAILED:
Expand Down Expand Up @@ -876,7 +881,6 @@ def _create_vpc_offering(self, offering_name):

return vpc_off


def _get_ssh_client(self, virtual_machine, services, retries):
""" Setup ssh client connection and return connection
vm requires attributes public_ip, public_port, username, password """
Expand Down Expand Up @@ -923,7 +927,6 @@ def _create_natrule(self, vpc, vm, public_port, private_port, public_ip, network
vm.public_port = int(public_port)
return nat_rule


@attr(tags=["advanced"], required_hardware="true")
def test_01_redundant_vpc_site2site_vpn(self):
"""Test Site 2 Site VPN Across redundant VPCs"""
Expand All @@ -936,8 +939,10 @@ def test_01_redundant_vpc_site2site_vpn(self):
networkOffering) > 0, "No VPC based network offering")

# Create and enable redundant VPC offering
redundant_vpc_offering = self._create_vpc_offering('redundant_vpc_offering')
self.assert_(redundant_vpc_offering is not None, "Failed to create redundant VPC Offering")
redundant_vpc_offering = self._create_vpc_offering(
'redundant_vpc_offering')
self.assert_(redundant_vpc_offering is not None,
"Failed to create redundant VPC Offering")

redundant_vpc_offering.update(self.apiclient, state='Enabled')

Expand Down

0 comments on commit 24cc83e

Please sign in to comment.