if os.path.isdir('{}/charms/layers/{}'.format(package_folder,charmName)):
print('Building charm {}/charms/layers/{}'.format(package_folder, charmName))
self.charm_build(package_folder, charmName)
- print('Charm built'.format(charmName))
+ print('Charm built {}'.format(charmName))
else:
if not os.path.isdir('{}/charms/{}'.format(package_folder,charmName)):
raise ClientException ('The charm: {} referenced in the descriptor file '
ignore_patterns = ('.gitignore')
ignore = shutil.ignore_patterns(ignore_patterns)
directory_name = os.path.abspath("{}/tmp".format(package_folder))
- os.makedirs("{}/{}".format(directory_name, os.path.basename(package_folder),exist_ok=True))
+ os.makedirs("{}/{}".format(directory_name, os.path.basename(package_folder)),exist_ok=True)
self._logger.debug("Makedirs DONE: {}/{}".format(directory_name, os.path.basename(package_folder)))
for item in os.listdir(package_folder):
self._logger.debug("Item: {}".format(item))
if resp:
resp = json.loads(resp)
if not resp or '_id' not in resp:
- raise ClientException('failed to get K8s cluster info: '.format(resp))
+ raise ClientException('failed to get K8s cluster info: {}'.format(resp))
return resp
except NotFound:
raise NotFound("K8s cluster {} not found".format(name))
filter_string = ''
if filter:
filter_string = '&{}'.format(filter)
- http_code, resp = self._http.get2_cmd('{}?nsInstanceId={}'.format(
+ http_code, resp = self._http.get2_cmd('{}?nsInstanceId={}{}'.format(
self._apiBase, ns['_id'],
filter_string) )
#print('HTTP CODE: {}'.format(http_code))
filter_string = ''
if filter:
filter_string = '&{}'.format(filter)
- http_code, resp = self._http.get2_cmd('{}?netsliceInstanceId={}'.format(
+ http_code, resp = self._http.get2_cmd('{}?netsliceInstanceId={}{}'.format(
self._apiBase, nsi['_id'],
filter_string) )
#print('HTTP CODE: {}'.format(http_code))
if resp:
resp = json.loads(resp)
if not resp or 'id' not in resp:
- raise ClientException('unexpected response from server: '.format(
+ raise ClientException('unexpected response from server: {}'.format(
resp))
print(resp['id'])
#else:
if resp:
resp = json.loads(resp)
if not resp or '_id' not in resp:
- raise ClientException('failed to get repo info: '.format(resp))
+ raise ClientException('failed to get repo info: {}'.format(resp))
return resp
except NotFound:
raise NotFound("Repo {} not found".format(name))
filter_string = ''
if filter:
filter_string = '?{}'.format(filter)
- _, resp = self._http.get2_cmd('{}{}'.format(self._apiBase,filter_string,skip_query_admin=True))
+ _, resp = self._http.get2_cmd('{}{}'.format(self._apiBase,filter_string), skip_query_admin=True)
#print('RESP: {}'.format(resp))
if resp:
return json.loads(resp)
if resp:
resp = json.loads(resp)
if not resp or 'id' not in resp:
- raise ClientException('unexpected response from server: '.format(resp))
+ raise ClientException('unexpected response from server: {}'.format(resp))
print(resp['id'])
elif http_code == 204:
print('Updated')
if resp:
resp = json.loads(resp)
if not resp or '_id' not in resp:
- raise ClientException('failed to get wim info: '.format(resp))
+ raise ClientException('failed to get wim info: {}'.format(resp))
return resp
except NotFound:
raise NotFound("wim '{}' not found".format(name))