diff options
author | Thomas Duval <thomas.duval@orange.com> | 2017-11-03 15:07:12 +0100 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2017-11-03 15:07:12 +0100 |
commit | fa11d78e728029bcefa0ad6608d422715ae8f0be (patch) | |
tree | 99aa1b2e44b6008b34d4d8e01c6af56eca6ca773 /moonv4/templates/moonforming/utils | |
parent | 0418b00f6d811c7b407bd8abbe80064605e37c06 (diff) |
Fix the Moon platform startup and fix some bugs in startup.
Change-Id: I9014071c755ec5ef0c9eb0d575af29d5f3ad3533
Diffstat (limited to 'moonv4/templates/moonforming/utils')
-rw-r--r-- | moonv4/templates/moonforming/utils/pdp.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/moonv4/templates/moonforming/utils/pdp.py b/moonv4/templates/moonforming/utils/pdp.py index 4f513aa6..676b216b 100644 --- a/moonv4/templates/moonforming/utils/pdp.py +++ b/moonv4/templates/moonforming/utils/pdp.py @@ -15,7 +15,7 @@ KEYSTONE_SERVER = config['openstack']['keystone']['url'] pdp_template = { "name": "test_pdp", "security_pipeline": [], - "keystone_project_id": "", + "keystone_project_id": None, "description": "test", } @@ -46,6 +46,8 @@ def get_keystone_projects(): } req = requests.post("{}/auth/tokens".format(KEYSTONE_SERVER), json=data_auth, headers=HEADERS) + print("{}/auth/tokens".format(KEYSTONE_SERVER)) + print(req.text) assert req.status_code in (200, 201) TOKEN = req.headers['X-Subject-Token'] HEADERS['X-Auth-Token'] = TOKEN @@ -95,6 +97,8 @@ def add_pdp(name="test_pdp", policy_id=None): if policy_id: pdp_template['security_pipeline'].append(policy_id) req = requests.post(URL + "/pdp", json=pdp_template, headers=HEADERS) + print(req.status_code) + print(req) assert req.status_code == 200 result = req.json() assert type(result) is dict |