From a55765af4af8646a3ec95de2e8274b1c5584ee10 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Tue, 2 May 2017 13:36:41 +0300 Subject: [PATCH] Add policy description for os-fixed-ips This commit adds policy doc for os-fixed-ips policies. Partial implement blueprint policy-docs Change-Id: Ief255af699cee217ebf963a2c36f9e819ef4ef90 --- nova/policies/fixed_ips.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/nova/policies/fixed_ips.py b/nova/policies/fixed_ips.py index 4c434bd77bec..33c034baec0f 100644 --- a/nova/policies/fixed_ips.py +++ b/nova/policies/fixed_ips.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_policy import policy - from nova.policies import base @@ -22,9 +20,26 @@ BASE_POLICY_NAME = 'os_compute_api:os-fixed-ips' fixed_ips_policies = [ - policy.RuleDefault( - name=BASE_POLICY_NAME, - check_str=base.RULE_ADMIN_API), + base.create_rule_default( + BASE_POLICY_NAME, + base.RULE_ADMIN_API, + """Shows details for, reserve and unreserve a fixed IP address. + +These APIs are only available with nova-network which is deprecated.""", + [ + { + 'method': 'GET', + 'path': '/os-fixed-ips/{fixed_ip}' + }, + { + 'method': 'POST', + 'path': '/os-fixed-ips/{fixed_ip}/action (reserve)' + }, + { + 'method': 'POST', + 'path': '/os-fixed-ips/{fixed_ip}/action (unreserve)' + } + ]), ]