# three available volumes
$ cinder list
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| ID | Status | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| 09203db5-7e18-40d9-91c6-08ef149bb568 | available | vol2 | 1 | None | |
| 9be22b23-6642-43a7-9da4-85cc4101b739 | available | vol3 | 1 | None | |
| c5f322d0-8437-4788-b943-b78d38303e81 | available | vol1 | 1 | None | |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
# using the "name" key seems broken
$ curl -s -H 'x-auth-token: xxxxxx' http://localhost:8776/v1/c1cb62492a41464fb9d483417014af6c/volumes/detail?name=vol1 | python -m json.tool
{
"volumes": []
}
# display_name would make more sense, but also doesn't work
$ curl -s -H 'x-auth-token: xxxxxx' http://localhost:8776/v1/c1cb62492a41464fb9d483417014af6c/volumes/detail?display_name=vol1 | python -m json.tool
{
"volumes": [
{
"attachments": [],
"availability_zone": "cinder",
"created_at": "2012-09-05T14:27:37.000000",
"display_description": null,
"display_name": "vol2",
"id": "09203db5-7e18-40d9-91c6-08ef149bb568",
"metadata": {},
"size": 1,
"snapshot_id": null,
"status": "available",
"volume_type": "None"
},
{
"attachments": [],
"availability_zone": "cinder",
"created_at": "2012-09-05T14:27:37.000000",
"display_description": null,
"display_name": "vol3",
"id": "9be22b23-6642-43a7-9da4-85cc4101b739",
"metadata": {},
"size": 1,
"snapshot_id": null,
"status": "available",
"volume_type": "None"
},
{
"attachments": [],
"availability_zone": "cinder",
"created_at": "2012-09-05T14:27:36.000000",
"display_description": null,
"display_name": "vol1",
"id": "c5f322d0-8437-4788-b943-b78d38303e81",
"metadata": {},
"size": 1,
"snapshot_id": null,
"status": "available",
"volume_type": "None"
}
]
}
# status is broken too
$ curl -s -H 'x-auth-token: xxxxxx' http://localhost:8776/v1/c1cb62492a41464fb9d483417014af6c/volumes/detail?status=available | python -m json.tool
{
"volumes": []
}
Snapshot filter by status and display_name are also broken.
The most useful filter would be by volume-id, but also seems to be broken.
clayg@cfsyn28:~$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+--------------+------+
| ID | Volume ID | Status | Display Name | Size |
+--------------------------------------+--------------------------------------+-----------+--------------+------+
| 1adf7e7a-d202-4586-a861-0bbaa73e927c | 09203db5-7e18-40d9-91c6-08ef149bb568 | available | backup2.2 | 1 |
| 672cba7c-57db-4573-8a34-5e86ca70926d | c5f322d0-8437-4788-b943-b78d38303e81 | available | backup1.3 | 1 |
| 924f3347-399b-45ee-b4e0-041fe7854779 | 09203db5-7e18-40d9-91c6-08ef149bb568 | available | backup2.1 | 1 |
| 985c2871-f4b1-41af-aa8d-c6657d47dcf9 | c5f322d0-8437-4788-b943-b78d38303e81 | available | backup1.1 | 1 |
| e5203f9c-7cd9-46f1-9335-5de5023a53fb | c5f322d0-8437-4788-b943-b78d38303e81 | available | backup1.2 | 1 |
+--------------------------------------+--------------------------------------+-----------+--------------+------+
clayg@cfsyn28:~$ curl -s -H 'x-auth-token: xxxxxx' http://localhost:8776/v1/c1cb62492a41464fb9d483417014af6c/snapshots/detail?volume_id=09203db5-7e18-40d9-91c6-08ef149bb568 | python -m json.tool
{
"snapshots": [
{
"created_at": "2012-09-05T14:31:17.000000",
"display_description": null,
"display_name": "backup2.2",
"id": "1adf7e7a-d202-4586-a861-0bbaa73e927c",
"os-extended-snapshot-attributes:progress": "100%",
"os-extended-snapshot-attributes:project_id": "c1cb62492a41464fb9d483417014af6c",
"size": 1,
"status": "available",
"volume_id": "09203db5-7e18-40d9-91c6-08ef149bb568"
},
{
"created_at": "2012-09-05T14:30:41.000000",
"display_description": null,
"display_name": "backup1.3",
"id": "672cba7c-57db-4573-8a34-5e86ca70926d",
"os-extended-snapshot-attributes:progress": "100%",
"os-extended-snapshot-attributes:project_id": "c1cb62492a41464fb9d483417014af6c",
"size": 1,
"status": "available",
"volume_id": "c5f322d0-8437-4788-b943-b78d38303e81"
},
{
"created_at": "2012-09-05T14:31:17.000000",
"display_description": null,
"display_name": "backup2.1",
"id": "924f3347-399b-45ee-b4e0-041fe7854779",
"os-extended-snapshot-attributes:progress": "100%",
"os-extended-snapshot-attributes:project_id": "c1cb62492a41464fb9d483417014af6c",
"size": 1,
"status": "available",
"volume_id": "09203db5-7e18-40d9-91c6-08ef149bb568"
},
{
"created_at": "2012-09-05T14:30:40.000000",
"display_description": null,
"display_name": "backup1.1",
"id": "985c2871-f4b1-41af-aa8d-c6657d47dcf9",
"os-extended-snapshot-attributes:progress": "100%",
"os-extended-snapshot-attributes:project_id": "c1cb62492a41464fb9d483417014af6c",
"size": 1,
"status": "available",
"volume_id": "c5f322d0-8437-4788-b943-b78d38303e81"
},
{
"created_at": "2012-09-05T14:30:41.000000",
"display_description": null,
"display_name": "backup1.2",
"id": "e5203f9c-7cd9-46f1-9335-5de5023a53fb",
"os-extended-snapshot-attributes:progress": "100%",
"os-extended-snapshot-attributes:project_id": "c1cb62492a41464fb9d483417014af6c",
"size": 1,
"status": "available",
"volume_id": "c5f322d0-8437-4788-b943-b78d38303e81"
}
]
}
Fix proposed to branch: master /review. openstack. org/12420
Review: https:/