cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nvazquez <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Date Wed, 04 May 2016 19:02:28 GMT
Github user nvazquez commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1497#discussion_r62095734
  
    --- Diff: test/integration/smoke/test_list_ids_parameter.py ---
    @@ -0,0 +1,106 @@
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License.  You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied.  See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +""" Tests for API listing methods using 'ids' parameter
    +"""
    +#Import Local Modules
    +from marvin.cloudstackTestCase import cloudstackTestCase
    +from marvin.lib.utils import (cleanup_resources,
    +                              validateList)
    +from marvin.lib.base import (Account,
    +                             Volume,
    +                             DiskOffering)
    +from marvin.lib.common import (get_domain,
    +                                get_zone)
    +from marvin.codes import FAILED, PASS
    +from nose.plugins.attrib import attr
    +#Import System modules
    +import time
    +
    +_multiprocess_shared_ = True
    +class TestListIdsParams(cloudstackTestCase):
    +    
    +    @classmethod
    +    def setUpClass(cls):
    +        testClient = super(TestListIdsParams, cls).getClsTestClient()
    +        cls.apiclient = testClient.getApiClient()
    +        cls.services = testClient.getParsedTestDataConfig()
    +        cls.hypervisor = testClient.getHypervisorInfo()
    +
    +        cls.domain = get_domain(cls.apiclient)
    +        cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
    +
    +        cls.disk_offering = DiskOffering.create(
    +                                    cls.apiclient,
    +                                    cls.services["disk_offering"]
    +                                    )
    +
    +        cls.account = Account.create(
    +                            cls.apiclient,
    +                            cls.services["account"],
    +                            domainid=cls.domain.id
    +                            )
    +
    +        cls.volumes = []
    +        testVolumes = {0: {'diskname': 'TestDiskServ'}, 1: {'diskname': 'TestDiskServ2'},
2: {'diskname': 'TestDiskServ3'}}
    +
    +        for k, v in testVolumes.items():
    +            volume = Volume.create(
    +                                   cls.apiclient,
    +                                   v,
    +                                   zoneid=cls.zone.id,
    +                                   account=cls.account.name,
    +                                   domainid=cls.account.domainid,
    +                                   diskofferingid=cls.disk_offering.id
    +                                   )
    +            cls.debug("Created a volume with ID: %s" % volume.id)
    +            cls.volumes.append(volume)
    +
    +        cls._cleanup = [
    +                        cls.disk_offering,
    +                        cls.account
    +                        #,cls.volumes[0],
    --- End diff --
    
    I pushed this commented lines to ask about this, if I add them test fails but I don't
understand how they are deleted. After test finishes I see volumes are deleted


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message