Github user fmaximus commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1578#discussion_r77831210
  
    --- Diff: test/integration/plugins/nuagevsp/nuageTestCase.py ---
    @@ -175,45 +234,44 @@ def tearDown(self):
             return
     
         # create_VpcOffering - Creates VPC offering
    -    def create_VpcOffering(self, vpc_offering, suffix=None):
    -        self.debug("Creating VPC offering")
    +    @needscleanup
    +    def create_VpcOffering(cls, vpc_offering, suffix=None):
    +        cls.debug("Creating VPC offering")
             if suffix:
                 vpc_offering["name"] = "VPC_OFF-" + str(suffix)
    -        vpc_off = VpcOffering.create(self.api_client,
    +        vpc_off = VpcOffering.create(cls.api_client,
                                          vpc_offering
                                          )
             # Enable VPC offering
    -        vpc_off.update(self.api_client, state="Enabled")
    -        self.cleanup.append(vpc_off)
    -        self.debug("Created and Enabled VPC offering")
    +        vpc_off.update(cls.api_client, state="Enabled")
    +        cls.debug("Created and Enabled VPC offering")
             return vpc_off
     
         # create_Vpc - Creates VPC with the given VPC offering
    -    def create_Vpc(self, vpc_offering, cidr='10.1.0.0/16', testdata=None, 
account=None, networkDomain=None,
    -                   cleanup=True):
    +    @needscleanup
    +    def create_Vpc(cls, vpc_offering, cidr='10.1.0.0/16', testdata=None,
    +                   account=None, networkDomain=None):
             if not account:
    -            account = self.account
    -        self.debug("Creating a VPC in the account - %s" % account.name)
    +            account = cls.account
    +        cls.debug("Creating a VPC in the account - %s" % account.name)
             if not testdata:
    -            testdata = self.test_data["vpc"]
    +            testdata = cls.test_data["vpc"]
                 testdata["name"] = "TestVPC-" + cidr + "-" + 
str(vpc_offering.name)
                 testdata["displaytext"] = "Test VPC"
                 testdata["cidr"] = cidr
    -        vpc = VPC.create(self.api_client,
    +        vpc = VPC.create(cls.api_client,
                              testdata,
                              vpcofferingid=vpc_offering.id,
    -                         zoneid=self.zone.id,
    +                         zoneid=cls.zone.id,
                              account=account.name,
                              domainid=account.domainid,
                              networkDomain=networkDomain
                              )
    -        self.debug("Created VPC with ID - %s" % vpc.id)
    -        if cleanup:
    -            self.cleanup.append(vpc)
    +        cls.debug("Created VPC with ID - %s" % vpc.id)
             return vpc
     
         # restart_Vpc - Restarts the given VPC with/without cleanup
    -    def restart_Vpc(self, vpc, cleanup=None):
    +    def restart_Vpc(self, vpc, cleanup=False):
    --- End diff --
    
    It's just a parameter passed into the restartVPC command.
    I'm more concerned about the fact that we need to set makeredundant to 
false, 
    as the default seems to be true.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to