diff options
author | Jerry Flood <jflood@att.com> | 2019-04-03 14:21:32 -0400 |
---|---|---|
committer | Jerry Flood <jflood@att.com> | 2019-04-03 14:27:29 -0400 |
commit | 095d92cc621be9050900df1c9729b647ce93557f (patch) | |
tree | 42c07a686604f1d933cec7b9ad40fbe1d52cc570 /cmso-service/src | |
parent | c1f470829573d967756d88fb5eff87082528829b (diff) |
fixes for passing policy
Issue-ID: OPTFRA-436
Change-Id: I6b69cf890ad5f17b7546e411316001215406667b
Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-service/src')
-rw-r--r-- | cmso-service/src/main/java/org/onap/optf/cmso/optimizer/CmsoOptimizerClient.java | 8 | ||||
-rw-r--r-- | cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/optimizer/CmsoOptimizerClient.java b/cmso-service/src/main/java/org/onap/optf/cmso/optimizer/CmsoOptimizerClient.java index ff27937..4fd0164 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/optimizer/CmsoOptimizerClient.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/optimizer/CmsoOptimizerClient.java @@ -181,8 +181,12 @@ public class CmsoOptimizerClient { // Scheduled with optimizer break; case 200: - debug.debug("Successfully completed optimization: " + schedule.getScheduleId()); - // Scheduled with optimizer + String optimizerResponseString = response.readEntity(String.class); + ObjectMapper om = new ObjectMapper(); + OptimizerResponse optimizerResponse = + om.readValue(optimizerResponseString, OptimizerResponse.class); + debug.debug("Successfully retrieved optimization: " + schedule.getScheduleId()); + optimizerHandler.handleOptimizerResponse(optimizerResponse, schedule); break; case 400: { schedule.setOptimizerDateTimeMillis(System.currentTimeMillis()); diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java index 4fccf7e..9b3785a 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java @@ -233,6 +233,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService { List<PolicyInfo> policies = new ArrayList<>(); PolicyInfo policyInfo = new PolicyInfo(); policyInfo.setPolicyName(sinfo.getPolicyId()); + policies.add(policyInfo); sd.setPolicies(policies); List<VnfDetailsMessage> details = sinfo.getVnfDetails(); |