yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #53245
[Bug 933498] Re: "List Volumes" should support filtering
This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.
If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
Valid example: CONFIRMED FOR: LIBERTY
** Changed in: nova
Importance: Low => Undecided
** Changed in: nova
Status: Confirmed => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/933498
Title:
"List Volumes" should support filtering
Status in OpenStack Compute (nova):
Expired
Status in tempest:
Fix Released
Bug description:
"List Volumes" Filtered by Name is returning all volumes
The name parameter (with a text value) is passed to get the volumes of
that particular name.
But Instead it is returning all the volumes in the server
Nosetest Log:
FAIL: Positive: Should return the details of volume by the name
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/unnimaya/MYTempest/VOLUMES/tempest/tempest/tests/test_volumes.py", line 159, in test_volume_list_filter_by_name
self.assertEqual(len(fetched_volumes), 1)
AssertionError: 5 != 1
======================================================================
Nova-Api Log
List of all the volumes
muralik@openstack27:~/source/csbu-qa/nova/tests$ ./apitool.py GET os-volumes
apitool
apitool
apitool
apitool
apitool
RESP:{'date': 'Fri, 17 Feb 2012 10:40:00 GMT', 'vary': 'X-Auth-Token', 'content-length': '1444', 'status': '200', 'content-type': 'application/json; charset=UTF-8'} {"access": {"token": {"expires": "2012-02-18T00:18:26", "tenants": [{"id": "74da8012b13c4d9195f11c10605ec7d0", "name": "demo"}], "id": "8a65e999-4c36-4305-bbd6-e6b0a7c6342f", "tenant": {"id": "74da8012b13c4d9195f11c10605ec7d0", "name": "demo"}}, "serviceCatalog": [{"endpoints": [{"id": "1", "region": "RegionOne", "publicURL": "http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0", "internalURL": "http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0", "tenantId": "74da8012b13c4d9195f11c10605ec7d0"}], "type": "compute", "name": "nova"}, {"endpoints": [{"id": "2", "region": "RegionOne", "internalURL": "http://10.233.52.27:8773/services/Cloud", "publicURL": "http://10.233.52.27:8773/services/Cloud"}], "type": "ec2", "name": "ec2"}, {"endpoints": [{"id": "3", "region": "RegionOne", "internalURL": "http://10.233.52.27:9292/v1", "publicURL": "http://10.233.52.27:9292/v1"}], "type": "image", "name": "glance"}, {"endpoints": [{"id": "4", "region": "RegionOne", "internalURL": "http://10.233.52.27:5000/v2.0", "publicURL": "http://10.233.52.27:5000/v2.0"}], "type": "identity", "name": "keystone"}], "user": {"id": "8837101af2434cdfbd346e101906ba0a", "roles": [{"name": "Member", "id": "2", "tenantId": "74da8012b13c4d9195f11c10605ec7d0"}, {"name": "sysadmin", "id": "5", "tenantId": "74da8012b13c4d9195f11c10605ec7d0"}, {"name": "netadmin", "id": "6", "tenantId": "74da8012b13c4d9195f11c10605ec7d0"}], "name": "demo"}}}
REQ: curl -i
http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0/os-
volumes -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent: python-
novaclient" -H "Accept: application/json" -H "X-Auth-Token:
8a65e999-4c36-4305-bbd6-e6b0a7c6342f"
RESP:{'status': '200', 'content-length': '485', 'content-location':
u'http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0/os-
volumes', 'x-compute-request-id': 'req-50ca9204-fb50-4eab-b97d-
1ff062e0690d', 'date': 'Fri, 17 Feb 2012 10:40:00 GMT', 'content-
type': 'application/json'} {"volumes": [{"status": "available",
"displayDescription": null, "availabilityZone": "nova", "displayName":
null, "attachments": [{}], "volumeType": null, "snapshotId": null,
"size": 1, "id": 6, "createdAt": "2012-02-16 21:00:26", "metadata":
{}}, {"status": "available", "displayDescription": null,
"availabilityZone": "nova", "displayName": "test", "attachments":
[{}], "volumeType": null, "snapshotId": null, "size": 2, "id": 7,
"createdAt": "2012-02-17 10:03:23", "metadata": {}}]}
--- START OF RESPONSE ---
{ u'volumes': [ { u'attachments': [{ }],
u'availabilityZone': u'nova',
u'createdAt': u'2012-02-16 21:00:26',
u'displayDescription': None,
u'displayName': None,
u'id': 6,
u'metadata': { },
u'size': 1,
u'snapshotId': None,
u'status': u'available',
u'volumeType': None},
{ u'attachments': [{ }],
u'availabilityZone': u'nova',
u'createdAt': u'2012-02-17 10:03:23',
u'displayDescription': None,
u'displayName': u'test',
u'id': 7,
u'metadata': { },
u'size': 2,
u'snapshotId': None,
u'status': u'available',
u'volumeType': None}]}
--- ENF OF RESPONSE ---
Now List of volumes filtered by Name should return the volume with the
specified name , but it is returning all the volumes.
muralik@openstack27:~/source/csbu-qa/nova/tests$ ./apitool.py GET os-volumes?displayName=test
apitool
apitool
apitool
apitool
apitool
REQ: curl -i http://127.0.0.1:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient"
REQ BODY: {"auth": {"tenantName": "demo", "passwordCredentials":
{"username": "demo", "password": "muralik"}}}
RESP:{'date': 'Fri, 17 Feb 2012 10:59:37 GMT', 'vary': 'X-Auth-Token',
'content-length': '1444', 'status': '200', 'content-type':
'application/json; charset=UTF-8'} {"access": {"token": {"expires":
"2012-02-18T00:18:26", "tenants": [{"id":
"74da8012b13c4d9195f11c10605ec7d0", "name": "demo"}], "id":
"8a65e999-4c36-4305-bbd6-e6b0a7c6342f", "tenant": {"id":
"74da8012b13c4d9195f11c10605ec7d0", "name": "demo"}},
"serviceCatalog": [{"endpoints": [{"id": "1", "region": "RegionOne",
"publicURL":
"http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0",
"internalURL":
"http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0",
"tenantId": "74da8012b13c4d9195f11c10605ec7d0"}], "type": "compute",
"name": "nova"}, {"endpoints": [{"id": "2", "region": "RegionOne",
"internalURL": "http://10.233.52.27:8773/services/Cloud", "publicURL":
"http://10.233.52.27:8773/services/Cloud"}], "type": "ec2", "name":
"ec2"}, {"endpoints": [{"id": "3", "region": "RegionOne",
"internalURL": "http://10.233.52.27:9292/v1", "publicURL":
"http://10.233.52.27:9292/v1"}], "type": "image", "name": "glance"},
{"endpoints": [{"id": "4", "region": "RegionOne", "internalURL":
"http://10.233.52.27:5000/v2.0", "publicURL":
"http://10.233.52.27:5000/v2.0"}], "type": "identity", "name":
"keystone"}], "user": {"id": "8837101af2434cdfbd346e101906ba0a",
"roles": [{"name": "Member", "id": "2", "tenantId":
"74da8012b13c4d9195f11c10605ec7d0"}, {"name": "sysadmin", "id": "5",
"tenantId": "74da8012b13c4d9195f11c10605ec7d0"}, {"name": "netadmin",
"id": "6", "tenantId": "74da8012b13c4d9195f11c10605ec7d0"}], "name":
"demo"}}}
REQ: curl -i
http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0/os-
volumes?displayName=test -X GET -H "X-Auth-Project-Id: demo" -H "User-
Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-
Token: 8a65e999-4c36-4305-bbd6-e6b0a7c6342f"
RESP:{'status': '200', 'content-length': '485', 'content-location':
u'http://10.233.52.27:8774/v1.1/74da8012b13c4d9195f11c10605ec7d0/os-
volumes?displayName=test', 'x-compute-request-id': 'req-ff600b6e-
cc43-4ca2-8022-08aa5a5b3549', 'date': 'Fri, 17 Feb 2012 10:59:37 GMT',
'content-type': 'application/json'} {"volumes": [{"status":
"available", "displayDescription": null, "availabilityZone": "nova",
"displayName": null, "attachments": [{}], "volumeType": null,
"snapshotId": null, "size": 1, "id": 6, "createdAt": "2012-02-16
21:00:26", "metadata": {}}, {"status": "available",
"displayDescription": null, "availabilityZone": "nova", "displayName":
"test", "attachments": [{}], "volumeType": null, "snapshotId": null,
"size": 2, "id": 7, "createdAt": "2012-02-17 10:03:23", "metadata":
{}}]}
--- START OF RESPONSE ---
{ u'volumes': [ { u'attachments': [{ }],
u'availabilityZone': u'nova',
u'createdAt': u'2012-02-16 21:00:26',
u'displayDescription': None,
u'displayName': None,
u'id': 6,
u'metadata': { },
u'size': 1,
u'snapshotId': None,
u'status': u'available',
u'volumeType': None},
{ u'attachments': [{ }],
u'availabilityZone': u'nova',
u'createdAt': u'2012-02-17 10:03:23',
u'displayDescription': None,
u'displayName': u'test',
u'id': 7,
u'metadata': { },
u'size': 2,
u'snapshotId': None,
u'status': u'available',
u'volumeType': None}]}
--- ENF OF RESPONSE ---
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/933498/+subscriptions