diff options
author | yongqiangliu312 <yongqiang.liu@nokia-sbell.com> | 2020-01-27 10:40:41 +0800 |
---|---|---|
committer | Patrick Brady <patrick.brady@att.com> | 2020-01-29 14:18:45 -0800 |
commit | e4c07d4c7eb3105bc6a20eee00fdca592f0cf59b (patch) | |
tree | 74e8abcb92df09514c01b6ca041e5643feec33e8 /appc-inbound | |
parent | b5fe8a69e90b950c07dc11af481eab7e9bab52c6 (diff) |
add new action ConfigScaleIn
Change-Id: Iae4bb797c4e86f66e5e3101fc6715fc2c2be470f
Issue-ID: APPC-1760
Signed-off-by: Taka Cho <takamune.cho@att.com>
Signed-off-by: Patrick Brady <patrick.brady@att.com>
Diffstat (limited to 'appc-inbound')
-rw-r--r-- | appc-inbound/appc-artifact-handler/provider/src/main/java/org/onap/appc/artifact/handler/node/ArtifactHandlerNode.java | 14 |
1 files changed, 9 insertions, 5 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 48dd67f02..5f26f512e 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 @@ -126,7 +126,8 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { private static final String PRE_REBUILD = "PreRebuild"; private static final String POST_REBUILD = "PostRebuild"; private static final String STOP_TRAFFIC = "StopTraffic"; - + private static final String CONFIG_SCALE_IN_PARAM = "ConfigScaleIn"; + public void processArtifact(Map<String, String> inParams, SvcLogicContext ctx) throws ArtifactProcessorException { if (inParams == null || inParams.isEmpty()) { @@ -626,6 +627,7 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { if (contentsActionEquals(content, CONFIGURE_PARAM) || contentsActionEquals(content, CONFIG_MODIFY_PARAM) || contentsActionEquals(content, CONFIG_SCALE_OUT_PARAM) + || contentsActionEquals(content, CONFIG_SCALE_IN_PARAM) || contentsActionEquals(content, GET_CONFIG) || contentsActionEquals(content, POST_EVACUATE) || contentsActionEquals(content, PRE_EVACUATE) @@ -659,10 +661,11 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { private void tryProcessInterfaceProtocol(JSONObject content, DBService dbservice, SvcLogicContext context) throws SvcLogicException, SQLException, ConfigurationException, DBException { - if (contentsActionEquals(content, CONFIGURE_PARAM) || contentsActionEquals(content, CONFIG_SCALE_OUT_PARAM)) { + if (contentsActionEquals(content, CONFIGURE_PARAM) || contentsActionEquals(content, CONFIG_SCALE_OUT_PARAM) + || contentsActionEquals(content, CONFIG_SCALE_IN_PARAM)) { boolean isUpdateRequired = dbservice.isArtifactUpdateRequired(context, DB_DEVICE_INTERFACE_PROTOCOL); - if (contentsActionEquals(content, CONFIGURE_PARAM) - || (contentsActionEquals(content, CONFIG_SCALE_OUT_PARAM) + if (contentsActionEquals(content, CONFIGURE_PARAM) || (contentsActionEquals(content, CONFIG_SCALE_OUT_PARAM) + || contentsActionEquals(content, CONFIG_SCALE_IN_PARAM) && !isUpdateRequired)) { dbservice.processDeviceInterfaceProtocol(context, isUpdateRequired); @@ -711,7 +714,8 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin { private void tryProcessVnfcReference(JSONObject content, SvcLogicContext context, DBService dbservice) throws SvcLogicException { if (content.getString(ACTION).equals(CONFIGURE_PARAM) - || content.getString(ACTION).equals(CONFIG_SCALE_OUT_PARAM)) { + || content.getString(ACTION).equals(CONFIG_SCALE_OUT_PARAM) + || content.getString(ACTION).equals(CONFIG_SCALE_IN_PARAM)) { dbservice.processVnfcReference(context, false); } |