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 29052C6A6 for ; Sat, 6 Dec 2014 00:02:13 +0000 (UTC) Received: (qmail 54674 invoked by uid 500); 6 Dec 2014 00:02:12 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 54642 invoked by uid 500); 6 Dec 2014 00:02:12 -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 54632 invoked by uid 500); 6 Dec 2014 00:02:12 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 54629 invoked by uid 99); 6 Dec 2014 00:02:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Dec 2014 00:02:12 +0000 Date: Sat, 6 Dec 2014 00:02:12 +0000 (UTC) From: "Animesh Chaturvedi (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CLOUDSTACK-8008) [Automation] Unable to list project tags using projectId parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-8008?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Animesh Chaturvedi updated CLOUDSTACK-8008: ------------------------------------------- Assignee: Prachi Damle > [Automation] Unable to list project tags using projectId parameter > ------------------------------------------------------------------ > > Key: CLOUDSTACK-8008 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-800= 8 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Automation > Affects Versions: 4.5.0 > Reporter: Chandan Purushothama > Assignee: Prachi Damle > Priority: Critical > Fix For: 4.5.0 > > > Unable to list tags using project id > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *Test Case Error Log:* > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > {noformat} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: ::::::::::::STAR= TED : TC: test_15_project_tag ::::::::::: > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Payload: {'apiKe= y': u's8-w4P-KNpZug22P4xScxPGflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY= 80PD7NDks-ZgxqOAQ', 'name': 'Project-V0LCNV', 'command': 'createProject', '= signature': 'm/TgWlNz5nCZhvQk2ijMmaDal18=3D', 'displaytext': 'Test project'= , 'response': 'json'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D=3D=3D= =3D=3D=3DSending GET Cmd : createProject=3D=3D=3D=3D=3D=3D=3D > requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connect= ion (1): 10.223.130.163 > requests.packages.urllib3.connectionpool: DEBUG: "GET /client/api?apiKey= =3Ds8-w4P-KNpZug22P4xScxPGflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80P= D7NDks-ZgxqOAQ&name=3DProject-V0LCNV&displaytext=3DTest+project&signature= =3Dm%2FTgWlNz5nCZhvQk2ijMmaDal18%3D&command=3DcreateProject&response=3Djson= HTTP/1.1" 200 122 > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D Jobid:= 560af5c6-7aab-4e22-8112-69827a6534c1 Started =3D=3D=3D > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Payload: {'signa= ture': 'pgHH+YwrPyJJkUaofltWoq/VsJc=3D', 'apiKey': u's8-w4P-KNpZug22P4xScxP= GflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80PD7NDks-ZgxqOAQ', 'command= ': 'queryAsyncJobResult', 'response': 'json', 'jobid': u'560af5c6-7aab-4e22= -8112-69827a6534c1'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D=3D=3D= =3D=3D=3DSending GET Cmd : queryAsyncJobResult=3D=3D=3D=3D=3D=3D=3D > requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connect= ion (1): 10.223.130.163 > requests.packages.urllib3.connectionpool: DEBUG: "GET /client/api?jobid= =3D560af5c6-7aab-4e22-8112-69827a6534c1&apiKey=3Ds8-w4P-KNpZug22P4xScxPGflY= EQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80PD7NDks-ZgxqOAQ&command=3Dquer= yAsyncJobResult&response=3Djson&signature=3DpgHH%2BYwrPyJJkUaofltWoq%2FVsJc= %3D HTTP/1.1" 200 1323 > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Response : {jobp= rocstatus : 0, created : u'2014-12-02T15:36:29-0800', jobresult : {primarys= torageavailable : u'200', domain : u'ROOT', domainid : u'226d5a1a-6e93-11e4= -b54b-0689ea0007ab', vpclimit : u'20', iplimit : u'20', memorytotal : 0, se= condarystorageavailable : u'400', vmtotal : 0, displaytext : u'Test project= ', vpctotal : 0, id : u'510ce7d4-6fa1-4fa4-ada9-7362b3774462', networkavail= able : u'20', networklimit : u'20', iptotal : 0, volumetotal : 0, snapshotl= imit : u'20', state : u'Active', networktotal : 0, vpcavailable : u'20', cp= uavailable : u'40', primarystoragetotal : 0, templatelimit : u'20', snapsho= ttotal : 0, templateavailable : u'20', vmlimit : u'20', tags : [], volumeli= mit : u'20', templatetotal : 0, memoryavailable : u'40960', secondarystorag= etotal : 0, account : u'test-TestResourceTags-WNDF0D', secondarystoragelimi= t : u'400', volumeavailable : u'20', name : u'Project-V0LCNV', vmavailable = : u'20', ipavailable : u'1', memorylimit : u'40960', primarystoragelimit : = u'200', cputotal : 0, cpulimit : u'40', snapshotavailable : u'20'}, cmd : u= 'org.apache.cloudstack.api.command.user.project.CreateProjectCmd', userid := u'173f139b-5379-4f5b-9aee-eefc77362fe7', jobstatus : 1, jobid : u'560af5c6= -7aab-4e22-8112-69827a6534c1', jobresultcode : 0, jobresulttype : u'object'= , jobinstancetype : u'None', accountid : u'96202eae-f933-41f9-ac94-e2ad37cb= dfe6'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3DJobid:5= 60af5c6-7aab-4e22-8112-69827a6534c1 ; StartTime:Tue Dec 2 15:36:46 2014 ; = EndTime:Tue Dec 2 15:36:46 2014 ; TotalTime:0=3D=3D=3D > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Response : {jobp= rocstatus : 0, created : u'2014-12-02T15:36:29-0800', jobresult : {primarys= torageavailable : u'200', domain : u'ROOT', domainid : u'226d5a1a-6e93-11e4= -b54b-0689ea0007ab', vpclimit : u'20', iplimit : u'20', memorytotal : 0, se= condarystorageavailable : u'400', vmtotal : 0, displaytext : u'Test project= ', vpctotal : 0, id : u'510ce7d4-6fa1-4fa4-ada9-7362b3774462', networkavail= able : u'20', networklimit : u'20', iptotal : 0, volumetotal : 0, snapshotl= imit : u'20', state : u'Active', networktotal : 0, vpcavailable : u'20', cp= uavailable : u'40', primarystoragetotal : 0, templatelimit : u'20', snapsho= ttotal : 0, templateavailable : u'20', vmlimit : u'20', tags : [], volumeli= mit : u'20', templatetotal : 0, memoryavailable : u'40960', secondarystorag= etotal : 0, account : u'test-TestResourceTags-WNDF0D', secondarystoragelimi= t : u'400', volumeavailable : u'20', name : u'Project-V0LCNV', vmavailable = : u'20', ipavailable : u'1', memorylimit : u'40960', primarystoragelimit : = u'200', cputotal : 0, cpulimit : u'40', snapshotavailable : u'20'}, cmd : u= 'org.apache.cloudstack.api.command.user.project.CreateProjectCmd', userid := u'173f139b-5379-4f5b-9aee-eefc77362fe7', jobstatus : 1, jobid : u'560af5c6= -7aab-4e22-8112-69827a6534c1', jobresultcode : 0, jobresulttype : u'object'= , jobinstancetype : u'None', accountid : u'96202eae-f933-41f9-ac94-e2ad37cb= dfe6'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Created project = with domain admin with ID: 510ce7d4-6fa1-4fa4-ada9-7362b3774462 > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Creating a tag f= or the project > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Payload: {'apiKe= y': u's8-w4P-KNpZug22P4xScxPGflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY= 80PD7NDks-ZgxqOAQ', 'resourcetype': 'project', 'resourceIds': u'510ce7d4-6f= a1-4fa4-ada9-7362b3774462', 'command': 'createTags', 'signature': 'OgXuOQNd= nGVg0rKBV4mLXEq5PX0=3D', 'tags[0].key': 'region', 'response': 'json', 'tags= [0].value': 'India'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D=3D=3D= =3D=3D=3DSending GET Cmd : createTags=3D=3D=3D=3D=3D=3D=3D > requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connect= ion (1): 10.223.130.163 > requests.packages.urllib3.connectionpool: DEBUG: "GET /client/api?apiKey= =3Ds8-w4P-KNpZug22P4xScxPGflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80P= D7NDks-ZgxqOAQ&resourcetype=3Dproject&resourceIds=3D510ce7d4-6fa1-4fa4-ada9= -7362b3774462&command=3DcreateTags&signature=3DOgXuOQNdnGVg0rKBV4mLXEq5PX0%= 3D&tags%5B0%5D.key=3Dregion&response=3Djson&tags%5B0%5D.value=3DIndia HTTP/= 1.1" 200 75 > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D Jobid:= 72423346-06d8-4d70-a536-aab48d9364f1 Started =3D=3D=3D > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Payload: {'signa= ture': 'diYkRVBtAUIwilewp4hi9w/Wem0=3D', 'apiKey': u's8-w4P-KNpZug22P4xScxP= GflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80PD7NDks-ZgxqOAQ', 'command= ': 'queryAsyncJobResult', 'response': 'json', 'jobid': u'72423346-06d8-4d70= -a536-aab48d9364f1'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D=3D=3D= =3D=3D=3DSending GET Cmd : queryAsyncJobResult=3D=3D=3D=3D=3D=3D=3D > requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connect= ion (1): 10.223.130.163 > requests.packages.urllib3.connectionpool: DEBUG: "GET /client/api?jobid= =3D72423346-06d8-4d70-a536-aab48d9364f1&apiKey=3Ds8-w4P-KNpZug22P4xScxPGflY= EQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80PD7NDks-ZgxqOAQ&command=3Dquer= yAsyncJobResult&response=3Djson&signature=3DdiYkRVBtAUIwilewp4hi9w%2FWem0%3= D HTTP/1.1" 200 389 > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Response : {jobp= rocstatus : 0, created : u'2014-12-02T15:36:30-0800', cmd : u'org.apache.cl= oudstack.api.command.user.tag.CreateTagsCmd', userid : u'173f139b-5379-4f5b= -9aee-eefc77362fe7', jobstatus : 1, jobid : u'72423346-06d8-4d70-a536-aab48= d9364f1', jobresultcode : 0, jobresulttype : u'object', jobresult : {succes= s : True}, accountid : u'96202eae-f933-41f9-ac94-e2ad37cbdfe6'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3DJobid:7= 2423346-06d8-4d70-a536-aab48d9364f1 ; StartTime:Tue Dec 2 15:36:47 2014 ; = EndTime:Tue Dec 2 15:36:47 2014 ; TotalTime:0=3D=3D=3D > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Response : {jobp= rocstatus : 0, created : u'2014-12-02T15:36:30-0800', cmd : u'org.apache.cl= oudstack.api.command.user.tag.CreateTagsCmd', userid : u'173f139b-5379-4f5b= -9aee-eefc77362fe7', jobstatus : 1, jobid : u'72423346-06d8-4d70-a536-aab48= d9364f1', jobresultcode : 0, jobresulttype : u'object', jobresult : {succes= s : True}, accountid : u'96202eae-f933-41f9-ac94-e2ad37cbdfe6'} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Tag created: {'s= uccess': True} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Payload: {'apiKe= y': u's8-w4P-KNpZug22P4xScxPGflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY= 80PD7NDks-ZgxqOAQ', 'projectid': u'510ce7d4-6fa1-4fa4-ada9-7362b3774462', '= command': 'listTags', 'signature': 'DBH68ZyJNXtHxhFrKVZ+OXSAwPo=3D', 'respo= nse': 'json', 'listall': True} > test_15_project_tag (test_tags.TestResourceTags): DEBUG: =3D=3D=3D=3D=3D= =3D=3D=3DSending GET Cmd : listTags=3D=3D=3D=3D=3D=3D=3D > requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connect= ion (1): 10.223.130.163 > requests.packages.urllib3.connectionpool: DEBUG: "GET /client/api?apiKey= =3Ds8-w4P-KNpZug22P4xScxPGflYEQ77OQEJfIDF6uIkZGXiXp8hKCc1AGMqpMgyWihHuDY80P= D7NDks-ZgxqOAQ&projectid=3D510ce7d4-6fa1-4fa4-ada9-7362b3774462&command=3Dl= istTags&signature=3DDBH68ZyJNXtHxhFrKVZ%2BOXSAwPo%3D&response=3Djson&listal= l=3DTrue HTTP/1.1" 200 28 > test_15_project_tag (test_tags.TestResourceTags): DEBUG: Response : None > test_15_project_tag (test_tags.TestResourceTags): DEBUG: tags =3D None > test_15_project_tag (test_tags.TestResourceTags): CRITICAL: FAILED: test_= 15_project_tag: ['Traceback (most recent call last):\n', ' File "/usr/lib/= python2.7/unittest/case.py", line 329, in run\n testMethod()\n', ' File= "/home/Chandan/test_tags.py", line 1720, in test_15_project_tag\n "List= tags should not return empty response"\n', ' File "/usr/lib/python2.7/uni= ttest/case.py", line 513, in assertEqual\n assertion_func(first, second,= msg=3Dmsg)\n', ' File "/usr/lib/python2.7/unittest/case.py", line 506, in= _baseAssertEqual\n raise self.failureException(msg)\n', 'AssertionError= : List tags should not return empty response\n'] > --------------------- >> end captured logging << --------------------- > ---------------------------------------------------------------------- > Ran 1 test in 269.646s > FAILED (failures=3D1) > {noformat} > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > *Test Client Code:* > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > {code} > @attr(tags=3D["advanced"], required_hardware=3D"false") > def test_15_project_tag(self): > """ Test creation, listing and deletion tags on projects > """ > # Validate the following > # 1. Create a new project=20 > # 2. Create a tag on projects using createTags API > # 3. Delete the tag. > # Create project as a domain admin > project =3D Project.create( > self.user_api_client, > self.services["project"] > ) > # Cleanup created project at end of test > self.cleanup.append(project) > self.debug("Created project with domain admin with ID: %s" % > project.i= d) > self.debug("Creating a tag for the project") > tag =3D Tag.create( > self.user_api_client, > resourceIds=3Dproject.id, > resourceType=3D'project', > tags=3D{'region': 'India'} > ) > self.debug("Tag created: %s" % tag.__dict__) > tags =3D Tag.list( > self.user_api_client, > listall=3DTrue, > projectid=3Dproject.id > ) > self.debug("tags =3D %s" % tags) > =20 > self.assertEqual( > isinstance(tags, list), > True, > "List tags should not return empty response" > ) > self.assertEqual( > tags[0].value, > 'India', > 'The tag should have original value' > ) > =20 > projects =3D Project.list( > self.user_api_client, > listall=3DTrue, > key=3D'region', > value=3D'India' > ) > self.assertEqual( > isinstance(projects, list), > True, > "List Project should return valid list" > ) > self.debug("Deleting the created tag..") > try: > tag.delete( > self.user_api_client, > resourceIds=3Dproject.id, > resourceType=3D'project', > tags=3D{'region': 'India'} > ) > except Exception as e: > self.fail("Failed to delete the tag - %s" % e) > self.debug("Verifying if tag is actually deleted!") > tags =3D Tag.list( > self.user_api_client, > listall=3DTrue, > resourceType=3D'project', > account=3Dself.account.name, > domainid=3Dself.account.domainid, > key=3D'region', > value=3D'India' > ) > self.assertEqual( > tags, > None, > "List tags should return empty response" > ) > return > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)