Clean up PcepOperations
[integration/test.git] / csit / libraries / UtilLibrary.py
index 11eb79733a361631a01bbb7e2428e3120ea2df60..6f65fd2061595c2be806a6bebeacd36dce56d465 100644 (file)
@@ -103,7 +103,7 @@ def delete(url, userId="admin", password="admin"):
 
 def Should_Not_Be_Type_None(var):
     """Keyword to check if the given variable is of type NoneType.  If the
-        variable type does match  raise an assertion so the keyword will fail
+    variable type does match  raise an assertion so the keyword will fail
     """
     if var is None:
         raise AssertionError("the variable passed was type NoneType")
@@ -229,7 +229,7 @@ def kill_controller(ip, username, password, karafHome):
 
 
 def isolate_controller(controllers, username, password, isolated):
-    """ Isolate one controller from the others in the cluster
+    """Isolate one controller from the others in the cluster
 
     :param controllers: A list of ip addresses or host names as strings.
     :param username: Username for the controller to be isolated.
@@ -264,13 +264,13 @@ def isolate_controller(controllers, username, password, isolated):
     iso_result = "pass"
     for controller in controllers:
         controller_regex_string = (
-            "[\s\S]*" + isolated_controller + " *" + controller + "[\s\S]*"
+            r"[\s\S]*" + isolated_controller + " *" + controller + r"[\s\S]*"
         )
         controller_regex = re.compile(controller_regex_string)
         if not controller_regex.match(ip_tables):
             iso_result = ip_tables
         controller_regex_string = (
-            "[\s\S]*" + controller + " *" + isolated_controller + "[\s\S]*"
+            r"[\s\S]*" + controller + " *" + isolated_controller + r"[\s\S]*"
         )
         controller_regex = re.compile(controller_regex_string)
         if not controller_regex.match(ip_tables):
@@ -279,7 +279,7 @@ def isolate_controller(controllers, username, password, isolated):
 
 
 def rejoin_controller(controllers, username, password, isolated):
-    """ Return an isolated controller to the cluster.
+    """Return an isolated controller to the cluster.
 
     :param controllers: A list of ip addresses or host names as strings.
     :param username: Username for the isolated controller.
@@ -314,13 +314,13 @@ def rejoin_controller(controllers, username, password, isolated):
     iso_result = "pass"
     for controller in controllers:
         controller_regex_string = (
-            "[\s\S]*" + isolated_controller + " *" + controller + "[\s\S]*"
+            r"[\s\S]*" + isolated_controller + " *" + controller + r"[\s\S]*"
         )
         controller_regex = re.compile(controller_regex_string)
         if controller_regex.match(ip_tables):
             iso_result = ip_tables
         controller_regex_string = (
-            "[\s\S]*" + controller + " *" + isolated_controller + "[\s\S]*"
+            r"[\s\S]*" + controller + " *" + isolated_controller + r"[\s\S]*"
         )
         controller_regex = re.compile(controller_regex_string)
         if controller_regex.match(ip_tables):