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/data.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/data.py')
-rw-r--r-- | moon_manager/moon_manager/api/data.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/moon_manager/moon_manager/api/data.py b/moon_manager/moon_manager/api/data.py index 88c9d59a..05e30236 100644 --- a/moon_manager/moon_manager/api/data.py +++ b/moon_manager/moon_manager/api/data.py @@ -32,8 +32,8 @@ class SubjectData(Resource): ) @check_auth - def get(self, uuid=None, category_id=None, data_id=None, user_id=None): - """Retrieve all subject categories or a specific one if sid is given + def get(self, uuid, category_id=None, data_id=None, user_id=None): + """Retrieve all subject categories or a specific one if data_id is given for a given policy :param uuid: uuid of the policy @@ -64,15 +64,15 @@ class SubjectData(Resource): return {"subject_data": data} @check_auth - def post(self, uuid=None, category_id=None, data_id=None, user_id=None): + def post(self, uuid, category_id=None, data_id=None, user_id=None): """Create or update a subject. :param uuid: uuid of the policy :param category_id: uuid of the subject category - :param data_id: uuid of the subject data + :param data_id: uuid of the subject data (not used here) :param user_id: user ID who do the request :request body: { - "name": "name of the data", + "name": "name of the data (mandatory)", "description": "description of the data (optional)" } :return: { @@ -80,7 +80,7 @@ class SubjectData(Resource): "category_id": "category_id1", "data": { "subject_data_id": { - "name": "name of the data", + "name": "name of the data (mandatory)", "description": "description of the data (optional)" } } @@ -99,7 +99,7 @@ class SubjectData(Resource): return {"subject_data": data} @check_auth - def delete(self, uuid=None, category_id=None, data_id=None, user_id=None): + def delete(self, uuid, category_id=None, data_id=None, user_id=None): """Delete a subject for a given policy :param uuid: uuid of the policy @@ -137,7 +137,7 @@ class ObjectData(Resource): ) @check_auth - def get(self, uuid=None, category_id=None, data_id=None, user_id=None): + def get(self, uuid, category_id=None, data_id=None, user_id=None): """Retrieve all object categories or a specific one if sid is given for a given policy @@ -169,15 +169,15 @@ class ObjectData(Resource): return {"object_data": data} @check_auth - def post(self, uuid=None, category_id=None, data_id=None, user_id=None): + def post(self, uuid, category_id=None, data_id=None, user_id=None): """Create or update a object. :param uuid: uuid of the policy :param category_id: uuid of the object category - :param data_id: uuid of the object data + :param data_id: uuid of the object data (not used here) :param user_id: user ID who do the request :request body: { - "name": "name of the data", + "name": "name of the data (mandatory)", "description": "description of the data (optional)" } :return: { @@ -204,7 +204,7 @@ class ObjectData(Resource): return {"object_data": data} @check_auth - def delete(self, uuid=None, category_id=None, data_id=None, user_id=None): + def delete(self, uuid, category_id=None, data_id=None, user_id=None): """Delete a object for a given policy :param uuid: uuid of the policy @@ -242,7 +242,7 @@ class ActionData(Resource): ) @check_auth - def get(self, uuid=None, category_id=None, data_id=None, user_id=None): + def get(self, uuid, category_id=None, data_id=None, user_id=None): """Retrieve all action categories or a specific one if sid is given for a given policy @@ -274,7 +274,7 @@ class ActionData(Resource): return {"action_data": data} @check_auth - def post(self, uuid=None, category_id=None, data_id=None, user_id=None): + def post(self, uuid, category_id=None, data_id=None, user_id=None): """Create or update a action. :param uuid: uuid of the policy @@ -282,8 +282,8 @@ class ActionData(Resource): :param data_id: uuid of the action data :param user_id: user ID who do the request :request body: { - "name": "name of the data", - "description": "description of the data" + "name": "name of the data (mandatory)", + "description": "description of the data (optional)" } :return: { "policy_id": "policy_id1", @@ -309,7 +309,7 @@ class ActionData(Resource): return {"action_data": data} @check_auth - def delete(self, uuid=None, category_id=None, data_id=None, user_id=None): + def delete(self, uuid, category_id=None, data_id=None, user_id=None): """Delete a action for a given policy :param uuid: uuid of the policy |