diff options
author | DR695H <dr695h@att.com> | 2019-07-22 18:20:48 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-07-22 18:20:48 -0400 |
commit | 27daa1a7268eee676d67a3e63a962161658aaf43 (patch) | |
tree | f425aaee0a9b2ab063c3dac05cb90a84a68e8785 /robotframework-onap | |
parent | bec8e3fc497a718503a7257040c90fcb595fb1c8 (diff) |
correct the order of parameters
Issue-ID: TEST-177
Change-Id: I57a6c890379f5bb83160ffe827d51c31e517b9fd
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap')
4 files changed, 17 insertions, 11 deletions
diff --git a/robotframework-onap/ONAPLibrary/BaseAAIKeywords.py b/robotframework-onap/ONAPLibrary/BaseAAIKeywords.py index 23e7b2e..25f36e2 100644 --- a/robotframework-onap/ONAPLibrary/BaseAAIKeywords.py +++ b/robotframework-onap/ONAPLibrary/BaseAAIKeywords.py @@ -18,6 +18,7 @@ from robot.libraries.BuiltIn import BuiltIn import time from ONAPLibrary.RequestsHelper import RequestsHelper +from ONAPLibrary.HTTPKeywords import HTTPKeywords class BaseAAIKeywords(object): @@ -28,10 +29,12 @@ class BaseAAIKeywords(object): super(BaseAAIKeywords, self).__init__() self.reqs = RequestsHelper() self.builtin = BuiltIn() + self.http = HTTPKeywords() @keyword def run_get_request(self, endpoint, data_path, accept="application/json", auth=None): """Runs an AAI get request""" + self.http.disable_warnings() resp = self.reqs.get_request("aai", endpoint, data_path, sdc_user=None, accept=accept, auth=auth) self.builtin.should_be_equal_as_strings(resp.status_code, "200") return resp @@ -39,17 +42,20 @@ class BaseAAIKeywords(object): @keyword def run_post_request(self, endpoint, data_path, data, accept="application/json", auth=None): """Runs an AAI post request""" + self.http.disable_warnings() return self.reqs.post_request("aai", endpoint, data_path, data, sdc_user=None, files=None, accept=accept, auth=auth) @keyword def run_put_request(self, endpoint, data_path, data, accept="application/json", auth=None): """Runs an AAI post request""" + self.http.disable_warnings() return self.reqs.put_request("aai", endpoint, data_path, data, sdc_user=None, accept=accept, auth=auth) @keyword def run_delete_request(self, endpoint, data_path, resource_version, accept="application/json", auth=None): """Runs an AAI delete request""" + self.http.disable_warnings() return self.reqs.delete_request("aai", endpoint, data_path + '?resource-version=' + resource_version, data=None, sdc_user=None, accept=accept, auth=auth) @@ -71,6 +77,7 @@ class BaseAAIKeywords(object): def find_node(self, endpoint, search_node_type, key, node_uuid, auth=None): data_path = '/aai/v11/search/nodes-query?search-node-type={0}&filter={1}:EQUALS:{2}'.format( search_node_type, key, node_uuid) + self.http.disable_warnings() resp = self.reqs.get_request("aai", endpoint, data_path, accept="application/json", auth=auth) response = resp.json() return 'result-data' in response diff --git a/robotframework-onap/ONAPLibrary/BaseSDCKeywords.py b/robotframework-onap/ONAPLibrary/BaseSDCKeywords.py index 19890ae..f3b93af 100644 --- a/robotframework-onap/ONAPLibrary/BaseSDCKeywords.py +++ b/robotframework-onap/ONAPLibrary/BaseSDCKeywords.py @@ -31,7 +31,7 @@ class BaseSDCKeywords(object): @keyword def run_get_request(self, endpoint, data_path, user, accept="application/json", auth=None): """Runs an SDC get request""" - resp = self.reqs.get_request("sdc", endpoint, data_path, user, accept, auth) + resp = self.reqs.get_request("sdc", endpoint, data_path, sdc_user=user, accept=accept, auth=auth) self.builtin.should_be_equal_as_strings(resp.status_code, "200") return resp @@ -49,9 +49,9 @@ class BaseSDCKeywords(object): @keyword def run_put_request(self, endpoint, data_path, data, user, accept="application/json", auth=None): """Runs an SDC post request""" - return self.reqs.put_request("sdc", endpoint, data_path, data, user, accept, auth) + return self.reqs.put_request("sdc", endpoint, data_path, data, sdc_user=user, accept=accept, auth=auth) @keyword def run_delete_request(self, endpoint, data_path, data, user, accept="application/json", auth=None): """Runs an SDC delete request""" - return self.reqs.delete_request("sdc", endpoint, data_path, data, user, accept, auth) + return self.reqs.delete_request("sdc", endpoint, data_path, data, sdc_user=user, accept=accept, auth=auth) diff --git a/robotframework-onap/ONAPLibrary/BaseSDNCKeywords.py b/robotframework-onap/ONAPLibrary/BaseSDNCKeywords.py index f335aea..14970ff 100644 --- a/robotframework-onap/ONAPLibrary/BaseSDNCKeywords.py +++ b/robotframework-onap/ONAPLibrary/BaseSDNCKeywords.py @@ -11,8 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from RequestsLibrary import RequestsLibrary -from robot.api import logger + from robot.api.deco import keyword from robot.libraries.BuiltIn import BuiltIn @@ -31,16 +30,16 @@ class BaseSDNCKeywords(object): @keyword def run_get_request(self, endpoint, data_path, accept="application/json", auth=None): """Runs an SDNC get request""" - resp = self.reqs.get_request("sdnc", endpoint, data_path, accept, auth) + resp = self.reqs.get_request("sdnc", endpoint, data_path, sdc_user=None, accept=accept, auth=auth) self.builtin.should_be_equal_as_strings(resp.status_code, "200") return resp @keyword def run_post_request(self, endpoint, data_path, data, accept="application/json", auth=None): """Runs an SDNC post request""" - return self.reqs.post_request("sdnc", endpoint, data_path, data, accept, auth) + return self.reqs.post_request("sdnc", endpoint, data_path, data, sdc_user=None, accept=accept, auth=auth) @keyword def run_put_request(self, endpoint, data_path, data, accept="application/json", auth=None): """Runs an SDNC post request""" - return self.reqs.put_request("sdnc", endpoint, data_path, data, accept, auth)
\ No newline at end of file + return self.reqs.put_request("sdnc", endpoint, data_path, data, sdc_user=None, accept=accept, auth=auth) diff --git a/robotframework-onap/ONAPLibrary/BaseSOKeywords.py b/robotframework-onap/ONAPLibrary/BaseSOKeywords.py index dae3ea6..4e28476 100644 --- a/robotframework-onap/ONAPLibrary/BaseSOKeywords.py +++ b/robotframework-onap/ONAPLibrary/BaseSOKeywords.py @@ -30,16 +30,16 @@ class BaseSOKeywords(object): @keyword def run_get_request(self, endpoint, data_path, accept="application/json", auth=None): """Runs an SO get request""" - resp = self.reqs.get_request("so", endpoint, data_path, accept, auth) + resp = self.reqs.get_request("so", endpoint, data_path, accept=accept, auth=auth) self.builtin.should_be_equal_as_strings(resp.status_code, "200") return resp @keyword def run_post_request(self, endpoint, data_path, data, accept="application/json", auth=None): """Runs an SO post request""" - return self.reqs.post_request("so", endpoint, data_path, data, accept, auth) + return self.reqs.post_request("so", endpoint, data_path, data, accept=accept, auth=auth) @keyword def run_put_request(self, endpoint, data_path, data, accept="application/json", auth=None): """Runs an SO post request""" - return self.reqs.put_request("so", endpoint, data_path, data, accept, auth) + return self.reqs.put_request("so", endpoint, data_path, data, accept=accept, auth=auth) |