diff options
| author | Unmesh Gurjar <unmesh.gurjar@vertex.co.in> | 2012-03-22 11:19:45 +0530 |
|---|---|---|
| committer | Unmesh Gurjar <unmesh.gurjar@vertex.co.in> | 2012-03-22 11:23:12 +0530 |
| commit | b15bfc2edd5d3dd0dca805786bdcf22d3fb0339d (patch) | |
| tree | bb1ab2547b0dd05e678e2270e20314d67512247f /nova/api | |
| parent | 66e152f718f227ebb830fd325685103c50234d99 (diff) | |
| download | nova-b15bfc2edd5d3dd0dca805786bdcf22d3fb0339d.tar.gz nova-b15bfc2edd5d3dd0dca805786bdcf22d3fb0339d.tar.xz nova-b15bfc2edd5d3dd0dca805786bdcf22d3fb0339d.zip | |
Fixed status validation. Fixes bug 960884.
Fixed the status value validation in os-hosts extension and added a negative
scenario in unit test for os-hosts extension.
Change-Id: Ib4166757561e531494a1a4d3070d7c8971b57dc5
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/hosts.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/hosts.py b/nova/api/openstack/compute/contrib/hosts.py index 93e0dd983..a93da9e01 100644 --- a/nova/api/openstack/compute/contrib/hosts.py +++ b/nova/api/openstack/compute/contrib/hosts.py @@ -138,7 +138,7 @@ class HostController(object): key = raw_key.lower().strip() val = raw_val.lower().strip() if key == "status": - if val[:6] in ("enable", "disabl"): + if val in ("enable", "disable"): update_values['status'] = val.startswith("enable") else: explanation = _("Invalid status: '%s'") % raw_val |
