X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fk8scluster.py;h=ff6822e256c2511424399e981a7a5819a39a7c0f;hb=cca4acdd2d0c55f5d1d38a4753e5722a2fafb5fa;hp=a0b95e0c7669f9cb91853bde05a043cb5a25181a;hpb=e7c24981a7021176e68ee87998c86d21e87f548e;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/k8scluster.py b/osmclient/sol005/k8scluster.py index a0b95e0..ff6822e 100644 --- a/osmclient/sol005/k8scluster.py +++ b/osmclient/sol005/k8scluster.py @@ -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: