diff options
Diffstat (limited to 'appc-inbound/appc-artifact-handler/provider/src/main')
-rw-r--r-- | appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNode.java | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNode.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNode.java index d0b8a834c..b6fd2f599 100644 --- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNode.java +++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNode.java @@ -119,7 +119,14 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { private static final String CONFIGURE_PARAM = "Configure"; private static final String CONFIG_SCALE_OUT_PARAM = "ConfigScaleOut"; private static final String CONFIG_MODIFY_PARAM = "ConfigModify"; - + private static final String GET_CONFIG = "GetConfig"; + private static final String POST_EVACUATE= "PostEvacuate"; + private static final String PRE_EVACUATE = "PreEvacuate"; + private static final String POST_MIGRATE = "PostMigrate"; + private static final String PRE_MIGRATE = "PreMigrate"; + private static final String PRE_REBUILD = "PreRebuild"; + private static final String POST_REBUILD = "PostRebuild"; + private static final String STOP_TRAFFIC = "StopTraffic"; public void processArtifact(Map<String, String> inParams, SvcLogicContext ctx) throws ArtifactProcessorException { if (inParams == null || inParams.isEmpty()) { @@ -155,6 +162,7 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { } updateStoreArtifacts(requestInfo, documentInfo); + if (artifactName.toLowerCase().startsWith(REFERENCE)) { return storeReferenceData(requestInfo, documentInfo); } else if (artifactName.toLowerCase().startsWith(PD)) { @@ -172,6 +180,7 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { } public void validateAnsibleAdminArtifact(JSONObject documentInfo) throws ArtifactHandlerInternalException { + String fn = "ArtifactHandlerNode.validateAnsibleAdminArtifact"; String artifactName = documentInfo.getString(ARTIFACT_NAME); log.info(fn + ": Received Admin File Name: " + artifactName + " ArtifactCotent : " @@ -598,7 +607,16 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { public void processConfigTypeActions(JSONObject content, DBService dbservice, SvcLogicContext context) throws ArtifactHandlerInternalException { try { - if (isContentActionConfig(content)) { + if (isContentActionConfig(content) + || contentsActionEquals(content, GET_CONFIG) + || contentsActionEquals(content, POST_EVACUATE) + || contentsActionEquals(content, PRE_EVACUATE) + || contentsActionEquals(content, POST_MIGRATE) + || contentsActionEquals(content, PRE_MIGRATE) + || contentsActionEquals(content, POST_REBUILD) + || contentsActionEquals(content, PRE_REBUILD) + || contentsActionEquals(content, STOP_TRAFFIC) + ) { if (content.has(DOWNLOAD_DG_REFERENCE) && content.getString(DOWNLOAD_DG_REFERENCE).length() > 0) { @@ -763,7 +781,7 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { private void populateProtocolReference(DBService dbservice, JSONObject content) throws ArtifactHandlerInternalException { - log.info("Begin-->populateProtocolReference "); + log.info("Begin-->populateProtocolReference"); try { SvcLogicContext context = new SvcLogicContext(); JSONObject scope = content.getJSONObject("scope"); @@ -784,7 +802,7 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { log.error("Error inserting record into protocolReference", e); throw new ArtifactHandlerInternalException("Error inserting record into protocolReference", e); } finally { - log.info("End-->populateProtocolReference "); + log.info("End-->populateProtocolReference"); } } |