summaryrefslogtreecommitdiffstats
path: root/osdfapp.py
diff options
context:
space:
mode:
authorChayal, Avteet (ac229e) ac229e@att.com <ac229e@att.com>2018-04-04 22:24:18 -0400
committerChayal, Avteet (ac229e) ac229e@att.com <ac229e@att.com>2018-04-05 22:04:44 -0400
commit3a7fa64c8995642dbd2a5696eb8511adc65f2f5d (patch)
tree469a73bdce6a421e69e5ba2e75972decfac170f1 /osdfapp.py
parent43eb254bf347be1a2fd5bed08b87ec87c8bd0376 (diff)
Fix for placement call check and sync response
Fixed the condition to make placement call & sync response to client Issue-ID: OPTFRA-215 and OPTFRA-216 Change-Id: I0f996160e8cd339c663611ba53bd590271ea3b3a Signed-off-by: Chayal, Avteet (ac229e) ac229e@att.com <ac229e@att.com>
Diffstat (limited to 'osdfapp.py')
-rwxr-xr-xosdfapp.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/osdfapp.py b/osdfapp.py
index 62062fc..09a89b0 100755
--- a/osdfapp.py
+++ b/osdfapp.py
@@ -45,6 +45,7 @@ from requests import RequestException
from schematics.exceptions import DataError
from osdf.logging.osdf_logging import MH, audit_log, error_log, debug_log
from osdf.models.api.placementRequest import PlacementAPI
+from osdf.operation.responses import osdf_response_for_request_accept as req_accept
ERROR_TEMPLATE = osdf.ERROR_TEMPLATE
@@ -116,11 +117,9 @@ def do_placement_opt():
t = Thread(target=process_placement_opt, args=(request_json, policies, osdf_config))
t.start()
audit_log.info(MH.accepted_valid_request(req_id, request))
- return osdf.operation.responses.osdf_response_for_request_accept(request_id=req_id,
- transaction_id=request_json['transactionId'],
- request_status="accepted",
- status_message="")
-
+ return req_accept(request_id=req_id,
+ transaction_id=request_json['requestInfo']['transactionId'],
+ request_status="accepted", status_message="")
@app.errorhandler(500)
def internal_failure(error):