diff options
author | 2020-06-04 10:46:47 +0200 | |
---|---|---|
committer | 2020-06-24 11:16:53 +0200 | |
commit | fca8a0b1af32083b8ea025135b120091aec9714f (patch) | |
tree | 4bb568ca92ad037801937d1cf2264b4dff923c52 /catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py | |
parent | 7027b33eb41947e6799392d392283b09110158d1 (diff) |
Refactoring the check backend, create consumers
Continue refactoring:
- added script for healthCheck, create new consumers
- also update chef recipes to use new script
Issue-ID: SDC-2784
Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
Change-Id: I158d816362f91f74b217fe85112cf7c14da8f1ec
Diffstat (limited to 'catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py')
-rwxr-xr-x | catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py index 48261704f7..6fea657fab 100755 --- a/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py +++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py @@ -35,6 +35,16 @@ class SdcBeProxy: 'role': role })) + def check_consumer(self, consumer_name): + return self.con.get("/sdc2/rest/v1/consumers/" + consumer_name) + + def create_consumer(self, consumer_name, slat, password): + return self.con.post("/sdc2/rest/v1/consumers/", json.dumps({ + 'consumerName': consumer_name, + 'consumerSalt': slat, + 'consumerPassword': password + })) + def post_file(self, path, multi_part_form_data): return self.con.post_file(path, multi_part_form_data) |