cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg38 <...@git.apache.org>
Subject [GitHub] cloudstack pull request #1813: CLOUDSTACK-9604: Root disk resize support for...
Date Fri, 10 Mar 2017 14:43:46 GMT
Github user serg38 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1813#discussion_r105409367
  
    --- Diff: test/integration/component/test_rootvolume_resize.py ---
    @@ -0,0 +1,1140 @@
    +# 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.
    +
    +""" P1 tests for testing resize of  root volume functionality
    +
    +    Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/
    +    Root+Resize+Support
    +
    +    Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-9829
    +"""
    +# Import Local Modules
    +from nose.plugins.attrib import attr
    +from marvin.cloudstackTestCase import cloudstackTestCase, unittest
    +from marvin.lib.base import (Account,
    +                             ServiceOffering,
    +                             VirtualMachine,
    +                             Resources,
    +                             Domain,
    +                             Volume,
    +                             Snapshot,
    +                             Template,
    +                             VmSnapshot,
    +                             Host,
    +                             Configurations,
    +                             StoragePool)
    +from marvin.lib.common import (get_domain,
    +                               get_zone,
    +                               get_template,
    +                               matchResourceCount,
    +                               list_snapshots,
    +                               list_hosts,
    +                               list_configurations,
    +                               list_storage_pools)
    +from marvin.lib.utils import (cleanup_resources,
    +                              validateList)
    +from marvin.codes import (PASS,
    +                          FAIL,
    +                          FAILED,
    +                          RESOURCE_PRIMARY_STORAGE,
    +                          INVALID_INPUT)
    +from marvin.lib.utils import checkVolumeSize
    +import time
    +from marvin.sshClient import SshClient
    +
    +
    +class TestResizeVolume(cloudstackTestCase):
    +    @classmethod
    +    def setUpClass(cls):
    +        cls.testClient = super(TestResizeVolume, cls).getClsTestClient()
    +        cls.api_client = cls.testClient.getApiClient()
    +        cls.hypervisor = (cls.testClient.getHypervisorInfo()).lower()
    +        cls.storageID = None
    +        # Fill services from the external config file
    +        cls.services = cls.testClient.getParsedTestDataConfig()
    +        # Get Zone, Domain and templates
    +        cls.domain = get_domain(cls.api_client)
    +        cls.zone = get_zone(
    +            cls.api_client,
    +            cls.testClient.getZoneForTests())
    +        cls.services["mode"] = cls.zone.networktype
    +        cls._cleanup = []
    +        cls.unsupportedStorageType = False
    +        cls.unsupportedHypervisorType = False
    +        cls.updateclone = False
    +        if cls.hypervisor not in ['xenserver',"kvm","vmware"]:
    +            cls.unsupportedHypervisorType=True
    +            return
    +        cls.template = get_template(
    +            cls.api_client,
    +            cls.zone.id
    +        )
    +        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
    +        cls.services["virtual_machine"]["template"] = cls.template.id
    +        cls.services["volume"]["zoneid"] = cls.zone.id
    +        try:
    +            cls.parent_domain = Domain.create(cls.api_client,
    +                                              services=cls.services[
    +                                                  "domain"],
    +                                              parentdomainid=cls.domain.id)
    +            cls.parentd_admin = Account.create(cls.api_client,
    +                                               cls.services["account"],
    +                                               admin=True,
    +                                               domainid=cls.parent_domain.id)
    +            cls._cleanup.append(cls.parentd_admin)
    +            cls._cleanup.append(cls.parent_domain)
    +            list_pool_resp = list_storage_pools(cls.api_client,
    +                                               account=cls.parentd_admin.name,domainid=cls.parent_domain.id)
    +            res = validateList(list_pool_resp)
    +            if res[2]== INVALID_INPUT:
    +                raise Exception("Failed to  list storage pool-no storagepools found ")
    +            #Identify the storage pool type  and set vmware fullclone to true if storage
is VMFS
    +            if cls.hypervisor == 'vmware':
    +                for strpool in list_pool_resp:
    +                    if strpool.type == "VMFS":
    --- End diff --
    
    The same is the case for NFS type of primary storage. Is there a reason you are excluding
NFS?


---
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