Make karaf logout more stable
[integration/test.git] / csit / libraries / SettingsLibrary.py
index e47c420707a3fc9c6feed7a99273fce5dded08ec..7e22ade8d8b991638bb0fb1ef3ef9bc9068a1e05 100644 (file)
@@ -1,14 +1,15 @@
-__author__ = "Basheeruddin Ahmed"
-__copyright__ = "Copyright(c) 2014, Cisco Systems, Inc."
-__license__ = "New-style BSD"
-__email__ = "syedbahm@cisco.com"
-
 from string import Template
 
 # helps in taking the hostname entered by the user
 # global hostname
 # global port
 
+__author__ = "Basheeruddin Ahmed"
+__copyright__ = "Copyright(c) 2014, Cisco Systems, Inc."
+__license__ = "New-style BSD"
+__email__ = "syedbahm@cisco.com"
+
+
 # def setHostname(host):
 #     hostname=host
 
@@ -58,14 +59,24 @@ def getAddCarPersonUrl(hostname, port):
 
 def getBuyCarRpcUrl(hostname, port):
     """POST URL for buy car rpc"""
-    return "http://" + hostname + ":" + port + "/restconf/operations/car-purchase:buy-car"
+    return (
+        "http://" + hostname + ":" + port + "/restconf/operations/car-purchase:buy-car"
+    )
 
 
 def getJolokiaURL(hostname, port, shardIndex, shardName):
     """GET URL for jolokia"""
-    return "http://" + hostname + ":" + port + \
-        "/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-" + \
-        shardIndex + "-" + shardName + ",type=DistributedConfigDatastore"
+    return (
+        "http://"
+        + hostname
+        + ":"
+        + port
+        + "/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-"
+        + shardIndex
+        + "-"
+        + shardName
+        + ",type=DistributedConfigDatastore"
+    )
 
 
 # Template for Car init resource payload
@@ -82,7 +93,8 @@ add_car_init_payload_template = Template(
             }
         ]
     }}
-    """)
+    """
+)
 
 # Template for Car resource payload
 add_car_payload_template = Template(
@@ -97,7 +109,8 @@ add_car_payload_template = Template(
             }
         ]
     }
-    """)
+    """
+)
 
 # Template for Person resource payload
 add_person_payload_template = Template(
@@ -113,7 +126,8 @@ add_person_payload_template = Template(
             }
         ]
     }}
-    """)
+    """
+)
 
 # Template for Car Person mapping  payload
 add_car_person_template = Template(
@@ -126,7 +140,8 @@ add_car_person_template = Template(
             }
         ]
     }}
-    """)
+    """
+)
 
 # Template for adding person using RPC
 add_person_rpc_payload_template = Template(
@@ -141,7 +156,8 @@ add_person_rpc_payload_template = Template(
                 "people:age":"$age"
             }
     }
-    """)
+    """
+)
 
 # Template for buing car rpc
 buy_car_rpc_template = Template(
@@ -154,4 +170,5 @@ buy_car_rpc_template = Template(
             "car-purchase:car-id" : "$carId"
         }
     }
-    """)
+    """
+)