diff options
author | Asteroide <thomas.duval@orange.com> | 2018-05-07 11:43:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-05-07 11:43:02 +0000 |
commit | a89a8e0738ab597d80d29964a137d7f3eb9fb9a5 (patch) | |
tree | 252fec61c750b8f2eb56affa57581b3827d65d81 /moon_manager/moon_manager/api/policies.py | |
parent | f1d3e269b87bdbfa10997606c04916bc3f36edfb (diff) | |
parent | 5f97343ea8fab5db3cf1584322a75d25d583406f (diff) |
Merge "Update documentation to show which parameter is mandatory or not."
Diffstat (limited to 'moon_manager/moon_manager/api/policies.py')
-rw-r--r-- | moon_manager/moon_manager/api/policies.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/moon_manager/moon_manager/api/policies.py b/moon_manager/moon_manager/api/policies.py index 3447beb1..1a9e0bae 100644 --- a/moon_manager/moon_manager/api/policies.py +++ b/moon_manager/moon_manager/api/policies.py @@ -38,10 +38,10 @@ class Policies(Resource): :param user_id: user ID who do the request :return: { "policy_id1": { - "name": "...", - "model_id": "...", - "genre": "... (optional)", - "description": "... (optional)", + "name": "name of the policy (mandatory)", + "model_id": "ID of the model linked to this policy", + "genre": "authz of admin (optional, default to authz)", + "description": "description of the policy (optional)", } } :internal_api: get_policies @@ -58,20 +58,20 @@ class Policies(Resource): def post(self, uuid=None, user_id=None): """Create policy. - :param uuid: uuid of the policy (not used here) + :param uuid: uuid of the policy (not used here if a new policy is created) :param user_id: user ID who do the request :request body: { - "name": "...", - "model_id": "...", - "genre": "... (optional)", - "description": "... (optional)", + "name": "name of the policy (mandatory)", + "model_id": "ID of the model linked to this policy", + "genre": "authz of admin (optional, default to authz)", + "description": "description of the policy (optional)", } :return: { "policy_id1": { - "name": "...", - "model_id": "...", - "genre": "... (optional)", - "description": "... (optional)", + "name": "name of the policy (mandatory)", + "model_id": "ID of the model linked to this policy", + "genre": "authz of admin (optional, default to authz)", + "description": "description of the policy (optional)", } } :internal_api: add_policy @@ -86,7 +86,7 @@ class Policies(Resource): return {"policies": data} @check_auth - def delete(self, uuid=None, user_id=None): + def delete(self, uuid, user_id=None): """Delete a policy :param uuid: uuid of the policy to delete @@ -106,17 +106,17 @@ class Policies(Resource): return {"result": True} @check_auth - def patch(self, uuid=None, user_id=None): + def patch(self, uuid, user_id=None): """Update a policy :param uuid: uuid of the policy to update :param user_id: user ID who do the request :return: { "policy_id1": { - "name": "...", - "model_id": "...", - "genre": "... (optional)", - "description": "... (optional)", + "name": "name of the policy (mandatory)", + "model_id": "ID of the model linked to this policy", + "genre": "authz of admin (optional, default to authz)", + "description": "description of the policy (optional)", } } :internal_api: update_policy |