Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 167EA174CC for ; Wed, 20 May 2015 11:20:00 +0000 (UTC) Received: (qmail 33809 invoked by uid 500); 20 May 2015 11:20:00 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 33775 invoked by uid 500); 20 May 2015 11:19:59 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 33765 invoked by uid 500); 20 May 2015 11:19:59 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 33761 invoked by uid 99); 20 May 2015 11:19:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 May 2015 11:19:59 +0000 Date: Wed, 20 May 2015 11:19:59 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-8487) Add VMware vMotion Tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-8487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14552146#comment-14552146 ] ASF GitHub Bot commented on CLOUDSTACK-8487: -------------------------------------------- Github user gauravaradhye commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/268#discussion_r30691290 --- Diff: tools/marvin/marvin/lib/base.py --- @@ -2520,6 +2520,35 @@ def reconnect(cls, apiclient, **kwargs): [setattr(cmd, k, v) for k, v in kwargs.items()] return(apiclient.reconnectHost(cmd)) + @classmethod + def getState(cls, apiclient, hostid, state, resourcestate, timeout=600): + """List Host and check if its resource state is as expected + @returnValue - List[Result, Reason] + 1) Result - FAIL if there is any exception + in the operation or Host state does not change + to expected state in given time else PASS + 2) Reason - Reason for failure""" + + returnValue = [FAIL, "VM state not trasited to %s,\ + operation timed out" % state] + + while timeout > 0: + try: + hosts = Host.list(apiclient, + id=hostid, listall=True) + validationresult = validateList(hosts) + if validationresult[0] == FAIL: + raise Exception("Host list validation failed: %s" % validationresult[2]) --- End diff -- Fix pep8 issues > Add VMware vMotion Tests > ------------------------ > > Key: CLOUDSTACK-8487 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8487 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Automation > Environment: Hypervisor :VMware > Storage type : VMFS, NFS > Storage scope : clusterwide, local, zonewide > VM : Linux and Windows > Reporter: Abhinav Roy > Assignee: Abhinav Roy > Fix For: 4.6.0 > > > Adding a new test script testpath_vMotion_vmware.py in the test/integration/testpath folder. > This script has vMotion related test cases for VMware. > Tests include : > ------------------------ > 1. Migrate VM with volume within/across the cluster both for vmfs and nfs datastores, windows and linux vms. > 2. Migrate VM with volume within/across cluster for local storage. > 3. Migrate across cwps and zwps. > 4. Migrate across nfs and vmfs. > 5. Negative scenarios > 6. Migration tests when host is put in maintenance. > 7. Migration tests when storage is put in maintenance. -- This message was sent by Atlassian JIRA (v6.3.4#6332)