summaryrefslogtreecommitdiffstats
path: root/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java')
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java29
1 files changed, 17 insertions, 12 deletions
diff --git a/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java b/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java
index ad0884b94..400dadb34 100644
--- a/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java
+++ b/appc-dg/appc-dg-shared/appc-dg-common/src/main/java/org/onap/appc/dg/common/impl/LegacyUtilImpl.java
@@ -25,28 +25,33 @@
package org.onap.appc.dg.common.impl;
import java.util.Map;
-
import org.onap.appc.dg.common.LegacyUtil;
import org.onap.appc.dg.common.utils.JSONUtil;
import org.onap.appc.exceptions.APPCException;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
-
public class LegacyUtilImpl implements LegacyUtil {
- @Override public void prepareRequest(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
- ctx.setAttribute(Constants.LegacyAttributes.Action.getValue(), ctx.getAttribute(Constants.LCMAttributes.Action.getValue()).toLowerCase());
+ @Override
+ public void prepareRequest(Map<String, String> params, SvcLogicContext ctx) throws APPCException {
+ ctx.setAttribute(Constants.LegacyAttributes.Action.getValue(),
+ ctx.getAttribute(Constants.LCMAttributes.Action.getValue()).toLowerCase());
String payloadStr = ctx.getAttribute(Constants.LCMAttributes.Payload.getValue());
- Map<String,String> payloads = JSONUtil.extractPlainValues(payloadStr,
- Constants.LCMAttributes.VMID.getValue(), Constants.LCMAttributes.IdentityURL.getValue(), Constants.LCMAttributes.TenantID.getValue(),
- Constants.LCMAttributes.SkipHypervisorCheck.getValue());
-
- ctx.setAttribute(Constants.LegacyAttributes.VMID.getValue(), payloads.get(Constants.LCMAttributes.VMID.getValue()));
- ctx.setAttribute(Constants.LegacyAttributes.IdentityURL.getValue(), payloads.get(Constants.LCMAttributes.IdentityURL.getValue()));
- ctx.setAttribute(Constants.LegacyAttributes.TenantID.getValue(), payloads.get(Constants.LCMAttributes.TenantID.getValue()));
- ctx.setAttribute(Constants.LegacyAttributes.SkipHypervisorCheck.getValue(), payloads.get(Constants.LCMAttributes.SkipHypervisorCheck.getValue()));
+ Map<String, String> payloads = JSONUtil.extractPlainValues(payloadStr,
+ Constants.LCMAttributes.VMID.getValue(), Constants.LCMAttributes.IdentityURL.getValue(),
+ Constants.LCMAttributes.TenantID.getValue(),
+ Constants.LCMAttributes.SkipHypervisorCheck.getValue());
+
+ ctx.setAttribute(Constants.LegacyAttributes.VMID.getValue(),
+ payloads.get(Constants.LCMAttributes.VMID.getValue()));
+ ctx.setAttribute(Constants.LegacyAttributes.IdentityURL.getValue(),
+ payloads.get(Constants.LCMAttributes.IdentityURL.getValue()));
+ ctx.setAttribute(Constants.LegacyAttributes.TenantID.getValue(),
+ payloads.get(Constants.LCMAttributes.TenantID.getValue()));
+ ctx.setAttribute(Constants.LegacyAttributes.SkipHypervisorCheck.getValue(),
+ payloads.get(Constants.LCMAttributes.SkipHypervisorCheck.getValue()));
}