aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChayal, Avteet (ac229e) ac229e@att.com <ac229e@att.com>2018-04-04 21:39:12 -0400
committerChayal, Avteet (ac229e) ac229e@att.com <ac229e@att.com>2018-04-04 21:54:32 -0400
commit43eb254bf347be1a2fd5bed08b87ec87c8bd0376 (patch)
tree25a5c656953f3f6457347cd20f643f2aef75fd0c
parent18f4b39e666065dd244cd88ffd2d2daf0875bad4 (diff)
OPTFRA-214-requestState should be requestStatus
Fixed async response for placementDemand only scenario. Issue-ID: OPTFRA-214 Change-Id: Ia9bdced85a874fd19e74b53e52702d45b3c67052 Signed-off-by: Chayal, Avteet (ac229e) ac229e@att.com <ac229e@att.com>
-rw-r--r--osdf/optimizers/placementopt/conductor/conductor.py6
-rwxr-xr-xosdf/templates/plc_opt_response.jsont2
2 files changed, 4 insertions, 4 deletions
diff --git a/osdf/optimizers/placementopt/conductor/conductor.py b/osdf/optimizers/placementopt/conductor/conductor.py
index 663857b..682f606 100644
--- a/osdf/optimizers/placementopt/conductor/conductor.py
+++ b/osdf/optimizers/placementopt/conductor/conductor.py
@@ -154,7 +154,7 @@ def conductor_response_processor(conductor_response, raw_response, req_id):
debug_log.debug("The key[{}] is not mapped and will not be returned in assignment info".format(key))
composite_solutions.append(solution)
- request_state = conductor_response['plans'][0]['status']
+ request_status = conductor_response['plans'][0]['status']
transaction_id = raw_response.headers.get('transaction_id', "")
status_message = conductor_response.get('plans')[0].get('message', "")
@@ -166,7 +166,7 @@ def conductor_response_processor(conductor_response, raw_response, req_id):
resp = {
"transactionId": transaction_id,
"requestId": req_id,
- "requestState": request_state,
+ "requestStatus": request_status,
"statusMessage": status_message,
"solutions": solution_info
}
@@ -188,6 +188,6 @@ def conductor_no_solution_processor(conductor_response, raw_response, request_id
templ = Template(open(template_placement_response).read())
return json.loads(templ.render(composite_solutions=[], requestId=request_id, license_solutions=[],
transactionId=raw_response.headers.get('transaction_id', ""),
- requestState="completed", statusMessage=status_message, json=json))
+ requestStatus="completed", statusMessage=status_message, json=json))
diff --git a/osdf/templates/plc_opt_response.jsont b/osdf/templates/plc_opt_response.jsont
index 2bd9f71..e5709e7 100755
--- a/osdf/templates/plc_opt_response.jsont
+++ b/osdf/templates/plc_opt_response.jsont
@@ -1,7 +1,7 @@
{
"requestId": "{{requestId}}",
"transactionId": "{{transacationId}}",
- "requestState": "{{requestState}}",
+ "requestStatus": "{{requestStatus}}",
"statusMessage": "{{statusMessage}}"
"solutions": {
"placementSolutions": {{ json.dumps(composite_solutions) }},