X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=mod%2Fdistributorapi%2Fdistributor%2Fruntime_client.py;fp=mod%2Fdistributorapi%2Fdistributor%2Fruntime_client.py;h=2fc2ccdfea05427452e6d2b29f5aa512bcbf1cf8;hb=56591bbb09719e040b15cc8842e4bf6b18e28962;hp=7cd06ae32a794171520c4ee8ff80084f8136c590;hpb=743c1d1034101fa676e98b6ffbf39592e2ca8b20;p=dcaegen2%2Fplatform.git diff --git a/mod/distributorapi/distributor/runtime_client.py b/mod/distributorapi/distributor/runtime_client.py index 7cd06ae..2fc2ccd 100644 --- a/mod/distributorapi/distributor/runtime_client.py +++ b/mod/distributorapi/distributor/runtime_client.py @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2019-2022 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,8 +29,7 @@ def get_graph(runtime_url, graph_id): def create_graph(runtime_url, graph_id, graph_name): url = urljoin(runtime_url, "api/graph/main") - resp = reqs.post(url, json={"name": graph_name, "id": graph_id - , "description": "", "main": True}) + resp = reqs.post(url, json={"name": graph_name, "id": graph_id, "description": "", "main": True}) try: resp.raise_for_status() @@ -60,6 +59,7 @@ def post_graph(runtime_url, graph_id, actions): except Exception as e: with open("runtime-request-failed.json", "w+") as f: import json + json.dump(graph_request, f) raise errors.DistributorAPIError(e)