diff options
author | Chris Yeoh <cyeoh@au1.ibm.com> | 2013-05-28 23:07:12 +0930 |
---|---|---|
committer | Chris Yeoh <cyeoh@au1.ibm.com> | 2013-05-28 23:07:12 +0930 |
commit | 86a264488d670437ad77561019ecb1201ff8a31b (patch) | |
tree | 57346537c4aaa3606fb75d7449dfe02579e0a22e | |
parent | d7da449eef09d6d86d10ffc354e614b58b08d1ce (diff) | |
download | nova-86a264488d670437ad77561019ecb1201ff8a31b.tar.gz nova-86a264488d670437ad77561019ecb1201ff8a31b.tar.xz nova-86a264488d670437ad77561019ecb1201ff8a31b.zip |
Rename policy auth for V3 os-fixed-ips
Renames name used to for policy authorisation for the
V3 os-fixed-ips to os-fixed-ips with a "v3:" prefix (as
per ML discussion)
Change-Id: Ia599c29d7f45153ef47605b6e2a7061fc28ff7cc
-rw-r--r-- | etc/nova/policy.json | 1 | ||||
-rw-r--r-- | nova/api/openstack/compute/plugins/v3/fixed_ips.py | 6 | ||||
-rw-r--r-- | nova/tests/fake_policy.py | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/etc/nova/policy.json b/etc/nova/policy.json index cd6892596..67082f407 100644 --- a/etc/nova/policy.json +++ b/etc/nova/policy.json @@ -49,6 +49,7 @@ "compute_extension:extended_ips_mac": "", "compute_extension:extended_vif_net": "", "compute_extension:fixed_ips": "rule:admin_api", + "compute_extension:v3:os-fixed-ips": "rule:admin_api", "compute_extension:flavor_access": "", "compute_extension:flavor_disabled": "", "compute_extension:flavor_rxtx": "", diff --git a/nova/api/openstack/compute/plugins/v3/fixed_ips.py b/nova/api/openstack/compute/plugins/v3/fixed_ips.py index dc22a83ea..e98b830bd 100644 --- a/nova/api/openstack/compute/plugins/v3/fixed_ips.py +++ b/nova/api/openstack/compute/plugins/v3/fixed_ips.py @@ -22,7 +22,9 @@ from nova import exception from nova.openstack.common import log as logging LOG = logging.getLogger(__name__) -authorize = extensions.extension_authorizer('compute', 'fixed_ips') + +ALIAS = "os-fixed-ips" +authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS) class FixedIPController(object): @@ -82,7 +84,7 @@ class FixedIPs(extensions.V3APIExtensionBase): """Fixed IPs support.""" name = "FixedIPs" - alias = "os-fixed-ips" + alias = ALIAS namespace = "http://docs.openstack.org/compute/ext/fixed_ips/api/v3" version = 1 diff --git a/nova/tests/fake_policy.py b/nova/tests/fake_policy.py index 08a85c4de..e715dc9d1 100644 --- a/nova/tests/fake_policy.py +++ b/nova/tests/fake_policy.py @@ -127,6 +127,7 @@ policy_data = """ "compute_extension:extended_ips_mac": "", "compute_extension:extended_vif_net": "", "compute_extension:fixed_ips": "", + "compute_extension:v3:os-fixed-ips": "", "compute_extension:flavor_access": "", "compute_extension:flavor_disabled": "", "compute_extension:flavor_rxtx": "", |