VIRL test: Replace IP probe for VXLAN test
[csit.git] / resources / libraries / python / HTTPRequest.py
index fd2925c..1f5df52 100644 (file)
@@ -32,9 +32,11 @@ from requests.auth import HTTPBasicAuth
 class HTTPCodes(IntEnum):
     """HTTP status codes"""
     OK = 200
+    ACCEPTED = 201
     UNAUTHORIZED = 401
     FORBIDDEN = 403
     NOT_FOUND = 404
+    INTERNAL_SERVER_ERROR = 500
     SERVICE_UNAVAILABLE = 503
 
 
@@ -108,7 +110,7 @@ class HTTPRequest(object):
         :type ip_addr: str
         :type port: str or int
         :type path: str
-        :return: full url
+        :return: Full url.
         :rtype: str
         """
         return "http://{ip}:{port}{path}".format(ip=ip_addr, port=port,
@@ -155,7 +157,7 @@ class HTTPRequest(object):
         :type path: str
         :type enable_logging: bool
         :type kwargs: dict
-        :return: Status code and content of response
+        :return: Status code and content of response.
         :rtype: tuple
         :raises HTTPRequestError: If
         1. it is not possible to connect,