summaryrefslogtreecommitdiffstats
path: root/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2017-07-28 11:29:23 -0700
committerPatrick Brady <pb071s@att.com>2017-08-02 15:43:44 +0000
commit38713207b817ed4700f630748c681116338d32f0 (patch)
tree9eb2097cee8d85ac14f17e3a280ae8aefb69d9de /appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm
parent771ac55e29d099d8bbf783612de975047d75ab12 (diff)
Merging in bug fixes
Change-Id: I85da90b9ba0d03149f42035a820c76ef0285e413 Signed-off-by: Patrick Brady <pb071s@att.com> Issue: APPC-100
Diffstat (limited to 'appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm')
-rw-r--r--appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm/util/RequestInputBuilder.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm/util/RequestInputBuilder.java b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm/util/RequestInputBuilder.java
index 0c4fc7341..495fa82a6 100644
--- a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm/util/RequestInputBuilder.java
+++ b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/lcm/util/RequestInputBuilder.java
@@ -28,11 +28,13 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
+import org.apache.commons.lang.StringUtils;
import org.opendaylight.yang.gen.v1.org.openecomp.appc.lcm.rev160108.Payload;
import org.opendaylight.yang.gen.v1.org.openecomp.appc.lcm.rev160108.action.identifiers.ActionIdentifiers;
import org.opendaylight.yang.gen.v1.org.openecomp.appc.lcm.rev160108.common.header.CommonHeader;
import org.opendaylight.yang.gen.v1.org.openecomp.appc.lcm.rev160108.common.header.common.header.Flags;
import org.openecomp.appc.domainmodel.lcm.Flags.Mode;
+import org.openecomp.appc.domainmodel.lcm.ActionLevel;
import org.openecomp.appc.domainmodel.lcm.RequestContext;
import org.openecomp.appc.domainmodel.lcm.VNFOperation;
import org.openecomp.appc.requesthandler.objects.RequestHandlerInput;
@@ -139,11 +141,21 @@ public class RequestInputBuilder {
actionIds.setvServerId(actionIdentifiers.getVserverId());
actionIds.setVnfId(actionIdentifiers.getVnfId());
this.requestContext.setActionIdentifiers(actionIds);
+
+ ActionLevel actionLevel = readActionLevel(actionIds);
+ this.requestContext.setActionLevel(actionLevel);
return this;
}else{
throw new ParseException("Missing action identifier" , 0);
}
}
+ private ActionLevel readActionLevel(org.openecomp.appc.domainmodel.lcm.ActionIdentifiers actionIds) {
+ if(!StringUtils.isEmpty(actionIds.getVserverId())){
+ return ActionLevel.VM;
+ }
+ return ActionLevel.VNF;
+ }
+
}