Change-Id: I3f76a82d276c75f20453a9306b4f9964d90b5179
Issue-ID: INT-1482
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
m_value = None
rel_dict = data.get(rel_lst)
if rel_dict: # check if data has relationship lists
m_value = None
rel_dict = data.get(rel_lst)
if rel_dict: # check if data has relationship lists
- for key, rel_list in rel_dict.items():
+ for key, rel_list in rel_dict.items(): # pylint: disable=W0612
for rel in rel_list:
if rel.get("related-to") == related_to:
dval = None
for rel in rel_list:
if rel.get("related-to") == related_to:
dval = None
#print(json.dumps(template, indent=4))
with _no_ssl_verification():
#print(json.dumps(template, indent=4))
with _no_ssl_verification():
- response = api.osdf.placement(body=template, params={}, headers={})
+ response = api.osdf.placement(body=template, params={}, headers={}) # pylint: disable=W0612
#if response.body.get('error_message') is not None:
# raise Exception(response.body['error_message']['explanation'])
#if response.body.get('error_message') is not None:
# raise Exception(response.body['error_message']['explanation'])
v_server['vserver-name'] = v_server['vserver-name'].replace("01", "02")
hostname_cache.append(v_server['vserver-name'])
v_server['vserver-name'] = v_server['vserver-name'].replace("01", "02")
hostname_cache.append(v_server['vserver-name'])
- api = _init_python_aai_api(onap_ip)
+ api = _init_python_aai_api(onap_ip) # pylint: disable=W0612
vnfc_type = demand.lower()
# with _no_ssl_verification():
# response = api.aai.vnfc(v_server['vserver-name'], body=None, params={}, headers={})
vnfc_type = demand.lower()
# with _no_ssl_verification():
# response = api.aai.vnfc(v_server['vserver-name'], body=None, params={}, headers={})
for action_artifact in artifacts[action]:
artifact_list.append({'artifact-name': action_artifact['name'], 'artifact-type': action_artifact['type']})
if action != 'AllAction':
for action_artifact in artifacts[action]:
artifact_list.append({'artifact-name': action_artifact['name'], 'artifact-type': action_artifact['type']})
if action != 'AllAction':
- req = _generate_cdt_artifact_request(req_id, action_artifact, action, vnfc_type)
+ req = _generate_cdt_artifact_request(req_id, action_artifact, action, vnfc_type) # pylint: disable=W0612
#print(json.dumps(req, indent=4))
#print(json.dumps(action_info, indent=4))
#print(json.dumps(req, indent=4))
#print(json.dumps(action_info, indent=4))
- except Exception as e:
- #print("Error during producing to kafka topic. Stacktrace is %s",e)
logging.error("Error during producing to kafka topic.")
traceback.print_exc()
logging.error("Error during producing to kafka topic.")
traceback.print_exc()
- client.stat_object(bucket_name, model);
+ client.stat_object(bucket_name, model)
found = True
except Exception as err:
found = False
found = True
except Exception as err:
found = False
if not found:
try:
client.fput_object(bucket_name, model, filepath, metadata=metadata)
if not found:
try:
client.fput_object(bucket_name, model, filepath, metadata=metadata)
- except expression as identifier:
+ except Exception as identifier: