feature: sol004 and sol007
[osm/osmclient.git] / osmclient / sol005 / k8scluster.py
index a0b95e0..ff6822e 100644 (file)
@@ -47,7 +47,9 @@ class K8scluster(object):
         self._logger.debug("")
         self._client.get_token()
         # Endpoint to get operation status
-        apiUrlStatus = "{}{}{}".format(self._apiName, self._apiVersion, self._apiResource)
+        apiUrlStatus = "{}{}{}".format(
+            self._apiName, self._apiVersion, self._apiResource
+        )
         # Wait for status for VIM instance creation/deletion
         if isinstance(wait_time, bool):
             wait_time = WaitForStatus.TIMEOUT_VIM_OPERATION
@@ -70,8 +72,8 @@ class K8scluster(object):
             endpoint=self._apiBase, postfields_dict=k8s_cluster
         )
 
-        self._logger.debug('HTTP CODE: {}'.format(http_code))
-        self._logger.debug('RESP: {}'.format(resp))
+        self._logger.debug("HTTP CODE: {}".format(http_code))
+        self._logger.debug("RESP: {}".format(resp))
 
         if resp:
             resp = json.loads(resp)
@@ -107,8 +109,8 @@ class K8scluster(object):
             wait_id = cluster["_id"]
             self._wait(wait_id, wait)
 
-        self._logger.debug('HTTP CODE: {}'.format(http_code))
-        self._logger.debug('RESP: {}'.format(resp))
+        self._logger.debug("HTTP CODE: {}".format(http_code))
+        self._logger.debug("RESP: {}".format(resp))
 
         if http_code in (200, 201, 202, 204):
             print("Updated")
@@ -119,7 +121,9 @@ class K8scluster(object):
                     msg = json.loads(resp)
                 except ValueError:
                     msg = resp
-            raise ClientException("failed to update K8s cluster {} - {}".format(name, msg))
+            raise ClientException(
+                "failed to update K8s cluster {} - {}".format(name, msg)
+            )
 
     def get_id(self, name):
         """Returns a K8s cluster id from a K8s cluster name"""
@@ -140,8 +144,8 @@ class K8scluster(object):
             "{}/{}{}".format(self._apiBase, cluster_id, querystring)
         )
 
-        self._logger.debug('HTTP CODE: {}'.format(http_code))
-        self._logger.debug('RESP: {}'.format(resp))
+        self._logger.debug("HTTP CODE: {}".format(http_code))
+        self._logger.debug("RESP: {}".format(resp))
 
         if http_code == 202:
             if wait: