[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gaurav Aradhye updated CLOUDSTACK-7998:
---------------------------------------
    Assignee: Ashutosk Kelkar  (was: Gaurav Aradhye)

> [Automation] Fix the script "test_escalations_instances.py" - Root Volume 
> should not be attempted to be detached
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7998
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7998
>             Project: CloudStack
>          Issue Type: Test
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Automation, Test
>    Affects Versions: 4.5.0
>            Reporter: Chandan Purushothama
>            Assignee: Ashutosk Kelkar
>            Priority: Critical
>             Fix For: 4.5.0
>
>
> *Error Message*
> Job failed: {jobprocstatus : 0, created : u'2014-12-01T17:59:17+0000', 
> jobresult : {errorcode : 431, errortext : u'Please specify volume of type 
> DATADISK'}, cmd : 
> u'org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd', userid : 
> u'9afd35fa-9da4-496c-a47c-e5980b43fe09', jobstatus : 2, jobid : 
> u'1e3322a3-6ae1-475c-b2b3-4656127edfa4', jobresultcode : 530, jobinstanceid : 
> u'1415198d-15d9-4063-bc2f-234c964237d9', jobresulttype : u'object', 
> jobinstancetype : u'Volume', accountid : 
> u'09e327b9-628b-4993-b850-124fa1a0554e'} 
> *Stacktrace*
>   File "/usr/lib/python2.7/unittest/case.py", line 332, in run
>     testMethod()
>   File 
> "/root/cloudstack/test/integration/component/test_escalations_instances.py", 
> line 2866, in test_16_list_vm_volumes_pagination
>     list_volumes_page1[i]
>   File "/usr/local/lib/python2.7/dist-packages/marvin/lib/base.py", line 665, 
> in detach_volume
>     return apiclient.detachVolume(cmd)
>   File 
> "/usr/local/lib/python2.7/dist-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
>  line 1686, in detachVolume
>     response = self.connection.marvinRequest(command, response_type=response, 
> method=method)
>   File 
> "/usr/local/lib/python2.7/dist-packages/marvin/cloudstackConnection.py", line 
> 379, in marvinRequest
>     raise e
> 'Job failed: {jobprocstatus : 0, created : u\'2014-12-01T17:59:17+0000\', 
> jobresult : {errorcode : 431, errortext : u\'Please specify volume of type 
> DATADISK\'}, cmd : 
> u\'org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd\', userid : 
> u\'9afd35fa-9da4-496c-a47c-e5980b43fe09\', jobstatus : 2, jobid : 
> u\'1e3322a3-6ae1-475c-b2b3-4656127edfa4\', jobresultcode : 530, jobinstanceid 
> : u\'1415198d-15d9-4063-bc2f-234c964237d9\', jobresulttype : u\'object\', 
> jobinstancetype : u\'Volume\', accountid : 
> u\'09e327b9-628b-4993-b850-124fa1a0554e\'}\n
> =============
> Test script Code:
> =============
> {code}
>     @attr(tags=["advanced", "basic"], required_hardware="false")
>     def test_16_list_vm_volumes_pagination(self):
>         """
> .
> .
> .
>         # Listing all the volumes for a VM again in page 1
>         list_volumes_page1 = Volume.list(
>             self.userapiclient,
>             listall=self.services["listall"],
>             virtualmachineid=vm_created.id,
>             page=1,
>             pagesize=self.services["pagesize"]
>         )
>         status = validateList(list_volumes_page1)
>         self.assertEquals(
>             PASS,
>             status[0],
>             "Volumes not listed in page1"
>         )
>         # Verifying that list size is equal to page size
>         self.assertEquals(
>             self.services["pagesize"],
>             len(list_volumes_page1),
>             "VM's volume count is not matching in page 1"
>         )
>         # stopping VM before detaching volumes
>         vm_created.stop(self.userapiclient)
>         # Detaching root volume is allowed on XenServer only
>         if self.hypervisor.lower() == 'xenserver':
>             # Detaching all the volumes attached from VM
>             for i in range(0, len(list_volumes_page1)):
>                 vm_created.detach_volume(
>                     self.userapiclient,
>                     list_volumes_page1[i]
>                 )
>         return
> {code}



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

Reply via email to