summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorumry8364 <morgan.richomme@orange.com>2019-09-10 16:00:21 +0200
committerumry8364 <morgan.richomme@orange.com>2019-09-10 16:51:27 +0200
commit12b24d73e63a863df2ac8eb5f27c9b70722fa926 (patch)
treeefc74662b585ead3259de05002167b6ac7815dd6
parenta219ba9f57a34bca05d15762fd0f2b96cfc4ce85 (diff)
add more-itertools in requirements (not only in test-requirements)
+ fix pep8 errors Issue-ID: INT-1228 Change-Id: I26c46462f08b33d81d657d80497ba3d27db9242c Signed-off-by: mrichomme <morgan.richomme@orange.com>
-rw-r--r--robotframework-onap/ONAPLibrary/CloudConfigSOKeywords.py45
-rw-r--r--robotframework-onap/requirements.txt1
2 files changed, 35 insertions, 11 deletions
diff --git a/robotframework-onap/ONAPLibrary/CloudConfigSOKeywords.py b/robotframework-onap/ONAPLibrary/CloudConfigSOKeywords.py
index 95d68c7..a07f582 100644
--- a/robotframework-onap/ONAPLibrary/CloudConfigSOKeywords.py
+++ b/robotframework-onap/ONAPLibrary/CloudConfigSOKeywords.py
@@ -18,9 +18,9 @@ from robot.api.deco import keyword
from robot.libraries.BuiltIn import BuiltIn
-class CloudConfigSOKeywords(object):
- """SO is an ONAP testing library for Robot Framework that provides functionality for interacting with the serivce
- orchestrator. """
+class CloudConfigSOKeywords():
+ """SO is an ONAP testing library for Robot Framework that provides
+ functionality for interacting with the service orchestrator. """
def __init__(self):
super(CloudConfigSOKeywords, self).__init__()
@@ -31,24 +31,47 @@ class CloudConfigSOKeywords(object):
@keyword
def get_cloud_configuration(self, endpoint, data_path, site_name, auth=None):
"""Gets cloud configuration in SO"""
- return self.reqs.get_request(alias="so", endpoint=endpoint, data_path=data_path + "/" + site_name, auth=auth)
+ return self.reqs.get_request(
+ alias="so",
+ endpoint=endpoint,
+ data_path=data_path + "/" + site_name,
+ auth=auth)
@keyword
- def create_cloud_configuration(self, endpoint, data_path, templates_folder, template, arguments, auth=None):
- """Creates a cloud configuration in SO, so it knows how to talk to an openstack cloud"""
+ def create_cloud_configuration(self, endpoint, data_path, templates_folder,
+ template, arguments, auth=None):
+ """Creates a cloud configuration in SO
+ so it knows how to talk to an openstack cloud"""
self.templating.create_environment("so", templates_folder)
data = self.templating.apply_template("so", template, arguments)
- resp = self.reqs.post_request(alias="so", endpoint=endpoint, data_path=data_path, data=data, auth=auth)
+ resp = self.reqs.post_request(
+ alias="so",
+ endpoint=endpoint,
+ data_path=data_path,
+ data=data,
+ auth=auth)
self.builtin.should_match_regexp(str(resp.status_code), "^(201|200)$")
@keyword
- def upsert_cloud_configuration(self, endpoint, data_path, templates_folder, template, arguments, auth=None):
+ 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'], auth=auth)
+ 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)
+ 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 + "/" + arguments['site_name'], 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)$")
diff --git a/robotframework-onap/requirements.txt b/robotframework-onap/requirements.txt
index d82ec25..642fd19 100644
--- a/robotframework-onap/requirements.txt
+++ b/robotframework-onap/requirements.txt
@@ -17,3 +17,4 @@ robotframework-requests
robotlibcore-temp
six
urllib3
+more-itertools~=5.0.0