[
https://issues.apache.org/jira/browse/CLOUDSTACK-5113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13866824#comment-13866824
]
Rayees Namathponnan commented on CLOUDSTACK-5113:
-------------------------------------------------
This issues still not fixed, please see the command list template returning
user registered template
test_deploy_vm (integration.smoke.test_vm_life_cycle.TestDeployVM): DEBUG:
Request:
http://10.223.49.195:8080/client/api?apiKey=DEIxHbzZkevNf9yd_7Bmv7DnI3kWNj9wTKcgVynoWOdoIsZ0ugN0gPSVH55rjsOszO8m0EpFxwVBFhGYkchzrw&templatefilter=featured&command=listTemplates&signature=B33wT%2FGiR9dgjRl3uumlVPsg9gI%3D&zoneid=0798ff6d-5117-48ff-ac7c-ba837f19bc04&response=json
Response: { "listtemplatesresponse" : { "count":2 ,"template" : [
{"id":"0bc527ff-38ba-43db-b362-a6dff56fc78b","name":"Public
template-RE984W","displaytext":"Public
Template","ispublic":true,"created":"2014-01-08T18:59:55-0800","isready":true,"passwordenabled":false,"format":"QCOW2","isfeatured":true,"crossZones":false,"ostypeid":"c1ddbe94-78d2-11e3-a447-1a6f7bb0d0a8","ostypename":"CentOS
5.5
(64-bit)","account":"test-TestTemplates-test_01_create_template-3TZUEH","zoneid":"0798ff6d-5117-48ff-ac7c-ba837f19bc04","zonename":"Adv-KVM-Zone1","status":"Download
Complete","size":8589934592,"templatetype":"USER","hypervisor":"KVM","domain":"ROOT","domainid":"c1b26406-78d2-11e3-a447-1a6f7bb0d0a8","isextractable":false,"sourcetemplateid":"c1b793cc-78d2-11e3-a447-1a6f7bb0d0a8","details":{"Message.ReservedCapacityFreed.Flag":"false"},"tags":[],"sshkeyenabled":false,"isdynamicallyscalable":false,"jobid":"acb70e8b-256d-47ce-8bc6-70bd7aa3ac8c","jobstatus":0},
{"id":"c1b793cc-78d2-11e3-a447-1a6f7bb0d0a8","name":"CentOS 5.5(64-bit) no GUI
(KVM)","displaytext":"CentOS 5.5(64-bit) no GUI
(KVM)","ispublic":true,"created":"2014-01-08T18:29:38-0800","isready":true,"passwordenabled":false,"format":"QCOW2","isfeatured":true,"crossZones":true,"ostypeid":"c1ddbe94-78d2-11e3-a447-1a6f7bb0d0a8","ostypename":"CentOS
5.5
(64-bit)","account":"system","zoneid":"0798ff6d-5117-48ff-ac7c-ba837f19bc04","zonename":"Adv-KVM-Zone1","status":"Download
Complete","size":8589934592,"templatetype":"BUILTIN","hypervisor":"KVM","domain":"ROOT","domainid":"c1b26406-78d2-11e3-a447-1a6f7bb0d0a8","isextractable":true,"checksum":"06e57d2beefc101867ad3ce74d4d100c","tags":[],"sshkeyenabled":false,"isdynamicallyscalable":false}
] } }
test_deploy_vm (integration.smoke.test_vm_life_cycle.TestDeployVM): DEBUG:
sending GET request: createAccount {'username':
'test-TestVMLifeCycle-test_deploy_vm-FDM0GT', 'domainid':
u'c1b26406-78d2-11e3-a447-1a6f7bb0d0a8', 'firstname': 'Test', 'lastname':
'User', 'accounttype': 0, 'password': 'password', 'email': '[email protected]'}
test_deploy_vm (integration.smoke.test_vm_life_cycle.TestDeployVM): DEBUG:
Computed Signature by Marvin: osRnI2x3BSYt0zX+FFCxawvAH3c=
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection
(1): 10.223.49.195
> [Automation] "get_template" function in command should return default
> templates
> --------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-5113
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5113
> Project: CloudStack
> Issue Type: Test
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: marvin
> Affects Versions: 4.2.1
> Environment: Automation
> Reporter: Rayees Namathponnan
> Assignee: Girish Shilamkar
> Fix For: 4.3.0
>
>
> I observed couple of vm deployment failures during automation runs; test
> cases trying to deploy with vm with template which already deleted by other
> account
> In below code in common.py we are getting template
> "apiclient.listTemplates(cmd)", eg :
> 1) testcase1 trying to deploy a new VM
> 2) Same time testcase 2 register a template (temp2)
> 3) apiclient.listTemplates(cmd) will returns template ID (temp2)
> 4) testcase1 deploy vm wilt template temp2, same time (testcase 2) may
> delete its account, then obviously temp2 also gets deleted
> 5) test case 1 deployment fails since temp2 no available
> Solution
> get_template() should return only default template; there is no property API
> to list only default template; so we should find with starting name of
> template ie "CentOS" and in test case we should not register template with
> name "CentOS 5.5"
> def get_template(apiclient, zoneid, ostype, services=None):
> "Returns a template"
> cmd = listOsTypes.listOsTypesCmd()
> cmd.description = ostype
> ostypes = apiclient.listOsTypes(cmd)
> if isinstance(ostypes, list):
> ostypeid = ostypes[0].id
> else:
> raise Exception(
> "Failed to find OS type with description: %s" % ostype)
> cmd = listTemplates.listTemplatesCmd()
> cmd.templatefilter = 'featured'
> cmd.zoneid = zoneid
> if services:
> if "template" in services:
> cmd.id = services["template"]
> list_templates = apiclient.listTemplates(cmd)
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)