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