From e07cfdce2ad7b6fb1e1857aea47ab7ffcb663eab Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Thu, 1 Mar 2018 20:09:39 +0100 Subject: Add information about which API attribute is important or not. In other terms, which attribute must be tested or not. Change-Id: I81d4270a41353aa1ec958aff74ee741e9d172fbc --- moon_manager/moon_manager/api/data.py | 22 ++++++------ moon_manager/moon_manager/api/meta_data.py | 24 ++++++------- moon_manager/moon_manager/api/meta_rules.py | 1 - moon_manager/moon_manager/api/models.py | 10 +++--- moon_manager/moon_manager/api/pdp.py | 10 +++--- moon_manager/moon_manager/api/perimeter.py | 56 ++++++++++++++--------------- moon_manager/moon_manager/api/policies.py | 18 +++++----- 7 files changed, 70 insertions(+), 71 deletions(-) (limited to 'moon_manager') diff --git a/moon_manager/moon_manager/api/data.py b/moon_manager/moon_manager/api/data.py index b74ca385..88c9d59a 100644 --- a/moon_manager/moon_manager/api/data.py +++ b/moon_manager/moon_manager/api/data.py @@ -46,7 +46,7 @@ class SubjectData(Resource): "data": { "subject_data_id": { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } } }] @@ -73,7 +73,7 @@ class SubjectData(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } :return: { "policy_id": "policy_id1", @@ -81,7 +81,7 @@ class SubjectData(Resource): "data": { "subject_data_id": { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } } } @@ -108,7 +108,7 @@ class SubjectData(Resource): :param user_id: user ID who do the request :return: [{ "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" }] :internal_api: delete_subject_data """ @@ -151,7 +151,7 @@ class ObjectData(Resource): "data": { "object_data_id": { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } } }] @@ -178,7 +178,7 @@ class ObjectData(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } :return: { "policy_id": "policy_id1", @@ -186,7 +186,7 @@ class ObjectData(Resource): "data": { "object_data_id": { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } } } @@ -213,7 +213,7 @@ class ObjectData(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_object_data """ @@ -256,7 +256,7 @@ class ActionData(Resource): "data": { "action_data_id": { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } } }] @@ -291,7 +291,7 @@ class ActionData(Resource): "data": { "action_data_id": { "name": "name of the data", - "description": "description of the data" + "description": "description of the data (optional)" } } } @@ -318,7 +318,7 @@ class ActionData(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_action_data """ diff --git a/moon_manager/moon_manager/api/meta_data.py b/moon_manager/moon_manager/api/meta_data.py index 28aab445..104f26be 100644 --- a/moon_manager/moon_manager/api/meta_data.py +++ b/moon_manager/moon_manager/api/meta_data.py @@ -38,7 +38,7 @@ class SubjectCategories(Resource): :return: { "subject_category_id": { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } } :internal_api: get_subject_categories @@ -60,12 +60,12 @@ class SubjectCategories(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } :return: { "subject_category_id": { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } } :internal_api: add_subject_category @@ -87,7 +87,7 @@ class SubjectCategories(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_subject_category """ @@ -121,7 +121,7 @@ class ObjectCategories(Resource): :return: { "object_category_id": { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } } :internal_api: get_object_categories @@ -143,12 +143,12 @@ class ObjectCategories(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } :return: { "object_category_id": { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } } :internal_api: add_object_category @@ -170,7 +170,7 @@ class ObjectCategories(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_object_category """ @@ -204,7 +204,7 @@ class ActionCategories(Resource): :return: { "action_category_id": { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } } :internal_api: get_action_categories @@ -226,12 +226,12 @@ class ActionCategories(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } :return: { "action_category_id": { "name": "name of the category", - "description": "description of the category" + "description": "description of the category (optional)" } } :internal_api: add_action_category @@ -253,7 +253,7 @@ class ActionCategories(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_action_category """ diff --git a/moon_manager/moon_manager/api/meta_rules.py b/moon_manager/moon_manager/api/meta_rules.py index 25ae5aac..d2cbf5d1 100644 --- a/moon_manager/moon_manager/api/meta_rules.py +++ b/moon_manager/moon_manager/api/meta_rules.py @@ -40,7 +40,6 @@ class MetaRules(Resource): "meta_rules": { "meta_rule_id1": { "name": "name of the meta rule", - "algorithm": "name of the meta rule algorithm", "subject_categories": ["subject_category_id1", "subject_category_id2"], "object_categories": ["object_category_id1"], diff --git a/moon_manager/moon_manager/api/models.py b/moon_manager/moon_manager/api/models.py index 07b10d90..8a5f229c 100644 --- a/moon_manager/moon_manager/api/models.py +++ b/moon_manager/moon_manager/api/models.py @@ -38,7 +38,7 @@ class Models(Resource): :return: { "model_id1": { "name": "...", - "description": "...", + "description": "... (optional)", "meta_rules": ["meta_rule_id1", ] } } @@ -60,13 +60,13 @@ class Models(Resource): :param user_id: user ID who do the request :request body: { "name": "...", - "description": "...", + "description": "... (optional)", "meta_rules": ["meta_rule_id1", ] } :return: { "model_id1": { "name": "...", - "description": "...", + "description": "... (optional)", "meta_rules": ["meta_rule_id1", ] } } @@ -89,7 +89,7 @@ class Models(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_model """ @@ -110,7 +110,7 @@ class Models(Resource): :return: { "model_id1": { "name": "...", - "description": "...", + "description": "... (optional)", "meta_rules": ["meta_rule_id1", ] } } diff --git a/moon_manager/moon_manager/api/pdp.py b/moon_manager/moon_manager/api/pdp.py index 4f11135e..78931e1f 100644 --- a/moon_manager/moon_manager/api/pdp.py +++ b/moon_manager/moon_manager/api/pdp.py @@ -107,7 +107,7 @@ class PDP(Resource): "name": "...", "security_pipeline": [...], "keystone_project_id": "keystone_project_id1", - "description": "...", + "description": "... (optional)", } } :internal_api: get_pdp @@ -130,14 +130,14 @@ class PDP(Resource): "name": "...", "security_pipeline": [...], "keystone_project_id": "keystone_project_id1", - "description": "...", + "description": "... (optional)", } :return: { "pdp_id1": { "name": "...", "security_pipeline": [...], "keystone_project_id": "keystone_project_id1", - "description": "...", + "description": "... (optional)", } } :internal_api: add_pdp @@ -169,7 +169,7 @@ class PDP(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_pdp """ @@ -193,7 +193,7 @@ class PDP(Resource): "name": "...", "security_pipeline": [...], "keystone_project_id": "keystone_project_id1", - "description": "...", + "description": "... (optional)", } } :internal_api: update_pdp diff --git a/moon_manager/moon_manager/api/perimeter.py b/moon_manager/moon_manager/api/perimeter.py index d3948bc1..e1d999da 100644 --- a/moon_manager/moon_manager/api/perimeter.py +++ b/moon_manager/moon_manager/api/perimeter.py @@ -47,7 +47,7 @@ class Subjects(Resource): "subject_id": { "name": "name of the subject", "keystone_id": "keystone id of the subject", - "description": "a description" + "description": "a description (optional)" } } :internal_api: get_subjects @@ -73,17 +73,17 @@ class Subjects(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the subject", - "description": "description of the subject", - "password": "password for the subject", - "email": "email address of the subject" + "description": "description of the subject (optional)", + "password": "password for the subject (optional)", + "email": "email address of the subject (optional)" } :return: { "subject_id": { "name": "name of the subject", "keystone_id": "keystone id of the subject", - "description": "description of the subject", - "password": "password for the subject", - "email": "email address of the subject" + "description": "description of the subject (optional)", + "password": "password for the subject (optional)", + "email": "email address of the subject (optional)" } } :internal_api: set_subject @@ -115,17 +115,17 @@ class Subjects(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the subject", - "description": "description of the subject", - "password": "password for the subject", - "email": "email address of the subject" + "description": "description of the subject (optional)", + "password": "password for the subject (optional)", + "email": "email address of the subject (optional)" } :return: { "subject_id": { "name": "name of the subject", "keystone_id": "keystone id of the subject", - "description": "description of the subject", - "password": "password for the subject", - "email": "email address of the subject" + "description": "description of the subject (optional)", + "password": "password for the subject (optional)", + "email": "email address of the subject (optional)" } } :internal_api: set_subject @@ -159,9 +159,9 @@ class Subjects(Resource): "subject_id": { "name": "name of the subject", "keystone_id": "keystone id of the subject", - "description": "description of the subject", - "password": "password for the subject", - "email": "email address of the subject" + "description": "description of the subject (optional)", + "password": "password for the subject (optional)", + "email": "email address of the subject (optional)" } } :internal_api: delete_subject @@ -201,7 +201,7 @@ class Objects(Resource): :return: { "object_id": { "name": "name of the object", - "description": "description of the object" + "description": "description of the object (optional)" } } :internal_api: get_objects @@ -227,12 +227,12 @@ class Objects(Resource): :param user_id: user ID who do the request :request body: { "object_name": "name of the object", - "object_description": "description of the object" + "object_description": "description of the object (optional)" } :return: { "object_id": { "name": "name of the object", - "description": "description of the object" + "description": "description of the object (optional)" } } :internal_api: set_object @@ -262,12 +262,12 @@ class Objects(Resource): :param user_id: user ID who do the request :request body: { "object_name": "name of the object", - "object_description": "description of the object" + "object_description": "description of the object (optional)" } :return: { "object_id": { "name": "name of the object", - "description": "description of the object" + "description": "description of the object (optional)" } } :internal_api: set_object @@ -298,7 +298,7 @@ class Objects(Resource): :return: { "object_id": { "name": "name of the object", - "description": "description of the object" + "description": "description of the object (optional)" } } :internal_api: delete_object @@ -338,7 +338,7 @@ class Actions(Resource): :return: { "action_id": { "name": "name of the action", - "description": "description of the action" + "description": "description of the action (optional)" } } :internal_api: get_actions @@ -361,12 +361,12 @@ class Actions(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the action", - "description": "description of the action" + "description": "description of the action (optional)" } :return: { "action_id": { "name": "name of the action", - "description": "description of the action" + "description": "description of the action (optional)" } } :internal_api: set_action @@ -396,12 +396,12 @@ class Actions(Resource): :param user_id: user ID who do the request :request body: { "name": "name of the action", - "description": "description of the action" + "description": "description of the action (optional)" } :return: { "action_id": { "name": "name of the action", - "description": "description of the action" + "description": "description of the action (optional)" } } :internal_api: set_action @@ -432,7 +432,7 @@ class Actions(Resource): :return: { "action_id": { "name": "name of the action", - "description": "description of the action" + "description": "description of the action (optional)" } } :internal_api: delete_action diff --git a/moon_manager/moon_manager/api/policies.py b/moon_manager/moon_manager/api/policies.py index 0d7a52a9..3447beb1 100644 --- a/moon_manager/moon_manager/api/policies.py +++ b/moon_manager/moon_manager/api/policies.py @@ -40,8 +40,8 @@ class Policies(Resource): "policy_id1": { "name": "...", "model_id": "...", - "genre": "...", - "description": "...", + "genre": "... (optional)", + "description": "... (optional)", } } :internal_api: get_policies @@ -63,15 +63,15 @@ class Policies(Resource): :request body: { "name": "...", "model_id": "...", - "genre": "...", - "description": "...", + "genre": "... (optional)", + "description": "... (optional)", } :return: { "policy_id1": { "name": "...", "model_id": "...", - "genre": "...", - "description": "...", + "genre": "... (optional)", + "description": "... (optional)", } } :internal_api: add_policy @@ -93,7 +93,7 @@ class Policies(Resource): :param user_id: user ID who do the request :return: { "result": "True or False", - "message": "optional message" + "message": "optional message (optional)" } :internal_api: delete_policy """ @@ -115,8 +115,8 @@ class Policies(Resource): "policy_id1": { "name": "...", "model_id": "...", - "genre": "...", - "description": "...", + "genre": "... (optional)", + "description": "... (optional)", } } :internal_api: update_policy -- cgit 1.2.3-korg