--- /dev/null
+from six.moves import urllib
+from robot.api.deco import keyword
+
+
+class HTTPKeywords(object):
+ """HTTPKeywords is common resource for simple http helper keywords."""
+ def __init__(self):
+ super(HTTPKeywords, self).__init__()
+
+ @keyword
+ def url_encode_string(self, barestring):
+ """URL Encode String takes in a string and converts it into fully 'percent-encoded' string"""
+ return urllib.parse.quote(barestring)
+
+ @keyword
+ def url_parse(self, url):
+ """ Get pieces of the URL """
+ return urllib.parse.urlparse(url)
from ONAPLibrary.DNSKeywords import DNSKeywords
from ONAPLibrary.SocketKeywords import SocketKeywords
from ONAPLibrary.UUIDKeywords import UUIDKeywords
+from ONAPLibrary.HTTPKeywords import HTTPKeywords
class Utilities(HybridCore):
self.keyword_implementors = [
DNSKeywords(),
SocketKeywords(),
- UUIDKeywords()
+ UUIDKeywords(),
+ HTTPKeywords()
]
HybridCore.__init__(self, self.keyword_implementors)
+++ /dev/null
-from six.moves.urllib.parse import urlparse
-from six.moves import urllib
-
-import urllib3
-
-
-class HTTPUtils:
- """HTTPUtils is common resource for simple http helper keywords."""
-
- def url_encode_string(self, barestring):
- """URL Encode String takes in a string and converts it into fully 'percent-encoded' string"""
- return urllib.parse.quote(barestring)
-
- def disable_warnings(self):
- """ Disable all warnings when creating sessions """
- urllib3.disable_warnings()
-
- def url_parse(self, url):
- """ Get pieces of the URL """
- return urlparse(url)
+++ /dev/null
-from sys import platform
-
-class OSUtils:
- """ Utilities useful for constructing OpenStack HEAT requests """
-
- def get_normalized_os(self):
- os = platform
- if platform == "linux" or platform == "linux2":
- os = 'linux64'
- elif platform == "darwin":
- os = 'mac64'
- elif platform == "win32":
- os = platform
- return os