You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/05/04 10:29:06 UTC

[jira] [Commented] (CLOUDSTACK-8308) Add test cases for volume/VM snapshot test path

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-8308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526410#comment-14526410 ] 

ASF GitHub Bot commented on CLOUDSTACK-8308:
--------------------------------------------

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

    https://github.com/apache/cloudstack/pull/181#discussion_r29571592
  
    --- Diff: test/integration/testpaths/testpath_volume_cuncurrent_snapshots.py ---
    @@ -0,0 +1,849 @@
    +# 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.
    +""" Test cases for VM/Volume snapshot Test Path
    +    Snapshot Test cases related to handling concurrent snapshots at host level.
    +"""
    +
    +from nose.plugins.attrib import attr
    +from marvin.cloudstackTestCase import cloudstackTestCase, unittest
    +from marvin.lib.utils import (cleanup_resources, is_snapshot_on_nfs,
    +                              validateList)
    +from marvin.lib.base import (Account,
    +                             StoragePool,
    +                             Host,
    +                             ServiceOffering,
    +                             VirtualMachine,
    +                             Configurations,
    +                             Snapshot,
    +                             SnapshotPolicy,
    +                             )
    +from marvin.lib.common import (get_domain,
    +                               list_snapshot_policy,
    +                               get_zone,
    +                               get_template,
    +                               list_volumes,
    +                               list_snapshots,
    +                               list_virtual_machines,
    +                               createChecksum,
    +                               )
    +from marvin.sshClient import SshClient
    +import time
    +
    +from threading import Thread
    +from marvin.codes import PASS
    +
    +
    +def MigrateRootVolume(self,
    +                      vm,
    +                      destinationHost,
    +                      expectexception=False):
    +    """ Migrate given volume to type of storage pool mentioned in migrateto:
    +
    +        Inputs:
    +            1. vm:               VM to be migrated
    +                                 is to be migrated
    +            2. expectexception:  If exception is expected while migration
    +            3. destinationHost:  Destination host where the VM\
    +                                 should get migrated
    +    """
    +
    +    if expectexception:
    +        with self.assertRaises(Exception):
    +            VirtualMachine.migrate(
    +                vm,
    +                self.apiclient,
    +                hostid=destinationHost.id,
    +            )
    +    else:
    +        VirtualMachine.migrate(
    +            vm,
    +            self.apiclient,
    +            hostid=destinationHost.id,
    +        )
    +
    +        migrated_vm_response = list_virtual_machines(
    +            self.apiclient,
    +            id=vm.id
    +        )
    +
    +        self.assertEqual(
    +            isinstance(migrated_vm_response, list),
    +            True,
    +            "Check list virtual machines response for valid list"
    +        )
    +
    +        self.assertNotEqual(
    +            migrated_vm_response,
    +            None,
    +            "Check if virtual machine exists in ListVirtualMachines"
    +        )
    +
    +        migrated_vm = migrated_vm_response[0]
    +
    +        vm_list = VirtualMachine.list(
    +            self.apiclient,
    +            id=migrated_vm.id
    +        )
    +
    +        self.assertEqual(
    +            vm_list[0].hostid,
    +            destinationHost.id,
    +            "Check volume is on migrated pool"
    +        )
    +    return
    +
    +
    +def CreateSnapshot(self, root_volume, is_recurring):
    +    """Create Snapshot"""
    +    if is_recurring:
    +	self.testdata["recurring_snapshot"]["intervaltype"] = 'HOURLY'
    --- End diff --
    
    Check indentation


> Add test cases for volume/VM snapshot test path
> -----------------------------------------------
>
>                 Key: CLOUDSTACK-8308
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8308
>             Project: CloudStack
>          Issue Type: Test
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: Future
>            Reporter: Priti Sarap
>              Labels: automation
>             Fix For: Future
>
>
> Add test cases for volume/VM snapshot test path



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)