diff options
| author | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2012-11-20 01:24:48 +0000 |
|---|---|---|
| committer | Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> | 2012-11-20 01:52:23 +0000 |
| commit | a19d64808f3c4ab1cc3306ac3678701d0fff3e87 (patch) | |
| tree | 9d8a240813fe06926bc563f765aea6f132edd512 /openstack-common.conf | |
| parent | e60d593b5ec254bb74fca39db7164f57db90be47 (diff) | |
| download | nova-a19d64808f3c4ab1cc3306ac3678701d0fff3e87.tar.gz nova-a19d64808f3c4ab1cc3306ac3678701d0fff3e87.tar.xz nova-a19d64808f3c4ab1cc3306ac3678701d0fff3e87.zip | |
Return an error response if the specified flavor does not exists. (v4)
'nova list --flavor <id>' command outputs empty list, if there is not
any instance or flavor. A user cannot know the reason of empty list easily.
This patch changes a response to error if the specified flavor-id does not
exist instead of empty list.
Example:
$ nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | True | {} |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True | {} |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True | {} |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True | {} |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
Before applying this patch:
$ nova list --flavor 10
$
After applying this patch:
$ nova list --flavor 10
ERROR: Flavor could not be found (HTTP 422) (Request-ID: req-003d4bbc-f338-4361-9eeb-1cf18073a5a8)
$
Changelog of v4:
* Change a response code of NotFoundFlavor from 404 to 422.
Changelog of v3:
* Merge patchset2(change a response of test_get_all_by_flavor) into one patch.
* Change a response code of NotFoundFlavor from 400 to 404.
Fixes bug 1076863
Change-Id: I45f35ae6a4bf1de734c258ef819fb9b4d7f9681e
Diffstat (limited to 'openstack-common.conf')
0 files changed, 0 insertions, 0 deletions
