aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/moon_interface/tests/apitests/utils/policies.py
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2017-05-09 10:16:06 +0200
committerasteroide <thomas.duval@orange.com>2017-05-09 10:16:06 +0200
commit4dc3cabba46fad28f5018aea516c560d497e9147 (patch)
treeac74e7a9b8dfd627be0326117e99a83005574dd2 /moonv4/moon_interface/tests/apitests/utils/policies.py
parent94aa78ca23c4db13a0752fbdd0df96730b1e7288 (diff)
Add instructions tag in each rule
Change-Id: Ib63ad8c4b2261d993ee156fae18fd315a775dbd0
Diffstat (limited to 'moonv4/moon_interface/tests/apitests/utils/policies.py')
-rw-r--r--moonv4/moon_interface/tests/apitests/utils/policies.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/moonv4/moon_interface/tests/apitests/utils/policies.py b/moonv4/moon_interface/tests/apitests/utils/policies.py
index 67be91e5..bf75734f 100644
--- a/moonv4/moon_interface/tests/apitests/utils/policies.py
+++ b/moonv4/moon_interface/tests/apitests/utils/policies.py
@@ -527,11 +527,12 @@ def delete_action_assignment(policy_id, action_id, action_cat_id, action_data_id
assert action_data_id not in result["action_assignments"][key]["assignments"]
-def add_rule(policy_id, meta_rule_id, rule):
+def add_rule(policy_id, meta_rule_id, rule, instructions={"chain": [{"security_pipeline": "rbac"}]}):
req = requests.post(URL.format("/policies/{}/rules".format(policy_id)),
json={
"meta_rule_id": meta_rule_id,
"rule": rule,
+ "instructions": instructions,
"enabled": True
},
headers=HEADERS)