ROBOT test cases improvements for PnP PNF in El Alto release 31/95031/1
authorKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Thu, 5 Sep 2019 12:47:56 +0000 (14:47 +0200)
committerKrzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Thu, 5 Sep 2019 12:48:21 +0000 (14:48 +0200)
Issue-ID: INT-1179

Signed-off-by: Krzysztof Kuzmicki <krzysztof.kuzmicki@nokia.com>
Change-Id: Ie359abedc6772e546962e9bf8d07cf67e3be23ae

robotframework-onap/ONAPLibrary/CloudConfigSOKeywords.py

index fe487a2..95d68c7 100644 (file)
@@ -44,11 +44,11 @@ class CloudConfigSOKeywords(object):
     @keyword
     def upsert_cloud_configuration(self, endpoint, data_path, templates_folder, template, arguments, auth=None):
         """Creates a cloud configuration in SO, or if it exists updates it"""
-        get_resp = self.get_cloud_configuration(endpoint, data_path, arguments['site_name'])
+        get_resp = self.get_cloud_configuration(endpoint, data_path, arguments['site_name'], auth=auth)
         self.templating.create_environment("so", templates_folder)
         data = self.templating.apply_template("so", template, arguments)
         if get_resp.status_code == 404:
             resp = self.reqs.post_request(alias="so", endpoint=endpoint, data_path=data_path, data=data, auth=auth)
         else:
-            resp = self.reqs.put_request(alias="so", endpoint=endpoint, data_path=data_path, data=data, auth=auth)
+            resp = self.reqs.put_request(alias="so", endpoint=endpoint, data_path=data_path + "/" + arguments['site_name'], data=data, auth=auth)
         self.builtin.should_match_regexp(str(resp.status_code), "^(201|200)$")