From 347e7d620ec02a6c4dbaa0622d04977bd9243a7f Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Wed, 17 May 2017 10:16:46 +0300 Subject: [PATCH] Add policy description for multinic This commit adds policy doc for multinic policies. Partial implement blueprint policy-docs Change-Id: Ic912ceb13e57d970a757e99435424186cc8fde9e --- nova/policies/multinic.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/nova/policies/multinic.py b/nova/policies/multinic.py index f9fe645090eb..0abfeb191d3b 100644 --- a/nova/policies/multinic.py +++ b/nova/policies/multinic.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,23 @@ BASE_POLICY_NAME = 'os_compute_api:os-multinic' multinic_policies = [ - policy.RuleDefault( - name=BASE_POLICY_NAME, - check_str=base.RULE_ADMIN_OR_OWNER), + base.create_rule_default( + BASE_POLICY_NAME, + base.RULE_ADMIN_OR_OWNER, + """Adds or Removes a fixed IP address from a server. + +These APIs are proxy calls to the Network service. These are all +deprecated.""", + [ + { + 'method': 'POST', + 'path': '/servers/{server_id}/action (addFixedIp)' + }, + { + 'method': 'POST', + 'path': '/servers/{server_id}/action (removeFixedIp)' + } + ]), ]