diff options
author | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-03-24 13:09:34 +0100 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-03-24 13:09:34 +0100 |
commit | bba7ed02826fa1f33189eb1d2d43c74a0d45fe83 (patch) | |
tree | ed72ddf5f1b7f9afc145c78a2e7eaf149a37e8ba | |
parent | 3069ed97314d524296e31fab39833d4af9cf1e19 (diff) |
Fix indentation issues as reported by pylint
Change-Id: I96c57d08d0030b48a9377eb05c077e26241870a6
Issue-ID: INT-1482
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
4 files changed, 44 insertions, 44 deletions
diff --git a/tutorials/vFWDT/workflow/workflow.py b/tutorials/vFWDT/workflow/workflow.py index 0b2b6039..dd15e817 100755 --- a/tutorials/vFWDT/workflow/workflow.py +++ b/tutorials/vFWDT/workflow/workflow.py @@ -975,27 +975,27 @@ def _execute_lcm_requests(workflow, onap_ip, check_result): lcm_requests = workflow["requests"] print("WORKFLOW << {} >>".format(workflow["description"])) for i in range(len(lcm_requests)): - req = lcm_requests[i]["payload"] - #print(json.dumps(req, indent=4)) - print("APPC LCM << {} >> [{}]".format(req['input']['action'], lcm_requests[i]["description"])) - _set_appc_lcm_timestamp(req) - conf_result = False - result = appc_lcm_request(onap_ip, req) - print("Result {}".format(result)) - - if result == 100: - conf_result = confirm_appc_lcm_action(onap_ip, req, check_result) - #time.sleep(30) - elif result == 400: - conf_result = True - - if not conf_result: - if lcm_requests[i]["breakOnFailure"]: - raise Exception("APPC LCM << {} >> FAILED".format(req['input']['action'])) - elif "workflow" in lcm_requests[i]: - print("WORKFLOW << {} >> SKIP".format(lcm_requests[i]["workflow"]["description"])) - elif "workflow" in lcm_requests[i]: - _execute_lcm_requests(lcm_requests[i]["workflow"], onap_ip, check_result) + req = lcm_requests[i]["payload"] + #print(json.dumps(req, indent=4)) + print("APPC LCM << {} >> [{}]".format(req['input']['action'], lcm_requests[i]["description"])) + _set_appc_lcm_timestamp(req) + conf_result = False + result = appc_lcm_request(onap_ip, req) + print("Result {}".format(result)) + + if result == 100: + conf_result = confirm_appc_lcm_action(onap_ip, req, check_result) + #time.sleep(30) + elif result == 400: + conf_result = True + + if not conf_result: + if lcm_requests[i]["breakOnFailure"]: + raise Exception("APPC LCM << {} >> FAILED".format(req['input']['action'])) + elif "workflow" in lcm_requests[i]: + print("WORKFLOW << {} >> SKIP".format(lcm_requests[i]["workflow"]["description"])) + elif "workflow" in lcm_requests[i]: + _execute_lcm_requests(lcm_requests[i]["workflow"], onap_ip, check_result) def _generate_cdt_artifact_request(req_id, artifact, action, vnfc_type): diff --git a/vnfs/DAaaS/lib/promql_api/prom_ql_api.py b/vnfs/DAaaS/lib/promql_api/prom_ql_api.py index 2ee273a0..8ebec6be 100644 --- a/vnfs/DAaaS/lib/promql_api/prom_ql_api.py +++ b/vnfs/DAaaS/lib/promql_api/prom_ql_api.py @@ -154,7 +154,7 @@ def query_range(map_of_parameters): LOG.error("::::ERROR:::: {}".format(response.json()['error'])) print(f'Check logs..HTTP error occurred: {http_err}') except Exception as err: - print(f'Check logs..Other error occurred: {err}') + print(f'Check logs..Other error occurred: {err}') else: if response.json()['status'] == "error": LOG.error("::::ERROR OCCURED!::::") diff --git a/vnfs/DAaaS/sample-apps/m3db_promql/build/sample_promql_query.py b/vnfs/DAaaS/sample-apps/m3db_promql/build/sample_promql_query.py index 844189bd..80149636 100644 --- a/vnfs/DAaaS/sample-apps/m3db_promql/build/sample_promql_query.py +++ b/vnfs/DAaaS/sample-apps/m3db_promql/build/sample_promql_query.py @@ -29,20 +29,20 @@ MAP_OF_PARAMETERS = {'query': 'up', 'start': '2019-06-19T20:10:30.781Z', 'end': #MAP_OF_PARAMETERS = {'query': 'up', 'start': '2019-06-19T20:10:30.781Z', 'end': '2019-06-19T20:10:45.781Z', 'step': '15s', 'timeout':'600s'} def demo_query(): - list_of_result_sets = query(QUERY_STRING) - if list_of_result_sets: - for each_result in list_of_result_sets: - pprint.pprint(each_result) + list_of_result_sets = query(QUERY_STRING) + if list_of_result_sets: + for each_result in list_of_result_sets: + pprint.pprint(each_result) def demo_query_range(): - list_of_result_sets = query_range(MAP_OF_PARAMETERS) - pprint.pprint(list_of_result_sets) + list_of_result_sets = query_range(MAP_OF_PARAMETERS) + pprint.pprint(list_of_result_sets) def main(): - demo_query() - demo_query_range() + demo_query() + demo_query_range() if __name__ == "__main__": - main() + main() diff --git a/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py b/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py index 6565e43a..9c878d34 100644 --- a/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py +++ b/vnfs/VES5.0/evel/evel-test-collector/code/collector/collector.py @@ -468,25 +468,25 @@ USAGE backupCount=10) if (transport_prot.lower() == 'https' ): - transport_prot = transport_prot.lower() - ca_file = config.get(config_section, 'ca_file', vars=overrides) - cert_file = config.get(config_section, 'cert_file', vars=overrides) - key_file = config.get(config_section, 'key_file', vars=overrides) - if not os.path.exists(ca_file): + transport_prot = transport_prot.lower() + ca_file = config.get(config_section, 'ca_file', vars=overrides) + cert_file = config.get(config_section, 'cert_file', vars=overrides) + key_file = config.get(config_section, 'key_file', vars=overrides) + if not os.path.exists(ca_file): logger.error('Event Listener SSL CA File ({0}) not found. ' - 'No validation will be undertaken.'.format(ca_file)) + 'No validation will be undertaken.'.format(ca_file)) raise RuntimeError('Invalid CA file ({0}) ' - 'specified'.format(ca_file)) - if not os.path.exists(cert_file): + 'specified'.format(ca_file)) + if not os.path.exists(cert_file): logger.error('Event Listener SSL Certificate File ({0}) not found. ' - 'No validation will be undertaken.'.format(cert_file)) + 'No validation will be undertaken.'.format(cert_file)) raise RuntimeError('Invalid Certificate file ({0}) ' - 'specified'.format(cert_file)) - if not os.path.exists(key_file): + 'specified'.format(cert_file)) + if not os.path.exists(key_file): logger.error('Event Listener SSL Key File ({0}) not found. ' - 'No validation will be undertaken.'.format(key_file)) + 'No validation will be undertaken.'.format(key_file)) raise RuntimeError('Invalid Key file ({0}) ' - 'specified'.format(key_file)) + 'specified'.format(key_file)) if (platform.system() == 'Windows'): date_format = '%Y-%m-%d %H:%M:%S' |