[jira] [Commented] (CLOUDSTACK-7127) Fix test_regions.py script - addregion failed, Region with id: 1 already exists

2014-07-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076245#comment-14076245
 ] 

ASF subversion and git services commented on CLOUDSTACK-7127:
-

Commit d5220a88a085385ebc4b783a40f27d128ea7d28f in cloudstack's branch 
refs/heads/4.4 from [~gauravaradhye]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=d5220a8 ]

CLOUDSTACK-7127: Fix for addRegion failure, avoiding regionid 1 while creating 
new region through test case

(cherry picked from commit ca59f01602823a6d6fe84233f3a3d3ea499efa06)


> Fix test_regions.py script -  addregion failed, Region with id: 1 already 
> exists
> 
>
> Key: CLOUDSTACK-7127
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7127
> Project: CloudStack
>  Issue Type: Test
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Affects Versions: 4.5.0
>Reporter: Chandan Purushothama
>Assignee: Gaurav Aradhye
>Priority: Critical
> Fix For: 4.5.0
>
>
> ===
> Code Snippet from test_regions.py:
> ===
>def setUp(self):
> pseudo_random_int = choice(xrange(1, 200)) <-- BUG: Region with ID=1 
> already exists on the CloudStack Setup. In case if 1 is chosen the testsuite 
> fails to execute.
> self.services["region"]["regionid"] = pseudo_random_int
> self.services["region"]["regionname"] = "region" + 
> str(pseudo_random_int)
> self.services["region"]["regionendpoint"] = "http://region"; + 
> str(pseudo_random_int) + ":8080/client"
> self.region = Region.create(self.api_client,
> self.services["region"]
> )
> Secondly, setup method code should be placed in try and catch blocks
> =
> Test Error:
> =
> Error Message:
> Execute cmd: addregion failed, due to: errorCode: 431, errorText:Region with 
> id: 1 already exists
>  >> begin captured stdout << -
> === TestName: test_createRegionWithExistingRegionName | Status : EXCEPTION ===
> - >> end captured stdout << --
>  >> begin captured logging << 
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: STARTED 
> : TC: test_createRegionWithExistingRegionName :::
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: Payload: 
> {'endpoint': 'http://region1:8080/client', 'name': 'region1', 'id': 1, 
> 'apiKey': 
> u'Ra1mlXzCZU0K1l4MKDWdRbQDU67PCQuRnKYv3hyc-Q8hSvCSFjB32UtifLbS6oYpMeKaf0BCuUidMw0LqZeCMA',
>  'command': 'addRegion', 'signature': 'jZQivyHVubuotqAzSjRPxUJmAn4=', 
> 'response': 'json'}
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: Sending GET 
> Cmd : addRegion===
> requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection 
> (1): 10.220.135.73
> requests.packages.urllib3.connectionpool: DEBUG: "GET 
> /client/api?endpoint=http%3A%2F%2Fregion1%3A8080%2Fclient&name=region1&id=1&apiKey=Ra1mlXzCZU0K1l4MKDWdRbQDU67PCQuRnKYv3hyc-Q8hSvCSFjB32UtifLbS6oYpMeKaf0BCuUidMw0LqZeCMA&command=addRegion&signature=jZQivyHVubuotqAzSjRPxUJmAn4%3D&response=json
>  HTTP/1.1" 431 123
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): ERROR: 
> Exception:['Traceback (most recent call last):\n', '  File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>  line 308, in __parseAndGetResponse\nresponse_cls)\n', '  File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/jsonHelper.py",
>  line 150, in getResultObj\nraise 
> cloudstackException.CloudstackAPIException(respname, errMsg)\n', 
> 'CloudstackAPIException: Execute cmd: addregion failed, due to: errorCode: 
> 431, errorText:Region with id: 1 already exists\n']
> Traceback (most recent call last):
>   File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>  line 308, in __parseAndGetResponse
> response_cls)
>   File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/jsonHelper.py",
>  line 150, in getResultObj
> raise cloudstackException.CloudstackAPIException(respname, errMsg)
> CloudstackAPIException: Execute cmd: addregion failed, due to: errorCode: 
> 431, errorText:Region with id: 1 already exists
> test_createRegionWithExistingRe

[jira] [Commented] (CLOUDSTACK-7127) Fix test_regions.py script - addregion failed, Region with id: 1 already exists

2014-07-24 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14073258#comment-14073258
 ] 

ASF subversion and git services commented on CLOUDSTACK-7127:
-

Commit ca59f01602823a6d6fe84233f3a3d3ea499efa06 in cloudstack's branch 
refs/heads/4.4-forward from [~gauravaradhye]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=ca59f01 ]

CLOUDSTACK-7127: Fix for addRegion failure, avoiding regionid 1 while creating 
new region through test case


> Fix test_regions.py script -  addregion failed, Region with id: 1 already 
> exists
> 
>
> Key: CLOUDSTACK-7127
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7127
> Project: CloudStack
>  Issue Type: Test
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Affects Versions: 4.5.0
>Reporter: Chandan Purushothama
>Assignee: Gaurav Aradhye
>Priority: Critical
> Fix For: 4.5.0
>
>
> ===
> Code Snippet from test_regions.py:
> ===
>def setUp(self):
> pseudo_random_int = choice(xrange(1, 200)) <-- BUG: Region with ID=1 
> already exists on the CloudStack Setup. In case if 1 is chosen the testsuite 
> fails to execute.
> self.services["region"]["regionid"] = pseudo_random_int
> self.services["region"]["regionname"] = "region" + 
> str(pseudo_random_int)
> self.services["region"]["regionendpoint"] = "http://region"; + 
> str(pseudo_random_int) + ":8080/client"
> self.region = Region.create(self.api_client,
> self.services["region"]
> )
> Secondly, setup method code should be placed in try and catch blocks
> =
> Test Error:
> =
> Error Message:
> Execute cmd: addregion failed, due to: errorCode: 431, errorText:Region with 
> id: 1 already exists
>  >> begin captured stdout << -
> === TestName: test_createRegionWithExistingRegionName | Status : EXCEPTION ===
> - >> end captured stdout << --
>  >> begin captured logging << 
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: STARTED 
> : TC: test_createRegionWithExistingRegionName :::
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: Payload: 
> {'endpoint': 'http://region1:8080/client', 'name': 'region1', 'id': 1, 
> 'apiKey': 
> u'Ra1mlXzCZU0K1l4MKDWdRbQDU67PCQuRnKYv3hyc-Q8hSvCSFjB32UtifLbS6oYpMeKaf0BCuUidMw0LqZeCMA',
>  'command': 'addRegion', 'signature': 'jZQivyHVubuotqAzSjRPxUJmAn4=', 
> 'response': 'json'}
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: Sending GET 
> Cmd : addRegion===
> requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection 
> (1): 10.220.135.73
> requests.packages.urllib3.connectionpool: DEBUG: "GET 
> /client/api?endpoint=http%3A%2F%2Fregion1%3A8080%2Fclient&name=region1&id=1&apiKey=Ra1mlXzCZU0K1l4MKDWdRbQDU67PCQuRnKYv3hyc-Q8hSvCSFjB32UtifLbS6oYpMeKaf0BCuUidMw0LqZeCMA&command=addRegion&signature=jZQivyHVubuotqAzSjRPxUJmAn4%3D&response=json
>  HTTP/1.1" 431 123
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): ERROR: 
> Exception:['Traceback (most recent call last):\n', '  File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>  line 308, in __parseAndGetResponse\nresponse_cls)\n', '  File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/jsonHelper.py",
>  line 150, in getResultObj\nraise 
> cloudstackException.CloudstackAPIException(respname, errMsg)\n', 
> 'CloudstackAPIException: Execute cmd: addregion failed, due to: errorCode: 
> 431, errorText:Region with id: 1 already exists\n']
> Traceback (most recent call last):
>   File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>  line 308, in __parseAndGetResponse
> response_cls)
>   File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/jsonHelper.py",
>  line 150, in getResultObj
> raise cloudstackException.CloudstackAPIException(respname, errMsg)
> CloudstackAPIException: Execute cmd: addregion failed, due to: errorCode: 
> 431, errorText:Region with id: 1 already exists
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): 

[jira] [Commented] (CLOUDSTACK-7127) Fix test_regions.py script - addregion failed, Region with id: 1 already exists

2014-07-24 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-7127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14073257#comment-14073257
 ] 

ASF subversion and git services commented on CLOUDSTACK-7127:
-

Commit 59c77fbaa4c07e2de9578369e69f47d0e71039b8 in cloudstack's branch 
refs/heads/master from [~gauravaradhye]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=59c77fb ]

CLOUDSTACK-7127: Fix for addRegion failure, avoiding regionid 1 while creating 
new region through test case


> Fix test_regions.py script -  addregion failed, Region with id: 1 already 
> exists
> 
>
> Key: CLOUDSTACK-7127
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7127
> Project: CloudStack
>  Issue Type: Test
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Affects Versions: 4.5.0
>Reporter: Chandan Purushothama
>Assignee: Gaurav Aradhye
>Priority: Critical
> Fix For: 4.5.0
>
>
> ===
> Code Snippet from test_regions.py:
> ===
>def setUp(self):
> pseudo_random_int = choice(xrange(1, 200)) <-- BUG: Region with ID=1 
> already exists on the CloudStack Setup. In case if 1 is chosen the testsuite 
> fails to execute.
> self.services["region"]["regionid"] = pseudo_random_int
> self.services["region"]["regionname"] = "region" + 
> str(pseudo_random_int)
> self.services["region"]["regionendpoint"] = "http://region"; + 
> str(pseudo_random_int) + ":8080/client"
> self.region = Region.create(self.api_client,
> self.services["region"]
> )
> Secondly, setup method code should be placed in try and catch blocks
> =
> Test Error:
> =
> Error Message:
> Execute cmd: addregion failed, due to: errorCode: 431, errorText:Region with 
> id: 1 already exists
>  >> begin captured stdout << -
> === TestName: test_createRegionWithExistingRegionName | Status : EXCEPTION ===
> - >> end captured stdout << --
>  >> begin captured logging << 
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: STARTED 
> : TC: test_createRegionWithExistingRegionName :::
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: Payload: 
> {'endpoint': 'http://region1:8080/client', 'name': 'region1', 'id': 1, 
> 'apiKey': 
> u'Ra1mlXzCZU0K1l4MKDWdRbQDU67PCQuRnKYv3hyc-Q8hSvCSFjB32UtifLbS6oYpMeKaf0BCuUidMw0LqZeCMA',
>  'command': 'addRegion', 'signature': 'jZQivyHVubuotqAzSjRPxUJmAn4=', 
> 'response': 'json'}
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): DEBUG: Sending GET 
> Cmd : addRegion===
> requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection 
> (1): 10.220.135.73
> requests.packages.urllib3.connectionpool: DEBUG: "GET 
> /client/api?endpoint=http%3A%2F%2Fregion1%3A8080%2Fclient&name=region1&id=1&apiKey=Ra1mlXzCZU0K1l4MKDWdRbQDU67PCQuRnKYv3hyc-Q8hSvCSFjB32UtifLbS6oYpMeKaf0BCuUidMw0LqZeCMA&command=addRegion&signature=jZQivyHVubuotqAzSjRPxUJmAn4%3D&response=json
>  HTTP/1.1" 431 123
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): ERROR: 
> Exception:['Traceback (most recent call last):\n', '  File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>  line 308, in __parseAndGetResponse\nresponse_cls)\n', '  File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/jsonHelper.py",
>  line 150, in getResultObj\nraise 
> cloudstackException.CloudstackAPIException(respname, errMsg)\n', 
> 'CloudstackAPIException: Execute cmd: addregion failed, due to: errorCode: 
> 431, errorText:Region with id: 1 already exists\n']
> Traceback (most recent call last):
>   File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py",
>  line 308, in __parseAndGetResponse
> response_cls)
>   File 
> "/local/jenkins/workspace/xenrt-reg-basic-xs/work.64/env/local/lib/python2.7/site-packages/marvin/jsonHelper.py",
>  line 150, in getResultObj
> raise cloudstackException.CloudstackAPIException(respname, errMsg)
> CloudstackAPIException: Execute cmd: addregion failed, due to: errorCode: 
> 431, errorText:Region with id: 1 already exists
> test_createRegionWithExistingRegionName 
> (integration.component.test_regions.TestRegions): ERROR