aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2017-08-29 18:20:26 +0530
committerMarcus Williams <marcus.williams@intel.com>2017-08-31 18:56:59 +0000
commit3df3182a7badeef662f743bfc8d67cea805b1ef4 (patch)
tree20e41c1f971de4c21ddd62e6c087d7a5d7ea5ae9
parentdc2344fc5754dee739f1db69cc6c16dfe0522ab8 (diff)
Update ASDC References to SDC 1/2
This patch changes ASDC to SDC in APPC code, bundle names and other pertinent places. This change sanitizes SDC for Open Source. It is the first in a two part change, the first updates code mentions and artifacts. The second will update database references. Change-Id: Iffd73480cc325172b5d8969fe839728f1c88ef78 Issue-ID:APPC-179 Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
-rw-r--r--appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/AppcDataServiceConstant.java2
-rw-r--r--appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/db/DGGeneralDBService.java4
-rw-r--r--appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java4
-rw-r--r--appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java18
-rw-r--r--appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java4
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java4
-rw-r--r--appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestConfigurationDocumentRequest.java8
-rw-r--r--appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/ASDC-MESSAGE_method_configuration-document-request_TC1.properties6
-rw-r--r--appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java4
-rw-r--r--appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java14
-rw-r--r--appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java2
-rw-r--r--appc-inbound/appc-artifact-handler/model/src/main/yang/artifact-handler.yang2
-rwxr-xr-xappc-inbound/appc-artifact-handler/provider/pom.xml25
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/ArtifactHandlerProvider.java4
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/SdcArtifactHandlerActivator.java (renamed from appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/AsdcArtifactHandlerActivator.java)5
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/dbservices/DBService.java224
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/node/ArtifactHandlerNode.java282
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/ArtifactHandlerProviderUtil.java80
-rw-r--r--appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/SdcArtifactHandlerConstants.java (renamed from appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/AsdcArtifactHandlerConstants.java)4
-rw-r--r--appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang2
-rw-r--r--appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java40
-rw-r--r--appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java2
-rw-r--r--appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java2
-rw-r--r--appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java8
-rw-r--r--appc-oam/appc-oam-model/src/main/yang/appc-oam.yang8
-rw-r--r--appc-provider/appc-provider-model/src/main/yang/appc-provider-lcm.yang4
-rw-r--r--appc-provider/appc-provider-model/src/main/yang/appc-provider.yang6
-rw-r--r--appc-sdc-listener/.gitignore (renamed from appc-asdc-listener/.gitignore)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/.gitignore (renamed from appc-asdc-listener/appc-asdc-listener-bundle/.gitignore)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/.settings/org.eclipse.wst.common.project.facet.core.xml (renamed from appc-asdc-listener/appc-asdc-listener-bundle/.settings/org.eclipse.wst.common.project.facet.core.xml)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/etc/asdc-client.jks (renamed from appc-asdc-listener/appc-asdc-listener-bundle/etc/asdc-client.jks)bin1177 -> 1177 bytes
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/etc/asdcclientstore.jks (renamed from appc-asdc-listener/appc-asdc-listener-bundle/etc/asdcclientstore.jks)bin907 -> 907 bytes
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/log4j.properties (renamed from appc-asdc-listener/appc-asdc-listener-bundle/log4j.properties)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/pom.xml (renamed from appc-asdc-listener/appc-asdc-listener-bundle/pom.xml)29
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/ArtifactProcessor.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/ArtifactProcessor.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/ArtifactStorageService.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/ArtifactStorageService.java)162
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/Constants.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/Constants.java)12
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/DependencyModelGenerator.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/DependencyModelGenerator.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/AbstractArtifactProcessor.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/AbstractArtifactProcessor.java)2
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ArtifactProcessorFactory.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ArtifactProcessorFactory.java)1
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ConfigArtifactProcessor.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ConfigArtifactProcessor.java)2
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/LicenseArtifactProcessor.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/LicenseArtifactProcessor.java)4
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ToscaCsarArtifactProcessor.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ToscaCsarArtifactProcessor.java)8
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/ArtifactType.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/ArtifactType.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Resource.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Resource.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCArtifact.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCArtifact.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCReference.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCReference.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Vnfc.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Vnfc.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderOperations.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderOperations.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderResponse.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderResponse.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java)19
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcConfig.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcConfig.java)30
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcListener.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcListener.java)40
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/Util.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/Util.java)6
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/tlv/sdc/security/Passwords.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/tlv/sdc/security/Passwords.java)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml)6
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/attsdc-packages.yaml (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/attsdc-packages.yaml)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/attsdc.yaml (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/attsdc.yaml)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/log4j.properties (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/log4j.properties)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/titan.properties (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/titan.properties)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/scripts/startTest.sh (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/scripts/startTest.sh)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/org/openecomp/appc/default.properties (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/org/openecomp/appc/default.properties)20
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/SdcCallbackTest.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/AsdcCallbackTest.java)71
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/SdcListenerTest.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/AsdcListenerTest.java)48
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/TestRun.java (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/TestRun.java)2
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/test/resources/csar/service-ServiceAppc-csar.csar (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/test/resources/csar/service-ServiceAppc-csar.csar)bin9782 -> 9782 bytes
-rw-r--r--appc-sdc-listener/appc-sdc-listener-bundle/src/test/resources/org/openecomp/appc/default.properties (renamed from appc-asdc-listener/appc-asdc-listener-bundle/src/test/resources/org/openecomp/appc/default.properties)18
-rw-r--r--appc-sdc-listener/appc-sdc-listener-features/.gitignore (renamed from appc-asdc-listener/appc-asdc-listener-features/.gitignore)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-features/pom.xml (renamed from appc-asdc-listener/appc-asdc-listener-features/pom.xml)29
-rw-r--r--appc-sdc-listener/appc-sdc-listener-features/src/main/resources/features.xml (renamed from appc-asdc-listener/appc-asdc-listener-features/src/main/resources/features.xml)6
-rw-r--r--appc-sdc-listener/appc-sdc-listener-installer/.gitignore (renamed from appc-asdc-listener/appc-asdc-listener-installer/.gitignore)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-installer/pom.xml (renamed from appc-asdc-listener/appc-asdc-listener-installer/pom.xml)39
-rw-r--r--appc-sdc-listener/appc-sdc-listener-installer/src/assembly/assemble_installer_zip.xml (renamed from appc-asdc-listener/appc-asdc-listener-installer/src/assembly/assemble_installer_zip.xml)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-installer/src/assembly/assemble_mvnrepo_zip.xml (renamed from appc-asdc-listener/appc-asdc-listener-installer/src/assembly/assemble_mvnrepo_zip.xml)0
-rw-r--r--appc-sdc-listener/appc-sdc-listener-installer/src/main/resources/scripts/install-feature.sh (renamed from appc-asdc-listener/appc-asdc-listener-installer/src/main/resources/scripts/install-feature.sh)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/pom.xml (renamed from appc-asdc-listener/appc-yang-generator/pom.xml)25
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/YANGGenerator.java (renamed from appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/YANGGenerator.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/exception/YANGGenerationException.java (renamed from appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/exception/YANGGenerationException.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorFactory.java (renamed from appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorFactory.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java (renamed from appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/objects/Leaf.java (renamed from appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/objects/Leaf.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/type/YangTypes.java (renamed from appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/type/YangTypes.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/main/resources/templates/YangTemplate.vm (renamed from appc-asdc-listener/appc-yang-generator/src/main/resources/templates/YangTemplate.vm)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/test/java/org/openecomp/appc/TestYANGGenerator.java (renamed from appc-asdc-listener/appc-yang-generator/src/test/java/org/openecomp/appc/TestYANGGenerator.java)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFile.yml (renamed from appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFile.yml)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithSyntaxError.yml (renamed from appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithSyntaxError.yml)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithUnsupportedTypes.yml (renamed from appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithUnsupportedTypes.yml)0
-rw-r--r--appc-sdc-listener/appc-yang-generator/src/test/resources/yang/expectedYang.yang (renamed from appc-asdc-listener/appc-yang-generator/src/test/resources/yang/expectedYang.yang)0
-rw-r--r--appc-sdc-listener/pom.xml (renamed from appc-asdc-listener/pom.xml)33
-rw-r--r--pom.xml25
90 files changed, 776 insertions, 629 deletions
diff --git a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/AppcDataServiceConstant.java b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/AppcDataServiceConstant.java
index 87e0f2c9b..fed2e7cae 100644
--- a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/AppcDataServiceConstant.java
+++ b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/AppcDataServiceConstant.java
@@ -34,7 +34,7 @@ public class AppcDataServiceConstant {
public static String OUTPUT_PARAM_ERROR_MESSAGE = "error-message";
public static final String INPUT_PARAM_FILE_CATEGORY = "fileCategory";
public static final String INPUT_PARAM_VM_INSTANCE = "vmInstance";
- public static final String INPUT_PARAM_ASDC_ARTIFACT_IND = "asdcArtifactInd";
+ public static final String INPUT_PARAM_SDC_ARTIFACT_IND = "asdcArtifactInd";
public static final Object INPUT_PARAM_VNF_ID = "vnfId";
public static final Object INPUT_PARAM_VM_NAME = "vmName";
diff --git a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/db/DGGeneralDBService.java b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/db/DGGeneralDBService.java
index 3ec42f61a..98fd50cc9 100644
--- a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/db/DGGeneralDBService.java
+++ b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/db/DGGeneralDBService.java
@@ -203,7 +203,7 @@ public class DGGeneralDBService {
}
- public QueryStatus savePrepareRelationship(SvcLogicContext ctx, String prefix, String fileId, String asdcInd)
+ public QueryStatus savePrepareRelationship(SvcLogicContext ctx, String prefix, String fileId, String sdcInd)
throws SvcLogicException {
QueryStatus status = null;
@@ -211,7 +211,7 @@ public class DGGeneralDBService {
if (serviceLogic != null && ctx != null) {
- if ("Y".equals(asdcInd))
+ if ("Y".equals(sdcInd))
key = "INSERT INTO PREPARE_FILE_RELATIONSHIP " + " SET service_instance_id = $service-instance-id , "
+ " request_id = $request-id , " + " asdc_artifacts_id = " + fileId + " ;";
diff --git a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java
index 942493905..4676d37cb 100644
--- a/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java
+++ b/appc-config/appc-data-services/provider/src/main/java/org/openecomp/appc/data/services/node/ConfigResourceNode.java
@@ -301,14 +301,14 @@ public class ConfigResourceNode implements SvcLogicJavaPlugin {
log.info("Received savePrepareRelationship call with params : " + inParams);
String responsePrefix = inParams.get(AppcDataServiceConstant.INPUT_PARAM_RESPONSE_PREFIX);
- String asdcArtifactInd = inParams.get(AppcDataServiceConstant.INPUT_PARAM_ASDC_ARTIFACT_IND);
+ String sdcArtifactInd = inParams.get(AppcDataServiceConstant.INPUT_PARAM_SDC_ARTIFACT_IND);
String fileId = inParams.get(AppcDataServiceConstant.INPUT_PARAM_FILE_ID);
try {
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
DGGeneralDBService db = DGGeneralDBService.initialise();
- QueryStatus status = db.savePrepareRelationship(ctx, "tmp.preparerel", fileId, asdcArtifactInd);
+ QueryStatus status = db.savePrepareRelationship(ctx, "tmp.preparerel", fileId, sdcArtifactInd);
if (status == QueryStatus.FAILURE)
throw new Exception("Unable to save prepare_relationship");
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java
index c3ea6ede8..528be3263 100644
--- a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/dbervices/FlowControlDBService.java
@@ -82,8 +82,8 @@ public class FlowControlDBService {
String fn = "DBService.getDesignTimeFlowModel ";
QueryStatus status = null;
if (serviceLogic != null && localContext != null) {
- String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_ASDC_ARTIFACTS
- + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_ASDC_REFERENCE +
+ String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_SDC_ARTIFACTS
+ + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_SDC_REFERENCE +
" where vnf_type= $" + FlowControllerConstants.VNF_TYPE +
" and vnfc_type = $" + FlowControllerConstants.VNFC_TYPE +
" and action = $" + FlowControllerConstants.REQUEST_ACTION +
@@ -96,7 +96,7 @@ public class FlowControlDBService {
if(status.toString().equals("FAILURE"))
throw new SvcLogicException("Error - while getting FlowReferenceData ");
- String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_ASDC_ARTIFACTS +
+ String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_SDC_ARTIFACTS +
" where artifact_name = $artifactName and internal_version = $maxInternalVersion ";
log.debug(fn + "Query String : " + queryString1);
@@ -168,8 +168,8 @@ public class FlowControlDBService {
String fn = "DBService.getDependencyInfo ";
QueryStatus status = null;
if (serviceLogic != null && localContext != null) {
- String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_ASDC_ARTIFACTS
- + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_ASDC_REFERENCE +
+ String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_SDC_ARTIFACTS
+ + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_SDC_REFERENCE +
" where vnf_type= $" + FlowControllerConstants.VNF_TYPE +
" and file_category = '" + FlowControllerConstants.DEPENDENCYMODEL +"' )" ;
@@ -179,7 +179,7 @@ public class FlowControlDBService {
if(status.toString().equals("FAILURE"))
throw new SvcLogicException("Error - while getting dependencydata ");
- String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_ASDC_ARTIFACTS +
+ String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_SDC_ARTIFACTS +
" where artifact_name = $artifactName and internal_version = $maxInternalVersion ";
log.debug(fn + "Query String : " + queryString1);
@@ -195,8 +195,8 @@ public class FlowControlDBService {
String fn = "DBService.getCapabilitiesData ";
QueryStatus status = null;
if (serviceLogic != null && localContext != null) {
- String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_ASDC_ARTIFACTS
- + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_ASDC_REFERENCE +
+ String queryString = "select max(internal_version) as maxInternalVersion, artifact_name as artifactName from " + FlowControllerConstants.DB_SDC_ARTIFACTS
+ + " where artifact_name in (select artifact_name from " + FlowControllerConstants.DB_SDC_REFERENCE +
" where vnf_type= $" + FlowControllerConstants.VNF_TYPE +
" and file_category = '" + FlowControllerConstants.CAPABILITY +"' )" ;
@@ -206,7 +206,7 @@ public class FlowControlDBService {
if(status.toString().equals("FAILURE"))
throw new SvcLogicException("Error - while getting capabilitiesData ");
- String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_ASDC_ARTIFACTS +
+ String queryString1 = "select artifact_content from " + FlowControllerConstants.DB_SDC_ARTIFACTS +
" where artifact_name = $artifactName and internal_version = $maxInternalVersion ";
log.debug(fn + "Query String : " + queryString1);
diff --git a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java
index 70500c4b1..9adade961 100644
--- a/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java
+++ b/appc-config/appc-flow-controller/provider/src/main/java/org/openecomp/appc/flow/controller/utils/FlowControllerConstants.java
@@ -81,8 +81,8 @@ public class FlowControllerConstants {
public static final String REST = "rest";
- public static final String DB_ASDC_ARTIFACTS = "ASDC_ARTIFACTS";
- public static final String DB_ASDC_REFERENCE = "ASDC_REFERENCE";
+ public static final String DB_SDC_ARTIFACTS = "ASDC_ARTIFACTS";
+ public static final String DB_SDC_REFERENCE = "ASDC_REFERENCE";
public static final String DB_REQUEST_ARTIFACTS = "REQUEST_ARTIFACTS";
public static final String DB_MULTISTEP_FLOW_REFERENCE = "MULTISTEP_FLOW_REFERENCE";
public static final String DB_PROTOCOL_REFERENCE = "PROTOCOL_REFERENCE";
diff --git a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
index 1ccd6c47d..7f82ea79f 100644
--- a/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
+++ b/appc-dg/appc-dg-shared/appc-dg-aai/src/main/java/org/openecomp/appc/dg/aai/impl/Constants.java
@@ -58,7 +58,7 @@ public class Constants {
public static final String REQUEST_ID_FIELD_NAME = "REQUEST_ID";
public static final String CREATION_DATE_FIELD_NAME = "CREATION_DATE";
public static final String LOG_FIELD_NAME = "LOG";
- public static final String ASDC_ARTIFACTS_TABLE_NAME = "ASDC_ARTIFACTS";
+ public static final String SDC_ARTIFACTS_TABLE_NAME = "ASDC_ARTIFACTS";
// input fields names
public static final String PAYLOAD = "payload";
@@ -98,7 +98,7 @@ public class Constants {
*/
public static final String AAI_VNF_MODEL_VERSION_ID ="model-version-id";
- public enum ASDC_ARTIFACTS_FIELDS {
+ public enum SDC_ARTIFACTS_FIELDS {
SERVICE_UUID,
DISTRIBUTION_ID,
SERVICE_NAME,
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestConfigurationDocumentRequest.java b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestConfigurationDocumentRequest.java
index 211c14215..2f90ac959 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestConfigurationDocumentRequest.java
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/java/org/openecomp/appc/dg/TestConfigurationDocumentRequest.java
@@ -36,11 +36,11 @@ public class TestConfigurationDocumentRequest /* extends AbstractDGTestCase */ {
/*
@Test
- public void testASDCMessage() {
+ public void testSDCMessage() {
try {
- String propertyfileName = "ASDC-MESSAGE_method_configuration-document-request_TC1.properties";
+ String propertyfileName = "SDC-MESSAGE_method_configuration-document-request_TC1.properties";
- String configurationDocumentRequestXML = "src/main/resources/xml/ASDC-MESSAGE_method_configuration-document-request_3.0.0.xml";
+ String configurationDocumentRequestXML = "src/main/resources/xml/SDC-MESSAGE_method_configuration-document-request_3.0.0.xml";
// Register Call graphs
@@ -50,7 +50,7 @@ public class TestConfigurationDocumentRequest /* extends AbstractDGTestCase */ {
serviceReferences.put("org.openecomp.sdnc.config.generator.convert.ConvertNode",new org.openecomp.sdnc.config.generator.convert.ConvertNode());
serviceReferences.put("org.openecomp.sdnc.config.generator.merge.MergeNode", new org.openecomp.sdnc.config.generator.merge.MergeNode());
- GraphKey graphKey = new GraphKey("ASDC-MESSAGE", null, "configuration-document-request", null);
+ GraphKey graphKey = new GraphKey("SDC-MESSAGE", null, "configuration-document-request", null);
DGTestCase tc = new DGTestCase(graphKey);
tc.setInjectGraphXmls(injectGraphXmls);
tc.setServiceReferences(serviceReferences);
diff --git a/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/ASDC-MESSAGE_method_configuration-document-request_TC1.properties b/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/ASDC-MESSAGE_method_configuration-document-request_TC1.properties
index ffbdff81c..225e304b5 100644
--- a/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/ASDC-MESSAGE_method_configuration-document-request_TC1.properties
+++ b/appc-directed-graph/appc-dgraph/provider/src/test/resources/properties/ASDC-MESSAGE_method_configuration-document-request_TC1.properties
@@ -18,6 +18,6 @@
# ============LICENSE_END=========================================================
###
-asdc-reference.configuration-document-request-input.document-parameters.artifact-contents=tcfile://vdbe_template.xml
-asdc-reference.outCome=SUCCESS
-tmp.asdc-artifacts.outCome=SUCCESS
+sdc-reference.configuration-document-request-input.document-parameters.artifact-contents=tcfile://vdbe_template.xml
+sdc-reference.outCome=SUCCESS
+tmp.sdc-artifacts.outCome=SUCCESS
diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java
index dc255cd57..ba39134bf 100644
--- a/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java
+++ b/appc-dispatcher/appc-license-manager/appc-license-manager-api/src/main/java/org/openecomp/appc/licmgr/Constants.java
@@ -55,7 +55,7 @@ public class Constants {
public static final String REQUEST_ID_FIELD_NAME = "REQUEST_ID";
public static final String CREATION_DATE_FIELD_NAME = "CREATION_DATE";
public static final String LOG_FIELD_NAME = "LOG";
- public static final String ASDC_ARTIFACTS = "ASDC_ARTIFACTS";
+ public static final String SDC_ARTIFACTS = "ASDC_ARTIFACTS";
// input fields names
public static final String PAYLOAD = "payload";
@@ -89,7 +89,7 @@ public class Constants {
public static final String IS_ACQUIRE_ENTITLEMENT_REQUIRE ="is.acquire-entitlement.require";
public static final String IS_RELEASE_ENTITLEMENT_REQUIRE ="is.release-entitlement.require";
- public enum ASDC_ARTIFACTS_FIELDS {
+ public enum SDC_ARTIFACTS_FIELDS {
SERVICE_UUID,
DISTRIBUTION_ID,
SERVICE_NAME,
diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java
index 8e999c4c9..557c1a3e5 100644
--- a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java
+++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseDataAccessServiceImpl.java
@@ -33,7 +33,7 @@ import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import org.openecomp.sdnc.sli.resource.dblib.DbLibService;
-import static org.openecomp.appc.licmgr.Constants.ASDC_ARTIFACTS_FIELDS;
+import static org.openecomp.appc.licmgr.Constants.SDC_ARTIFACTS_FIELDS;
import java.sql.SQLException;
import java.util.ArrayList;
@@ -69,7 +69,7 @@ public class LicenseDataAccessServiceImpl implements LicenseDataAccessService {
DataAccessException {
Map<String,String> result = new HashMap<>();
- if (null == fields || 0 == fields.length) fields = new String[]{ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT.name()};
+ if (null == fields || 0 == fields.length) fields = new String[]{SDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT.name()};
String queryString = buildQueryStatement();
@@ -87,7 +87,7 @@ public class LicenseDataAccessServiceImpl implements LicenseDataAccessService {
result.put(field, data.getString(field));
}
} else {
- String msg = "Missing license model for VNF_TYPE: " + vnfType + " and VNF_VERSION: " + vnfVersion + " in table " + Constants.ASDC_ARTIFACTS;
+ String msg = "Missing license model for VNF_TYPE: " + vnfType + " and VNF_VERSION: " + vnfVersion + " in table " + Constants.SDC_ARTIFACTS;
logger.info(msg);
}
} catch (SQLException e) {
@@ -99,10 +99,10 @@ public class LicenseDataAccessServiceImpl implements LicenseDataAccessService {
}
private String buildQueryStatement() {
- return "select * " + "from " + Constants.ASDC_ARTIFACTS + " " +
- "where " + ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME.name() + " = ?" +
- " AND " + ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION.name() + " = ?" +
- " AND " + ASDC_ARTIFACTS_FIELDS.ARTIFACT_TYPE.name() + " = ?";
+ return "select * " + "from " + Constants.SDC_ARTIFACTS + " " +
+ "where " + SDC_ARTIFACTS_FIELDS.RESOURCE_NAME.name() + " = ?" +
+ " AND " + SDC_ARTIFACTS_FIELDS.RESOURCE_VERSION.name() + " = ?" +
+ " AND " + SDC_ARTIFACTS_FIELDS.ARTIFACT_TYPE.name() + " = ?";
}
}
diff --git a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java
index 9f3db5aab..4fc6a9345 100644
--- a/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java
+++ b/appc-dispatcher/appc-license-manager/appc-license-manager-core/src/main/java/org/openecomp/appc/licmgr/impl/LicenseManagerImpl.java
@@ -24,7 +24,7 @@
package org.openecomp.appc.licmgr.impl;
-import static org.openecomp.appc.licmgr.Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT;
+import static org.openecomp.appc.licmgr.Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT;
import java.util.Map;
diff --git a/appc-inbound/appc-artifact-handler/model/src/main/yang/artifact-handler.yang b/appc-inbound/appc-artifact-handler/model/src/main/yang/artifact-handler.yang
index 1839fbd67..e56b9c430 100644
--- a/appc-inbound/appc-artifact-handler/model/src/main/yang/artifact-handler.yang
+++ b/appc-inbound/appc-artifact-handler/model/src/main/yang/artifact-handler.yang
@@ -51,7 +51,7 @@ module artifact-handler {
}
leaf request-action {
type enumeration {
- enum "StoreAsdcDocumentRequest";
+ enum "StoreSdcDocumentRequest";
}
}
leaf request-sub-action {
diff --git a/appc-inbound/appc-artifact-handler/provider/pom.xml b/appc-inbound/appc-artifact-handler/provider/pom.xml
index 90d34a320..1bb627535 100755
--- a/appc-inbound/appc-artifact-handler/provider/pom.xml
+++ b/appc-inbound/appc-artifact-handler/provider/pom.xml
@@ -1,4 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -19,7 +42,7 @@
<configuration>
<instructions>
<Bundle-SymbolicName>org.openecomp.appc.artifact.handler</Bundle-SymbolicName>
- <Bundle-Activator>org.openecomp.appc.artifact.handler.AsdcArtifactHandlerActivator</Bundle-Activator>
+ <Bundle-Activator>org.openecomp.appc.artifact.handler.SdcArtifactHandlerActivator</Bundle-Activator>
<Export-Package>org.openecomp.appc.artifact.handler,org.opendaylight.controller.config.yang.config.artifact-handler_provider.impl</Export-Package>
<Import-Package>*</Import-Package>
<DynamicImport-Package>*</DynamicImport-Package>
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/ArtifactHandlerProvider.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/ArtifactHandlerProvider.java
index 233984f55..d94f02a54 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/ArtifactHandlerProvider.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/ArtifactHandlerProvider.java
@@ -56,7 +56,7 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
import org.openecomp.appc.artifact.handler.node.ArtifactHandlerNode;
import org.openecomp.appc.artifact.handler.utils.ArtifactHandlerProviderUtil;
-import org.openecomp.appc.artifact.handler.utils.AsdcArtifactHandlerConstants;
+import org.openecomp.appc.artifact.handler.utils.SdcArtifactHandlerConstants;
import org.openecomp.sdnc.sli.SvcLogicContext;
import com.att.eelf.configuration.EELFLogger;
@@ -180,7 +180,7 @@ public class ArtifactHandlerProvider implements AutoCloseable, ArtifactHandlerSe
try{
if(input.getRequestInformation().getSource() !=null){
- if(input.getRequestInformation().getSource().equalsIgnoreCase(AsdcArtifactHandlerConstants.DESIGN_TOOL)){
+ if(input.getRequestInformation().getSource().equalsIgnoreCase(SdcArtifactHandlerConstants.DESIGN_TOOL)){
designUtil.processTemplate(designUtil.createDummyRequestData());
configResponseBuilder.setStatus(ArtifactHandlerProviderUtil.DistributionStatusEnum.DEPLOY_OK.toString());
}
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/AsdcArtifactHandlerActivator.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/SdcArtifactHandlerActivator.java
index 4c8e1358f..6ce8af993 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/AsdcArtifactHandlerActivator.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/SdcArtifactHandlerActivator.java
@@ -26,7 +26,6 @@ package org.openecomp.appc.artifact.handler;
import java.util.LinkedList;
import java.util.List;
-import java.util.Properties;
import org.openecomp.appc.artifact.handler.node.ArtifactHandlerNode;
import org.osgi.framework.BundleActivator;
@@ -36,9 +35,9 @@ import org.osgi.framework.ServiceRegistration;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-public class AsdcArtifactHandlerActivator implements BundleActivator {
+public class SdcArtifactHandlerActivator implements BundleActivator {
- private static final EELFLogger log = EELFManager.getInstance().getLogger(AsdcArtifactHandlerActivator.class);
+ private static final EELFLogger log = EELFManager.getInstance().getLogger(SdcArtifactHandlerActivator.class);
private List<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
@Override
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/dbservices/DBService.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/dbservices/DBService.java
index 4984ebf43..0116bb265 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/dbservices/DBService.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/dbservices/DBService.java
@@ -27,7 +27,7 @@ package org.openecomp.appc.artifact.handler.dbservices;
import java.sql.SQLException;
import java.util.HashMap;
-import org.openecomp.appc.artifact.handler.utils.AsdcArtifactHandlerConstants;
+import org.openecomp.appc.artifact.handler.utils.SdcArtifactHandlerConstants;
import org.openecomp.sdnc.sli.SvcLogicContext;
import org.openecomp.sdnc.sli.SvcLogicException;
import org.openecomp.sdnc.sli.SvcLogicResource;
@@ -84,7 +84,7 @@ public class DBService {
if(status.toString().equals("FAILURE"))
throw new SvcLogicException("Error - getting Artifact ID from database");
artifactID = ctx.getAttribute("id");
- log.info("ASDC_ARTIFACTS_ID received as : " + ctx.getAttribute("id"));
+ log.info("SDC_ARTIFACTS_ID received as : " + ctx.getAttribute("id"));
}
return artifactID;
}
@@ -112,7 +112,7 @@ public class DBService {
status = serviceLogic.save("SQL", false, false, key, null, null, ctx);
if(status.toString().equals("FAILURE"))
- throw new SvcLogicException("Error While processing storing Artifact: " +ctx.getAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME));
+ throw new SvcLogicException("Error While processing storing Artifact: " +ctx.getAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME));
}
return status;
@@ -134,55 +134,55 @@ public class DBService {
public void processConfigureActionDg(SvcLogicContext context, boolean isUpdate) {
String fn = "DBService.processConfigureActionDg";
- log.info("Update Parameter for ASDC Reference " + isUpdate );
+ log.info("Update Parameter for SDC Reference " + isUpdate );
String key = "";
QueryStatus status = null;
if(isUpdate);
}
- public void processAsdcReferences(SvcLogicContext context, boolean isUpdate) throws SvcLogicException {
- String fn = "DBService.processAsdcReferences";
+ public void processSdcReferences(SvcLogicContext context, boolean isUpdate) throws SvcLogicException {
+ String fn = "DBService.processSdcReferences";
String key = "";
QueryStatus status = null;
- if (isUpdate && AsdcArtifactHandlerConstants.FILE_CATEGORY.equals(AsdcArtifactHandlerConstants.CAPABILITY)) {
- key = "update " + AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE + " set ARTIFACT_NAME = $" + AsdcArtifactHandlerConstants.ARTIFACT_NAME +
- " where VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE +
- " and FILE_CATEGORY = $" + AsdcArtifactHandlerConstants.FILE_CATEGORY +
+ if (isUpdate && SdcArtifactHandlerConstants.FILE_CATEGORY.equals(SdcArtifactHandlerConstants.CAPABILITY)) {
+ key = "update " + SdcArtifactHandlerConstants.DB_SDC_REFERENCE + " set ARTIFACT_NAME = $" + SdcArtifactHandlerConstants.ARTIFACT_NAME +
+ " where VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE +
+ " and FILE_CATEGORY = $" + SdcArtifactHandlerConstants.FILE_CATEGORY +
" and ACTION = null";
}
else if(isUpdate)
- key = "update " + AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE + " set ARTIFACT_NAME = $" + AsdcArtifactHandlerConstants.ARTIFACT_NAME +
- " where VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE +
- " and FILE_CATEGORY = $" + AsdcArtifactHandlerConstants.FILE_CATEGORY +
- " and ACTION = $" + AsdcArtifactHandlerConstants.ACTION ;
+ key = "update " + SdcArtifactHandlerConstants.DB_SDC_REFERENCE + " set ARTIFACT_NAME = $" + SdcArtifactHandlerConstants.ARTIFACT_NAME +
+ " where VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE +
+ " and FILE_CATEGORY = $" + SdcArtifactHandlerConstants.FILE_CATEGORY +
+ " and ACTION = $" + SdcArtifactHandlerConstants.ACTION ;
else {
- if (AsdcArtifactHandlerConstants.FILE_CATEGORY.equals(AsdcArtifactHandlerConstants.CAPABILITY)) {
- key = "insert into " + AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE +
+ if (SdcArtifactHandlerConstants.FILE_CATEGORY.equals(SdcArtifactHandlerConstants.CAPABILITY)) {
+ key = "insert into " + SdcArtifactHandlerConstants.DB_SDC_REFERENCE +
" set VNFC_TYPE = null " +
- " , FILE_CATEGORY = $" + AsdcArtifactHandlerConstants.FILE_CATEGORY +
- " , VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE +
+ " , FILE_CATEGORY = $" + SdcArtifactHandlerConstants.FILE_CATEGORY +
+ " , VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE +
" , ACTION = null " +
" , ARTIFACT_TYPE = null " +
- " , ARTIFACT_NAME = $" + AsdcArtifactHandlerConstants.ARTIFACT_NAME ;
+ " , ARTIFACT_NAME = $" + SdcArtifactHandlerConstants.ARTIFACT_NAME ;
}
else {
- key = "insert into " + AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE +
- " set VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE +
- " , FILE_CATEGORY = $" + AsdcArtifactHandlerConstants.FILE_CATEGORY +
- " , VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE +
- " , ACTION = $" + AsdcArtifactHandlerConstants.ACTION +
- " , ARTIFACT_TYPE = $" + AsdcArtifactHandlerConstants.ARTIFACT_TYPE +
- " , ARTIFACT_NAME = $" + AsdcArtifactHandlerConstants.ARTIFACT_NAME ;
+ key = "insert into " + SdcArtifactHandlerConstants.DB_SDC_REFERENCE +
+ " set VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE +
+ " , FILE_CATEGORY = $" + SdcArtifactHandlerConstants.FILE_CATEGORY +
+ " , VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE +
+ " , ACTION = $" + SdcArtifactHandlerConstants.ACTION +
+ " , ARTIFACT_TYPE = $" + SdcArtifactHandlerConstants.ARTIFACT_TYPE +
+ " , ARTIFACT_NAME = $" + SdcArtifactHandlerConstants.ARTIFACT_NAME ;
}
}
if (serviceLogic != null && context != null) {
log.info("Insert Key: " + key);
status = serviceLogic.save("SQL", false, false, key, null, null, context);
if(status.toString().equals("FAILURE"))
- throw new SvcLogicException("Error While processing asdc_reference table ");
+ throw new SvcLogicException("Error While processing sdc_reference table ");
}
}
@@ -191,50 +191,50 @@ public class DBService {
log.info("Checking if Update required for this data" );
log.info("db" + db);
- log.info("ACTION=" + context.getAttribute(AsdcArtifactHandlerConstants.ACTION));
- log.info("VNFC_TYPE=" + context.getAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE));
- log.info("VNFC_INSTANCE=" + context.getAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE));
- log.info("VM_INSTANCE=" + context.getAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE));
- log.info("VNF_TYPE=" + context.getAttribute(AsdcArtifactHandlerConstants.VNF_TYPE));
+ log.info("ACTION=" + context.getAttribute(SdcArtifactHandlerConstants.ACTION));
+ log.info("VNFC_TYPE=" + context.getAttribute(SdcArtifactHandlerConstants.VNFC_TYPE));
+ log.info("VNFC_INSTANCE=" + context.getAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE));
+ log.info("VM_INSTANCE=" + context.getAttribute(SdcArtifactHandlerConstants.VM_INSTANCE));
+ log.info("VNF_TYPE=" + context.getAttribute(SdcArtifactHandlerConstants.VNF_TYPE));
String whereClause = "";
QueryStatus status = null;
- /* if(context.getAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME) !=null &&
- context.getAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME).toLowerCase().startsWith(AsdcArtifactHandlerConstants.PD))
- whereClause = " where artifact_name = $" + AsdcArtifactHandlerConstants.ARTIFACT_NAME
+ /* if(context.getAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME) !=null &&
+ context.getAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME).toLowerCase().startsWith(SdcArtifactHandlerConstants.PD))
+ whereClause = " where artifact_name = $" + SdcArtifactHandlerConstants.ARTIFACT_NAME
+ " and vnf_type = 'DummyVnf' ";
else*/
- whereClause = " where VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE;
+ whereClause = " where VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE;
- if (db !=null && db.equals(AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE) &&
- context.getAttribute(AsdcArtifactHandlerConstants.FILE_CATEGORY).equals(AsdcArtifactHandlerConstants.CAPABILITY) &&
- context.getAttribute(AsdcArtifactHandlerConstants.ACTION) ==null) {
- whereClause = whereClause + " and FILE_CATEGORY = $" + AsdcArtifactHandlerConstants.FILE_CATEGORY ;
+ if (db !=null && db.equals(SdcArtifactHandlerConstants.DB_SDC_REFERENCE) &&
+ context.getAttribute(SdcArtifactHandlerConstants.FILE_CATEGORY).equals(SdcArtifactHandlerConstants.CAPABILITY) &&
+ context.getAttribute(SdcArtifactHandlerConstants.ACTION) ==null) {
+ whereClause = whereClause + " and FILE_CATEGORY = $" + SdcArtifactHandlerConstants.FILE_CATEGORY ;
}
- else if(db !=null && db.equals(AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE)) {
- whereClause = whereClause + " and VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE
- + " and FILE_CATEGORY = $" + AsdcArtifactHandlerConstants.FILE_CATEGORY
- + " and ACTION = $" + AsdcArtifactHandlerConstants.ACTION;
+ else if(db !=null && db.equals(SdcArtifactHandlerConstants.DB_SDC_REFERENCE)) {
+ whereClause = whereClause + " and VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE
+ + " and FILE_CATEGORY = $" + SdcArtifactHandlerConstants.FILE_CATEGORY
+ + " and ACTION = $" + SdcArtifactHandlerConstants.ACTION;
}
- else if(db.equals(AsdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE)) {
- whereClause = " where PROTOCOL = $" + AsdcArtifactHandlerConstants.DEVICE_PROTOCOL;
+ else if(db.equals(SdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE)) {
+ whereClause = " where PROTOCOL = $" + SdcArtifactHandlerConstants.DEVICE_PROTOCOL;
}
- else if(db.equals(AsdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG)) {
- whereClause = whereClause + " and ACTION = $" + AsdcArtifactHandlerConstants.ACTION;
+ else if(db.equals(SdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG)) {
+ whereClause = whereClause + " and ACTION = $" + SdcArtifactHandlerConstants.ACTION;
}
- else if(db.equals(AsdcArtifactHandlerConstants.DB_VNFC_REFERENCE)){
+ else if(db.equals(SdcArtifactHandlerConstants.DB_VNFC_REFERENCE)){
int vm_instance = -1 ;
- if(context.getAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE) !=null)
- vm_instance = Integer.parseInt(context.getAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE));
+ if(context.getAttribute(SdcArtifactHandlerConstants.VM_INSTANCE) !=null)
+ vm_instance = Integer.parseInt(context.getAttribute(SdcArtifactHandlerConstants.VM_INSTANCE));
int vnfc_instance = -1 ;
- if(context.getAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE) !=null)
- vnfc_instance = Integer.parseInt(context.getAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE));
- whereClause = whereClause + " and ACTION = $" + AsdcArtifactHandlerConstants.ACTION
- + " and VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE
- + " and VNFC_INSTANCE = $" + AsdcArtifactHandlerConstants.VNFC_INSTANCE
- + " and VM_INSTANCE = $" + AsdcArtifactHandlerConstants.VM_INSTANCE ;
+ if(context.getAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE) !=null)
+ vnfc_instance = Integer.parseInt(context.getAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE));
+ whereClause = whereClause + " and ACTION = $" + SdcArtifactHandlerConstants.ACTION
+ + " and VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE
+ + " and VNFC_INSTANCE = $" + SdcArtifactHandlerConstants.VNFC_INSTANCE
+ + " and VM_INSTANCE = $" + SdcArtifactHandlerConstants.VM_INSTANCE ;
}
if (serviceLogic != null && context != null) {
@@ -262,15 +262,15 @@ public class DBService {
String key = "";
QueryStatus status = null;
if(isUpdate)
- key = "update " + AsdcArtifactHandlerConstants.DB_DEVICE_INTERFACE_PROTOCOL +
- " set PROTOCOL = $" + AsdcArtifactHandlerConstants.DEVICE_PROTOCOL +
+ key = "update " + SdcArtifactHandlerConstants.DB_DEVICE_INTERFACE_PROTOCOL +
+ " set PROTOCOL = $" + SdcArtifactHandlerConstants.DEVICE_PROTOCOL +
" , DG_RPC = 'getDeviceRunningConfig' " +
" , MODULE = 'APPC' " +
- " where VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE ;
+ " where VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE ;
else
- key = "insert into " + AsdcArtifactHandlerConstants.DB_DEVICE_INTERFACE_PROTOCOL+
- " set VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE +
- " , PROTOCOL = $" + AsdcArtifactHandlerConstants.DEVICE_PROTOCOL +
+ key = "insert into " + SdcArtifactHandlerConstants.DB_DEVICE_INTERFACE_PROTOCOL+
+ " set VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE +
+ " , PROTOCOL = $" + SdcArtifactHandlerConstants.DEVICE_PROTOCOL +
" , DG_RPC = 'getDeviceRunningConfig' " +
" , MODULE = 'APPC' " ;
@@ -289,17 +289,17 @@ public class DBService {
String key = "";
QueryStatus status = null;
if(isUpdate)
- key = "update " + AsdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION +
- " set USER_NAME = $" + AsdcArtifactHandlerConstants.USER_NAME +
+ key = "update " + SdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION +
+ " set USER_NAME = $" + SdcArtifactHandlerConstants.USER_NAME +
" , PASSWORD = 'dummy' " +
- " , PORT_NUMBER = $" + AsdcArtifactHandlerConstants.PORT_NUMBER +
- " where VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE ;
+ " , PORT_NUMBER = $" + SdcArtifactHandlerConstants.PORT_NUMBER +
+ " where VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE ;
else
- key = "insert into " + AsdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION+
- " set VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE +
- " , USER_NAME = $" + AsdcArtifactHandlerConstants.USER_NAME +
+ key = "insert into " + SdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION+
+ " set VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE +
+ " , USER_NAME = $" + SdcArtifactHandlerConstants.USER_NAME +
" , PASSWORD = 'dummy' " +
- " , PORT_NUMBER = $" + AsdcArtifactHandlerConstants.PORT_NUMBER;
+ " , PORT_NUMBER = $" + SdcArtifactHandlerConstants.PORT_NUMBER;
if (serviceLogic != null && context != null) {
status = serviceLogic.save("SQL", false, false, key, null, null, context);
@@ -313,37 +313,37 @@ public class DBService {
log.info(fn + "Starting DB operation for Vnfc Reference " + isUpdate );
String key = "";
int vm_instance = -1 ;
- if(context.getAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE) !=null)
- vm_instance = Integer.parseInt(context.getAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE));
+ if(context.getAttribute(SdcArtifactHandlerConstants.VM_INSTANCE) !=null)
+ vm_instance = Integer.parseInt(context.getAttribute(SdcArtifactHandlerConstants.VM_INSTANCE));
int vnfc_instance = -1 ;
- if(context.getAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE) !=null)
- vnfc_instance = Integer.parseInt(context.getAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE));
+ if(context.getAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE) !=null)
+ vnfc_instance = Integer.parseInt(context.getAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE));
QueryStatus status = null;
if(isUpdate)
- key = "update " + AsdcArtifactHandlerConstants.DB_VNFC_REFERENCE +
+ key = "update " + SdcArtifactHandlerConstants.DB_VNFC_REFERENCE +
" set VM_INSTANCE = " + vm_instance +
" , VNFC_INSTANCE = " + vnfc_instance +
- " , VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE +
- " , VNFC_FUNCTION_CODE = $" + AsdcArtifactHandlerConstants.VNFC_FUNCTION_CODE +
- " , GROUP_NOTATION_TYPE = $" + AsdcArtifactHandlerConstants.GROUP_NOTATION_TYPE +
- " , GROUP_NOTATION_VALUE = $" + AsdcArtifactHandlerConstants.GROUP_NOTATION_VALUE +
- " , IPADDRESS_V4_OAM_VIP = $" + AsdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP +
- " where VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE +
- " and ACTION = $" + AsdcArtifactHandlerConstants.ACTION +
- " and VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE +
- " and VNFC_INSTANCE = $" + AsdcArtifactHandlerConstants.VNFC_INSTANCE
- + " and VM_INSTANCE = $" + AsdcArtifactHandlerConstants.VM_INSTANCE ;
+ " , VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE +
+ " , VNFC_FUNCTION_CODE = $" + SdcArtifactHandlerConstants.VNFC_FUNCTION_CODE +
+ " , GROUP_NOTATION_TYPE = $" + SdcArtifactHandlerConstants.GROUP_NOTATION_TYPE +
+ " , GROUP_NOTATION_VALUE = $" + SdcArtifactHandlerConstants.GROUP_NOTATION_VALUE +
+ " , IPADDRESS_V4_OAM_VIP = $" + SdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP +
+ " where VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE +
+ " and ACTION = $" + SdcArtifactHandlerConstants.ACTION +
+ " and VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE +
+ " and VNFC_INSTANCE = $" + SdcArtifactHandlerConstants.VNFC_INSTANCE
+ + " and VM_INSTANCE = $" + SdcArtifactHandlerConstants.VM_INSTANCE ;
else
- key = "insert into " + AsdcArtifactHandlerConstants.DB_VNFC_REFERENCE+
- " set VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE +
- " , ACTION = $" + AsdcArtifactHandlerConstants.ACTION +
- " , VM_INSTANCE = $" + AsdcArtifactHandlerConstants.VM_INSTANCE +
- " , VNFC_INSTANCE = $" + AsdcArtifactHandlerConstants.VNFC_INSTANCE +
- " , VNFC_TYPE = $" + AsdcArtifactHandlerConstants.VNFC_TYPE +
- " , VNFC_FUNCTION_CODE = $" + AsdcArtifactHandlerConstants.VNFC_FUNCTION_CODE +
- " , GROUP_NOTATION_TYPE = $" + AsdcArtifactHandlerConstants.GROUP_NOTATION_TYPE +
- " , IPADDRESS_V4_OAM_VIP = $" + AsdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP +
- " , GROUP_NOTATION_VALUE = $" + AsdcArtifactHandlerConstants.GROUP_NOTATION_VALUE ;
+ key = "insert into " + SdcArtifactHandlerConstants.DB_VNFC_REFERENCE+
+ " set VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE +
+ " , ACTION = $" + SdcArtifactHandlerConstants.ACTION +
+ " , VM_INSTANCE = $" + SdcArtifactHandlerConstants.VM_INSTANCE +
+ " , VNFC_INSTANCE = $" + SdcArtifactHandlerConstants.VNFC_INSTANCE +
+ " , VNFC_TYPE = $" + SdcArtifactHandlerConstants.VNFC_TYPE +
+ " , VNFC_FUNCTION_CODE = $" + SdcArtifactHandlerConstants.VNFC_FUNCTION_CODE +
+ " , GROUP_NOTATION_TYPE = $" + SdcArtifactHandlerConstants.GROUP_NOTATION_TYPE +
+ " , IPADDRESS_V4_OAM_VIP = $" + SdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP +
+ " , GROUP_NOTATION_VALUE = $" + SdcArtifactHandlerConstants.GROUP_NOTATION_VALUE ;
if (serviceLogic != null && context != null) {
status = serviceLogic.save("SQL", false, false, key, null, null, context);
@@ -359,13 +359,13 @@ public class DBService {
QueryStatus status = null;
if(isUpdate)
- key = "update " + AsdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE +
- " set DOWNLOAD_CONFIG_DG = $" + AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
- " where PROTOCOL = $" + AsdcArtifactHandlerConstants.DEVICE_PROTOCOL ;
+ key = "update " + SdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE +
+ " set DOWNLOAD_CONFIG_DG = $" + SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
+ " where PROTOCOL = $" + SdcArtifactHandlerConstants.DEVICE_PROTOCOL ;
else
- key = "insert into " + AsdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE+
- " set DOWNLOAD_CONFIG_DG = $" + AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
- " , PROTOCOL = $" + AsdcArtifactHandlerConstants.DEVICE_PROTOCOL ;
+ key = "insert into " + SdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE+
+ " set DOWNLOAD_CONFIG_DG = $" + SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
+ " , PROTOCOL = $" + SdcArtifactHandlerConstants.DEVICE_PROTOCOL ;
if (serviceLogic != null && context != null)
status = serviceLogic.save("SQL", false, false, key, null, null, context);
@@ -379,18 +379,18 @@ public class DBService {
String key = "";
QueryStatus status = null;
- if(context.getAttribute(AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE) != null &&
- context.getAttribute(AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE).length() > 0){
+ if(context.getAttribute(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE) != null &&
+ context.getAttribute(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE).length() > 0){
if(isUpdate)
- key = "update " + AsdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG +
- " set DOWNLOAD_CONFIG_DG = $" + AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
- " where ACTION = $" + AsdcArtifactHandlerConstants.ACTION +
- " and VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE ;
+ key = "update " + SdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG +
+ " set DOWNLOAD_CONFIG_DG = $" + SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
+ " where ACTION = $" + SdcArtifactHandlerConstants.ACTION +
+ " and VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE ;
else
- key = "insert into " + AsdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG+
- " set DOWNLOAD_CONFIG_DG = $" + AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
- " , ACTION = $" + AsdcArtifactHandlerConstants.ACTION +
- " , VNF_TYPE = $" + AsdcArtifactHandlerConstants.VNF_TYPE ;
+ key = "insert into " + SdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG+
+ " set DOWNLOAD_CONFIG_DG = $" + SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE +
+ " , ACTION = $" + SdcArtifactHandlerConstants.ACTION +
+ " , VNF_TYPE = $" + SdcArtifactHandlerConstants.VNF_TYPE ;
if (serviceLogic != null && context != null)
status = serviceLogic.save("SQL", false, false, key, null, null, context);
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/node/ArtifactHandlerNode.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/node/ArtifactHandlerNode.java
index e4cefad48..c6d1c1c36 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/node/ArtifactHandlerNode.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/node/ArtifactHandlerNode.java
@@ -33,7 +33,7 @@ import org.json.JSONArray;
import org.json.JSONObject;
import org.openecomp.appc.artifact.handler.dbservices.DBService;
import org.openecomp.appc.artifact.handler.utils.ArtifactHandlerProviderUtil;
-import org.openecomp.appc.artifact.handler.utils.AsdcArtifactHandlerConstants;
+import org.openecomp.appc.artifact.handler.utils.SdcArtifactHandlerConstants;
import org.openecomp.appc.yang.YANGGenerator;
import org.openecomp.appc.yang.impl.YANGGeneratorFactory;
import org.openecomp.sdnc.config.params.transformer.tosca.ArtifactProcessorImpl;
@@ -58,7 +58,7 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
String postData = inParams.get("postData");
JSONObject input = new JSONObject(postData).getJSONObject("input");
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
- storeUpdateAsdcArtifacts(input);
+ storeUpdateSdcArtifacts(input);
}
}
catch(Exception e){
@@ -67,26 +67,26 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
}
}
- private boolean storeUpdateAsdcArtifacts(JSONObject postDataJson) throws Exception {
- log.info("Starting processing of ASDC Artifacs into Handler with Data : " + postDataJson.toString());
+ private boolean storeUpdateSdcArtifacts(JSONObject postDataJson) throws Exception {
+ log.info("Starting processing of SDC Artifacs into Handler with Data : " + postDataJson.toString());
try{
- JSONObject request_information = (JSONObject)postDataJson.get(AsdcArtifactHandlerConstants.REQUEST_INFORMATION);
- JSONObject document_information =(JSONObject)postDataJson.get(AsdcArtifactHandlerConstants.DOCUMENT_PARAMETERS);
- String artifact_name = document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME);
+ JSONObject request_information = (JSONObject)postDataJson.get(SdcArtifactHandlerConstants.REQUEST_INFORMATION);
+ JSONObject document_information =(JSONObject)postDataJson.get(SdcArtifactHandlerConstants.DOCUMENT_PARAMETERS);
+ String artifact_name = document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME);
if(artifact_name !=null){
updateStoreArtifacts(request_information, document_information );
- if(artifact_name.toLowerCase().startsWith(AsdcArtifactHandlerConstants.REFERENCE))
+ if(artifact_name.toLowerCase().startsWith(SdcArtifactHandlerConstants.REFERENCE))
return storeReferenceData(request_information, document_information );
- else if (artifact_name.toLowerCase().startsWith(AsdcArtifactHandlerConstants.PD))
+ else if (artifact_name.toLowerCase().startsWith(SdcArtifactHandlerConstants.PD))
return createDataForPD(request_information, document_information );
}
else
- throw new Exception("Missing Artifact Name for Request : " + request_information.getString(AsdcArtifactHandlerConstants.REQUETS_ID));
+ throw new Exception("Missing Artifact Name for Request : " + request_information.getString(SdcArtifactHandlerConstants.REQUETS_ID));
}
catch(Exception e){
e.printStackTrace();
- throw new Exception("Error while processing Request ID : " + ((JSONObject)postDataJson.get(AsdcArtifactHandlerConstants.REQUEST_INFORMATION)).getString(AsdcArtifactHandlerConstants.REQUETS_ID) + e.getMessage());
+ throw new Exception("Error while processing Request ID : " + ((JSONObject)postDataJson.get(SdcArtifactHandlerConstants.REQUEST_INFORMATION)).getString(SdcArtifactHandlerConstants.REQUETS_ID) + e.getMessage());
}
return false;
@@ -94,11 +94,11 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
private boolean createDataForPD(JSONObject request_information, JSONObject document_information) throws Exception {
String fn = "ArtifactHandlerNode.createReferenceDataForPD";
- String artifact_name = document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME);
- log.info(fn + "Received PD File Name: " + artifact_name + " and suffix lenght " + AsdcArtifactHandlerConstants.PD.length());
+ String artifact_name = document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME);
+ log.info(fn + "Received PD File Name: " + artifact_name + " and suffix lenght " + SdcArtifactHandlerConstants.PD.length());
try {
- String suffix = artifact_name.substring(AsdcArtifactHandlerConstants.PD.length());
+ String suffix = artifact_name.substring(SdcArtifactHandlerConstants.PD.length());
createArtifactRecords(request_information, document_information, suffix);
} catch (Exception e) {
e.printStackTrace();
@@ -109,10 +109,10 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
private void createArtifactRecords(JSONObject request_information, JSONObject document_information, String suffix) throws Exception {
- log.info("Creating Tosca Records and storing into ASDC Artifacs");
+ log.info("Creating Tosca Records and storing into SDC Artifacs");
String [] docs = {"Tosca", "Yang"};
ArtifactHandlerProviderUtil ahpUtil = new ArtifactHandlerProviderUtil();
- String PDFileContents = document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS);
+ String PDFileContents = document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS);
//Tosca generation
OutputStream toscaStream = new ByteArrayOutputStream();
@@ -130,13 +130,13 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
String yangName = null;
for(String doc : docs){
- document_information.put(AsdcArtifactHandlerConstants.ARTIFACT_TYPE, doc.concat("Type"));
- document_information.put(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, doc.concat("Model"));
+ document_information.put(SdcArtifactHandlerConstants.ARTIFACT_TYPE, doc.concat("Type"));
+ document_information.put(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, doc.concat("Model"));
if(doc.equals("Tosca"))
- document_information.put(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS, ahpUtil.escapeSql(toscaContents));
+ document_information.put(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS, ahpUtil.escapeSql(toscaContents));
else if (doc.equals("Yang"))
- document_information.put(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS, ahpUtil.escapeSql(yangContents));
- document_information.put(AsdcArtifactHandlerConstants.ARTIFACT_NAME, doc.concat(suffix));
+ document_information.put(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS, ahpUtil.escapeSql(yangContents));
+ document_information.put(SdcArtifactHandlerConstants.ARTIFACT_NAME, doc.concat(suffix));
yangName = doc.concat(suffix);
updateStoreArtifacts(request_information, document_information);
}
@@ -167,40 +167,40 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
}
private boolean updateStoreArtifacts(JSONObject request_information, JSONObject document_information ) throws Exception {
- log.info("UpdateStoreArtifactsStarted storing of ASDC Artifacs ");
+ log.info("UpdateStoreArtifactsStarted storing of SDC Artifacs ");
SvcLogicContext context = new SvcLogicContext();
DBService dbservice = DBService.initialise();
ArtifactHandlerProviderUtil ahpUtil = new ArtifactHandlerProviderUtil();
int intversion = 0;
- context.setAttribute("artifact_name",document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME));
- String internal_version = dbservice.getInternalVersionNumber(context, document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME), null);
+ context.setAttribute("artifact_name",document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME));
+ String internal_version = dbservice.getInternalVersionNumber(context, document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME), null);
log.info("Internal Version number received from Database : " + internal_version);
if(internal_version != null){
intversion = Integer.parseInt(internal_version);
intversion++ ;
}
- context.setAttribute(AsdcArtifactHandlerConstants.SERVICE_UUID, document_information.getString(AsdcArtifactHandlerConstants.SERVICE_UUID));
- context.setAttribute(AsdcArtifactHandlerConstants.DISTRIBUTION_ID, document_information.getString(AsdcArtifactHandlerConstants.DISTRIBUTION_ID));
- context.setAttribute(AsdcArtifactHandlerConstants.SERVICE_NAME, document_information.getString(AsdcArtifactHandlerConstants.SERVICE_NAME));
- context.setAttribute(AsdcArtifactHandlerConstants.SERVICE_DESCRIPTION, document_information.getString(AsdcArtifactHandlerConstants.SERVICE_DESCRIPTION));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_UUID, document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_UUID));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME,document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_VERSOIN, document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_VERSOIN));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_TYPE, document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_TYPE));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_UUID, document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_UUID));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_TYPE,document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_TYPE));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_VERSOIN,document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_VERSOIN));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION,document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS,ahpUtil.escapeSql(document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS)));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME,document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME));
+ context.setAttribute(SdcArtifactHandlerConstants.SERVICE_UUID, document_information.getString(SdcArtifactHandlerConstants.SERVICE_UUID));
+ context.setAttribute(SdcArtifactHandlerConstants.DISTRIBUTION_ID, document_information.getString(SdcArtifactHandlerConstants.DISTRIBUTION_ID));
+ context.setAttribute(SdcArtifactHandlerConstants.SERVICE_NAME, document_information.getString(SdcArtifactHandlerConstants.SERVICE_NAME));
+ context.setAttribute(SdcArtifactHandlerConstants.SERVICE_DESCRIPTION, document_information.getString(SdcArtifactHandlerConstants.SERVICE_DESCRIPTION));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_UUID, document_information.getString(SdcArtifactHandlerConstants.RESOURCE_UUID));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME,document_information.getString(SdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_VERSOIN, document_information.getString(SdcArtifactHandlerConstants.RESOURCE_VERSOIN));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_TYPE, document_information.getString(SdcArtifactHandlerConstants.RESOURCE_TYPE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_UUID, document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_UUID));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_TYPE,document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_TYPE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_VERSOIN,document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_VERSOIN));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION,document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS,ahpUtil.escapeSql(document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS)));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME,document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME));
dbservice.saveArtifacts(context, intversion);
return true;
}
public boolean storeReferenceData(JSONObject request_information, JSONObject document_information) throws Exception {
- log.info("Started storing of ASDC Artifacs into Handler" );
+ log.info("Started storing of SDC Artifacs into Handler" );
try{
boolean updateRequired = false;
boolean pdFile = false;
@@ -208,9 +208,9 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
String categorySuffix = null;
DBService dbservice = DBService.initialise();
ArtifactHandlerProviderUtil ahpUtil = new ArtifactHandlerProviderUtil();
- String contentString = ahpUtil.escapeSql(document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS)) ;
- String artifactName=ahpUtil.escapeSql(document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME));
- String capabilityArtifactName=StringUtils.replace(artifactName,AsdcArtifactHandlerConstants.ARTIFACT_NAME_REFERENCE,AsdcArtifactHandlerConstants.ARTIFACT_NAME_CAPABILITY);
+ String contentString = ahpUtil.escapeSql(document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS)) ;
+ String artifactName=ahpUtil.escapeSql(document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME));
+ String capabilityArtifactName=StringUtils.replace(artifactName, SdcArtifactHandlerConstants.ARTIFACT_NAME_REFERENCE, SdcArtifactHandlerConstants.ARTIFACT_NAME_CAPABILITY);
JSONObject capabilities = new JSONObject();
JSONArray vnfActionList = new JSONArray();
JSONArray vfModuleActionList = new JSONArray();
@@ -226,105 +226,105 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
JSONObject scope = content.getJSONObject("scope");
log.info("scope :" + scope);
SvcLogicContext context = new SvcLogicContext();
- vnfType=scope.getString(AsdcArtifactHandlerConstants.VNF_TYPE);
- context.setAttribute(AsdcArtifactHandlerConstants.VNF_TYPE, scope.getString(AsdcArtifactHandlerConstants.VNF_TYPE));
- context.setAttribute(AsdcArtifactHandlerConstants.ACTION, content.getString(AsdcArtifactHandlerConstants.ACTION));
- String actionLevel=content.getString(AsdcArtifactHandlerConstants.ACTION_LEVEL);
- context.setAttribute(AsdcArtifactHandlerConstants.ACTION_LEVEL, content.getString(AsdcArtifactHandlerConstants.ACTION_LEVEL));
- if ((null != actionLevel) && actionLevel.equalsIgnoreCase(AsdcArtifactHandlerConstants.ACTION_LEVEL_VNFC)) {
- vnfcActionList.put(content.getString(AsdcArtifactHandlerConstants.ACTION));
+ vnfType=scope.getString(SdcArtifactHandlerConstants.VNF_TYPE);
+ context.setAttribute(SdcArtifactHandlerConstants.VNF_TYPE, scope.getString(SdcArtifactHandlerConstants.VNF_TYPE));
+ context.setAttribute(SdcArtifactHandlerConstants.ACTION, content.getString(SdcArtifactHandlerConstants.ACTION));
+ String actionLevel=content.getString(SdcArtifactHandlerConstants.ACTION_LEVEL);
+ context.setAttribute(SdcArtifactHandlerConstants.ACTION_LEVEL, content.getString(SdcArtifactHandlerConstants.ACTION_LEVEL));
+ if ((null != actionLevel) && actionLevel.equalsIgnoreCase(SdcArtifactHandlerConstants.ACTION_LEVEL_VNFC)) {
+ vnfcActionList.put(content.getString(SdcArtifactHandlerConstants.ACTION));
}
- if (null != actionLevel && actionLevel.equalsIgnoreCase(AsdcArtifactHandlerConstants.ACTION_LEVEL_VF_MODULE)) {
- vfModuleActionList.put(content.getString(AsdcArtifactHandlerConstants.ACTION));
+ if (null != actionLevel && actionLevel.equalsIgnoreCase(SdcArtifactHandlerConstants.ACTION_LEVEL_VF_MODULE)) {
+ vfModuleActionList.put(content.getString(SdcArtifactHandlerConstants.ACTION));
}
- if (null != actionLevel && actionLevel.equalsIgnoreCase(AsdcArtifactHandlerConstants.ACTION_LEVEL_VNF)) {
- vnfActionList.put(content.getString(AsdcArtifactHandlerConstants.ACTION));
+ if (null != actionLevel && actionLevel.equalsIgnoreCase(SdcArtifactHandlerConstants.ACTION_LEVEL_VNF)) {
+ vnfActionList.put(content.getString(SdcArtifactHandlerConstants.ACTION));
}
- if (null != actionLevel && actionLevel.equalsIgnoreCase(AsdcArtifactHandlerConstants.ACTION_LEVEL_VM)) {
- vmActionList.put(content.getString(AsdcArtifactHandlerConstants.ACTION));
+ if (null != actionLevel && actionLevel.equalsIgnoreCase(SdcArtifactHandlerConstants.ACTION_LEVEL_VM)) {
+ vmActionList.put(content.getString(SdcArtifactHandlerConstants.ACTION));
}
- if(scope.has(AsdcArtifactHandlerConstants.VNFC_TYPE) && !scope.isNull(AsdcArtifactHandlerConstants.VNFC_TYPE) )
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE, scope.getString(AsdcArtifactHandlerConstants.VNFC_TYPE));
+ if(scope.has(SdcArtifactHandlerConstants.VNFC_TYPE) && !scope.isNull(SdcArtifactHandlerConstants.VNFC_TYPE) )
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_TYPE, scope.getString(SdcArtifactHandlerConstants.VNFC_TYPE));
else
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE,null);
- if (content.has(AsdcArtifactHandlerConstants.DEVICE_PROTOCOL))
- context.setAttribute(AsdcArtifactHandlerConstants.DEVICE_PROTOCOL, content.getString(AsdcArtifactHandlerConstants.DEVICE_PROTOCOL));
- if (content.has(AsdcArtifactHandlerConstants.USER_NAME))
- context.setAttribute(AsdcArtifactHandlerConstants.USER_NAME, content.getString(AsdcArtifactHandlerConstants.USER_NAME));
- if (content.has(AsdcArtifactHandlerConstants.PORT_NUMBER))
- context.setAttribute(AsdcArtifactHandlerConstants.PORT_NUMBER, content.getString(AsdcArtifactHandlerConstants.PORT_NUMBER));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_TYPE, "");
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_TYPE,null);
+ if (content.has(SdcArtifactHandlerConstants.DEVICE_PROTOCOL))
+ context.setAttribute(SdcArtifactHandlerConstants.DEVICE_PROTOCOL, content.getString(SdcArtifactHandlerConstants.DEVICE_PROTOCOL));
+ if (content.has(SdcArtifactHandlerConstants.USER_NAME))
+ context.setAttribute(SdcArtifactHandlerConstants.USER_NAME, content.getString(SdcArtifactHandlerConstants.USER_NAME));
+ if (content.has(SdcArtifactHandlerConstants.PORT_NUMBER))
+ context.setAttribute(SdcArtifactHandlerConstants.PORT_NUMBER, content.getString(SdcArtifactHandlerConstants.PORT_NUMBER));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_TYPE, "");
if(content.has("artifact-list") && content.get("artifact-list") instanceof JSONArray){
JSONArray artifactLists = (JSONArray)content.get("artifact-list");
for(int i=0;i<artifactLists.length();i++){
JSONObject artifact=(JSONObject)artifactLists.get(i);
log.info("artifact is " + artifact);
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME, artifact.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME));
- context.setAttribute(AsdcArtifactHandlerConstants.FILE_CATEGORY, artifact.getString(AsdcArtifactHandlerConstants.ARTIFACT_TYPE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME, artifact.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME));
+ context.setAttribute(SdcArtifactHandlerConstants.FILE_CATEGORY, artifact.getString(SdcArtifactHandlerConstants.ARTIFACT_TYPE));
- if(artifact.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME) !=null &&
- artifact.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME).toLowerCase().startsWith(AsdcArtifactHandlerConstants.PD))
+ if(artifact.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME) !=null &&
+ artifact.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME).toLowerCase().startsWith(SdcArtifactHandlerConstants.PD))
{
- suffix = artifact.getString(AsdcArtifactHandlerConstants.ARTIFACT_NAME).substring(AsdcArtifactHandlerConstants.PD.length());
- categorySuffix = artifact.getString(AsdcArtifactHandlerConstants.ARTIFACT_TYPE).substring(AsdcArtifactHandlerConstants.PD.length());
+ suffix = artifact.getString(SdcArtifactHandlerConstants.ARTIFACT_NAME).substring(SdcArtifactHandlerConstants.PD.length());
+ categorySuffix = artifact.getString(SdcArtifactHandlerConstants.ARTIFACT_TYPE).substring(SdcArtifactHandlerConstants.PD.length());
pdFile = true;
}
- dbservice.processAsdcReferences(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE));
+ dbservice.processSdcReferences(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_SDC_REFERENCE));
cleanArtifactInstanceData(context);
}
if(pdFile)
{
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME, "Tosca".concat(suffix));
- context.setAttribute(AsdcArtifactHandlerConstants.FILE_CATEGORY, AsdcArtifactHandlerConstants.TOSCA_MODEL);
- dbservice.processAsdcReferences(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME, "Yang".concat(suffix));
- context.setAttribute(AsdcArtifactHandlerConstants.FILE_CATEGORY, AsdcArtifactHandlerConstants.PARAMETER_YANG);
- dbservice.processAsdcReferences(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME, "Tosca".concat(suffix));
+ context.setAttribute(SdcArtifactHandlerConstants.FILE_CATEGORY, SdcArtifactHandlerConstants.TOSCA_MODEL);
+ dbservice.processSdcReferences(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_SDC_REFERENCE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME, "Yang".concat(suffix));
+ context.setAttribute(SdcArtifactHandlerConstants.FILE_CATEGORY, SdcArtifactHandlerConstants.PARAMETER_YANG);
+ dbservice.processSdcReferences(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_SDC_REFERENCE));
}
}
- if (content.getString(AsdcArtifactHandlerConstants.ACTION).equals("Configure")) {
- if(content.has(AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE) && content.getString(AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE).length() > 0){
- context.setAttribute(AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE, content.getString(AsdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE));
- dbservice.processDownloadDgReference(context, dbservice.isArtifactUpdateRequired(context,AsdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE));
+ if (content.getString(SdcArtifactHandlerConstants.ACTION).equals("Configure")) {
+ if(content.has(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE) && content.getString(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE).length() > 0){
+ context.setAttribute(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE, content.getString(SdcArtifactHandlerConstants.DOWNLOAD_DG_REFERENCE));
+ dbservice.processDownloadDgReference(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_DOWNLOAD_DG_REFERENCE));
}
- dbservice.processConfigActionDg(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG));
- dbservice.processDeviceInterfaceProtocol(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_DEVICE_INTERFACE_PROTOCOL));
- dbservice.processDeviceAuthentication(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION));
+ dbservice.processConfigActionDg(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_CONFIG_ACTION_DG));
+ dbservice.processDeviceInterfaceProtocol(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_DEVICE_INTERFACE_PROTOCOL));
+ dbservice.processDeviceAuthentication(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_DEVICE_AUTHENTICATION));
}
populateProtocolReference(dbservice, content);
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_TYPE, null);
- if( content.has(AsdcArtifactHandlerConstants.VM) && content.get(AsdcArtifactHandlerConstants.VM) instanceof JSONArray){
- JSONArray vmList = (JSONArray)content.get(AsdcArtifactHandlerConstants.VM);
+ if( content.has(SdcArtifactHandlerConstants.VM) && content.get(SdcArtifactHandlerConstants.VM) instanceof JSONArray){
+ JSONArray vmList = (JSONArray)content.get(SdcArtifactHandlerConstants.VM);
for(int i=0;i<vmList.length();i++){
JSONObject vmInstance=(JSONObject)vmList.get(i);
- context.setAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE, String.valueOf(vmInstance.getInt(AsdcArtifactHandlerConstants.VM_INSTANCE)));
- log.info("VALUE = " + context.getAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE));
- if(vmInstance.get(AsdcArtifactHandlerConstants.VNFC) instanceof JSONArray){
- JSONArray vnfcInstanceList = (JSONArray)vmInstance.get(AsdcArtifactHandlerConstants.VNFC);
+ context.setAttribute(SdcArtifactHandlerConstants.VM_INSTANCE, String.valueOf(vmInstance.getInt(SdcArtifactHandlerConstants.VM_INSTANCE)));
+ log.info("VALUE = " + context.getAttribute(SdcArtifactHandlerConstants.VM_INSTANCE));
+ if(vmInstance.get(SdcArtifactHandlerConstants.VNFC) instanceof JSONArray){
+ JSONArray vnfcInstanceList = (JSONArray)vmInstance.get(SdcArtifactHandlerConstants.VNFC);
for(int k=0;k<vnfcInstanceList.length();k++){
JSONObject vnfcInstance = (JSONObject)vnfcInstanceList.get(k);
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE, String.valueOf(vnfcInstance.getInt(AsdcArtifactHandlerConstants.VNFC_INSTANCE)));
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE, vnfcInstance.getString(AsdcArtifactHandlerConstants.VNFC_TYPE));
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_FUNCTION_CODE, vnfcInstance.getString(AsdcArtifactHandlerConstants.VNFC_FUNCTION_CODE));
- if(vnfcInstance.has(AsdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP))
- context.setAttribute(AsdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP, vnfcInstance.getString(AsdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP));
- if(vnfcInstance.has(AsdcArtifactHandlerConstants.GROUP_NOTATION_TYPE))
- context.setAttribute(AsdcArtifactHandlerConstants.GROUP_NOTATION_TYPE, vnfcInstance.getString(AsdcArtifactHandlerConstants.GROUP_NOTATION_TYPE));
- if(vnfcInstance.has(AsdcArtifactHandlerConstants.GROUP_NOTATION_VALUE))
- context.setAttribute(AsdcArtifactHandlerConstants.GROUP_NOTATION_VALUE, vnfcInstance.getString(AsdcArtifactHandlerConstants.GROUP_NOTATION_VALUE));
- dbservice.processVnfcReference(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_VNFC_REFERENCE));
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE, String.valueOf(vnfcInstance.getInt(SdcArtifactHandlerConstants.VNFC_INSTANCE)));
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_TYPE, vnfcInstance.getString(SdcArtifactHandlerConstants.VNFC_TYPE));
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_FUNCTION_CODE, vnfcInstance.getString(SdcArtifactHandlerConstants.VNFC_FUNCTION_CODE));
+ if(vnfcInstance.has(SdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP))
+ context.setAttribute(SdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP, vnfcInstance.getString(SdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP));
+ if(vnfcInstance.has(SdcArtifactHandlerConstants.GROUP_NOTATION_TYPE))
+ context.setAttribute(SdcArtifactHandlerConstants.GROUP_NOTATION_TYPE, vnfcInstance.getString(SdcArtifactHandlerConstants.GROUP_NOTATION_TYPE));
+ if(vnfcInstance.has(SdcArtifactHandlerConstants.GROUP_NOTATION_VALUE))
+ context.setAttribute(SdcArtifactHandlerConstants.GROUP_NOTATION_VALUE, vnfcInstance.getString(SdcArtifactHandlerConstants.GROUP_NOTATION_VALUE));
+ dbservice.processVnfcReference(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_VNFC_REFERENCE));
cleanVnfcInstance(context);
}
- context.setAttribute(AsdcArtifactHandlerConstants.VM_INSTANCE,null);
+ context.setAttribute(SdcArtifactHandlerConstants.VM_INSTANCE,null);
}
}
}
@@ -353,18 +353,18 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
private void cleanArtifactInstanceData(SvcLogicContext context)
{
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME, null);
- context.setAttribute(AsdcArtifactHandlerConstants.FILE_CATEGORY, null);
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME, null);
+ context.setAttribute(SdcArtifactHandlerConstants.FILE_CATEGORY, null);
}
private void cleanVnfcInstance(SvcLogicContext context) {
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_INSTANCE, null);
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE, null);
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_FUNCTION_CODE, null);
- context.setAttribute(AsdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP, null);
- context.setAttribute(AsdcArtifactHandlerConstants.GROUP_NOTATION_TYPE, null);
- context.setAttribute(AsdcArtifactHandlerConstants.GROUP_NOTATION_VALUE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_INSTANCE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_TYPE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_FUNCTION_CODE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.IPADDRESS_V4_OAM_VIP, null);
+ context.setAttribute(SdcArtifactHandlerConstants.GROUP_NOTATION_TYPE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.GROUP_NOTATION_VALUE, null);
}
@@ -377,33 +377,33 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
JSONObject newCapabilitiesObject=new JSONObject();
newCapabilitiesObject.put("capabilities", capabilities);
SvcLogicContext context = new SvcLogicContext();
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME,capabilityArtifactName);
- context.setAttribute(AsdcArtifactHandlerConstants.FILE_CATEGORY, AsdcArtifactHandlerConstants.CAPABILITY);
- context.setAttribute(AsdcArtifactHandlerConstants.ACTION, null);
- context.setAttribute(AsdcArtifactHandlerConstants.VNFC_TYPE, null);
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_TYPE, null);
- context.setAttribute(AsdcArtifactHandlerConstants.VNF_TYPE,vnfType);
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_CONTENTS,newCapabilitiesObject.toString());
- dbservice.processAsdcReferences(context, dbservice.isArtifactUpdateRequired(context, AsdcArtifactHandlerConstants.DB_ASDC_REFERENCE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME,capabilityArtifactName);
+ context.setAttribute(SdcArtifactHandlerConstants.FILE_CATEGORY, SdcArtifactHandlerConstants.CAPABILITY);
+ context.setAttribute(SdcArtifactHandlerConstants.ACTION, null);
+ context.setAttribute(SdcArtifactHandlerConstants.VNFC_TYPE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_TYPE, null);
+ context.setAttribute(SdcArtifactHandlerConstants.VNF_TYPE,vnfType);
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_CONTENTS,newCapabilitiesObject.toString());
+ dbservice.processSdcReferences(context, dbservice.isArtifactUpdateRequired(context, SdcArtifactHandlerConstants.DB_SDC_REFERENCE));
int intversion = 0;
- String internal_version = dbservice.getInternalVersionNumber(context, context.getAttribute(AsdcArtifactHandlerConstants.ARTIFACT_NAME), null);
+ String internal_version = dbservice.getInternalVersionNumber(context, context.getAttribute(SdcArtifactHandlerConstants.ARTIFACT_NAME), null);
log.info("Internal Version number received from Database : " + internal_version);
if(internal_version != null){
intversion = Integer.parseInt(internal_version);
intversion++ ;
}
- context.setAttribute(AsdcArtifactHandlerConstants.SERVICE_UUID, document_information.getString(AsdcArtifactHandlerConstants.SERVICE_UUID));
- context.setAttribute(AsdcArtifactHandlerConstants.DISTRIBUTION_ID, document_information.getString(AsdcArtifactHandlerConstants.DISTRIBUTION_ID));
- context.setAttribute(AsdcArtifactHandlerConstants.SERVICE_NAME, document_information.getString(AsdcArtifactHandlerConstants.SERVICE_NAME));
- context.setAttribute(AsdcArtifactHandlerConstants.SERVICE_DESCRIPTION, document_information.getString(AsdcArtifactHandlerConstants.SERVICE_DESCRIPTION));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_UUID, document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_UUID));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME,document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_VERSOIN, document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_VERSOIN));
- context.setAttribute(AsdcArtifactHandlerConstants.RESOURCE_TYPE, document_information.getString(AsdcArtifactHandlerConstants.RESOURCE_TYPE));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_UUID, document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_UUID));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_VERSOIN,document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_VERSOIN));
- context.setAttribute(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION,document_information.getString(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION));
+ context.setAttribute(SdcArtifactHandlerConstants.SERVICE_UUID, document_information.getString(SdcArtifactHandlerConstants.SERVICE_UUID));
+ context.setAttribute(SdcArtifactHandlerConstants.DISTRIBUTION_ID, document_information.getString(SdcArtifactHandlerConstants.DISTRIBUTION_ID));
+ context.setAttribute(SdcArtifactHandlerConstants.SERVICE_NAME, document_information.getString(SdcArtifactHandlerConstants.SERVICE_NAME));
+ context.setAttribute(SdcArtifactHandlerConstants.SERVICE_DESCRIPTION, document_information.getString(SdcArtifactHandlerConstants.SERVICE_DESCRIPTION));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_UUID, document_information.getString(SdcArtifactHandlerConstants.RESOURCE_UUID));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME,document_information.getString(SdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_VERSOIN, document_information.getString(SdcArtifactHandlerConstants.RESOURCE_VERSOIN));
+ context.setAttribute(SdcArtifactHandlerConstants.RESOURCE_TYPE, document_information.getString(SdcArtifactHandlerConstants.RESOURCE_TYPE));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_UUID, document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_UUID));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_VERSOIN,document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_VERSOIN));
+ context.setAttribute(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION,document_information.getString(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION));
dbservice.saveArtifacts(context, intversion);
@@ -426,16 +426,16 @@ public class ArtifactHandlerNode implements SvcLogicJavaPlugin {
SvcLogicContext context = new SvcLogicContext();
JSONObject scope = content.getJSONObject("scope");
String vnfType=null,protocol=null,action=null,actionLevel=null,template=null;
- if(scope.has(AsdcArtifactHandlerConstants.VNF_TYPE) && !scope.isNull(AsdcArtifactHandlerConstants.VNF_TYPE))
- vnfType=scope.getString(AsdcArtifactHandlerConstants.VNF_TYPE);
- if (content.has(AsdcArtifactHandlerConstants.DEVICE_PROTOCOL))
- protocol=content.getString(AsdcArtifactHandlerConstants.DEVICE_PROTOCOL);
- if (content.has(AsdcArtifactHandlerConstants.ACTION))
- action= content.getString(AsdcArtifactHandlerConstants.ACTION);
- if (content.has(AsdcArtifactHandlerConstants.ACTION_LEVEL))
- actionLevel=content.getString(AsdcArtifactHandlerConstants.ACTION_LEVEL);
- if (content.has(AsdcArtifactHandlerConstants.TEMPLATE) && !content.isNull(AsdcArtifactHandlerConstants.TEMPLATE))
- template=content.getString(AsdcArtifactHandlerConstants.TEMPLATE);
+ if(scope.has(SdcArtifactHandlerConstants.VNF_TYPE) && !scope.isNull(SdcArtifactHandlerConstants.VNF_TYPE))
+ vnfType=scope.getString(SdcArtifactHandlerConstants.VNF_TYPE);
+ if (content.has(SdcArtifactHandlerConstants.DEVICE_PROTOCOL))
+ protocol=content.getString(SdcArtifactHandlerConstants.DEVICE_PROTOCOL);
+ if (content.has(SdcArtifactHandlerConstants.ACTION))
+ action= content.getString(SdcArtifactHandlerConstants.ACTION);
+ if (content.has(SdcArtifactHandlerConstants.ACTION_LEVEL))
+ actionLevel=content.getString(SdcArtifactHandlerConstants.ACTION_LEVEL);
+ if (content.has(SdcArtifactHandlerConstants.TEMPLATE) && !content.isNull(SdcArtifactHandlerConstants.TEMPLATE))
+ template=content.getString(SdcArtifactHandlerConstants.TEMPLATE);
dbservice.insertProtocolReference(context, vnfType,protocol,action,actionLevel,template);
}
catch (Exception e) {
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/ArtifactHandlerProviderUtil.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/ArtifactHandlerProviderUtil.java
index 91b6e88b0..96c7c0661 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/ArtifactHandlerProviderUtil.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/ArtifactHandlerProviderUtil.java
@@ -94,34 +94,34 @@ public class ArtifactHandlerProviderUtil {
JSONObject requestInfo = new JSONObject();
String random = getRandom();
- requestInfo.put(AsdcArtifactHandlerConstants.REQUETS_ID, "TLRID-" + random);
- requestInfo.put(AsdcArtifactHandlerConstants.REQUEST_ACTION, "StoreAsdcDocumentRequest");
- requestInfo.put(AsdcArtifactHandlerConstants.SOURCE, "TemplateLoader");
+ requestInfo.put(SdcArtifactHandlerConstants.REQUETS_ID, "TLRID-" + random);
+ requestInfo.put(SdcArtifactHandlerConstants.REQUEST_ACTION, "StoreSdcDocumentRequest");
+ requestInfo.put(SdcArtifactHandlerConstants.SOURCE, "TemplateLoader");
JSONObject docParams = new JSONObject();
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_UUID, "TLSUUID" + templateData.getRequestInformation().getRequestId());
- docParams.put(AsdcArtifactHandlerConstants.DISTRIBUTION_ID, "TLDID" + random);
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_NAME, "TLServiceName");
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_DESCRIPTION, "Template Loader Test");
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_ARTIFACTS, "[]");
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_UUID, "TLRUID" + random);
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME, "TLRIName");
- docParams.put(AsdcArtifactHandlerConstants.REOURCE_NAME, "TLResourceName");
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_VERSOIN, "TLResourceVersion");
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_TYPE, "TLResourceType");
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_UUID, "TLAUUID" + random);
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_NAME, templateData.getDocumentParameters().getArtifactName());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_TYPE, "APPC-CONFIG");
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_VERSOIN, templateData.getDocumentParameters().getArtifactVersion());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, "AsdcTestDescription");
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_UUID, "TLSUUID" + templateData.getRequestInformation().getRequestId());
+ docParams.put(SdcArtifactHandlerConstants.DISTRIBUTION_ID, "TLDID" + random);
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_NAME, "TLServiceName");
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_DESCRIPTION, "Template Loader Test");
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_ARTIFACTS, "[]");
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_UUID, "TLRUID" + random);
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME, "TLRIName");
+ docParams.put(SdcArtifactHandlerConstants.REOURCE_NAME, "TLResourceName");
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_VERSOIN, "TLResourceVersion");
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_TYPE, "TLResourceType");
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_UUID, "TLAUUID" + random);
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_NAME, templateData.getDocumentParameters().getArtifactName());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_TYPE, "APPC-CONFIG");
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_VERSOIN, templateData.getDocumentParameters().getArtifactVersion());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, "SdcTestDescription");
// String data = IOUtils.toString(TestartifactHandlerNode.class.getClassLoader().getResourceAsStream("template_msrp_msc_a_template.json"), "utf-8");
// String data = IOUtils.toString(TemplateProcessor.class.getClassLoader().getResourceAsStream("referenceData.json"), "utf-8");
// this.templateData = this.templateData.substring(this.templateData.indexOf("}") + 1);
docParams.put("artifact-contents", templateData.getDocumentParameters().getArtifactContents());
- json.put(AsdcArtifactHandlerConstants.REQUEST_INFORMATION, requestInfo);
- json.put(AsdcArtifactHandlerConstants.DOCUMENT_PARAMETERS, docParams);
+ json.put(SdcArtifactHandlerConstants.REQUEST_INFORMATION, requestInfo);
+ json.put(SdcArtifactHandlerConstants.DOCUMENT_PARAMETERS, docParams);
System.out.println("Final data =" + this.templateData);
return String.format("{\"input\": %s}", json.toString());
}
@@ -151,31 +151,31 @@ public class ArtifactHandlerProviderUtil {
JSONObject requestInfo = new JSONObject();
String random = getRandom();
- requestInfo.put(AsdcArtifactHandlerConstants.REQUETS_ID, templateData.getRequestInformation().getRequestId());
- requestInfo.put(AsdcArtifactHandlerConstants.REQUEST_ACTION, "StoreAsdcDocumentRequest");
- requestInfo.put(AsdcArtifactHandlerConstants.SOURCE, templateData.getRequestInformation().getSource());
+ requestInfo.put(SdcArtifactHandlerConstants.REQUETS_ID, templateData.getRequestInformation().getRequestId());
+ requestInfo.put(SdcArtifactHandlerConstants.REQUEST_ACTION, "StoreSdcDocumentRequest");
+ requestInfo.put(SdcArtifactHandlerConstants.SOURCE, templateData.getRequestInformation().getSource());
JSONObject docParams = new JSONObject();
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_UUID, templateData.getDocumentParameters().getResourceUuid());
- docParams.put(AsdcArtifactHandlerConstants.DISTRIBUTION_ID, templateData.getDocumentParameters().getDistributionId());
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_NAME, templateData.getDocumentParameters().getServiceName());
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_DESCRIPTION, templateData.getDocumentParameters().getServiceDescription());
- docParams.put(AsdcArtifactHandlerConstants.SERVICE_ARTIFACTS, templateData.getDocumentParameters().getServiceArtifacts());
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_UUID, templateData.getDocumentParameters().getResourceUuid());
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME, templateData.getDocumentParameters().getResourceInstanceName());
- docParams.put(AsdcArtifactHandlerConstants.REOURCE_NAME, templateData.getDocumentParameters().getResourceName());
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_VERSOIN, templateData.getDocumentParameters().getResourceVersion());
- docParams.put(AsdcArtifactHandlerConstants.RESOURCE_TYPE, templateData.getDocumentParameters().getResourceType());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_UUID, templateData.getDocumentParameters().getArtifactUuid());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_NAME, templateData.getDocumentParameters().getArtifactName());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_TYPE, templateData.getDocumentParameters().getArtifactType());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_VERSOIN, templateData.getDocumentParameters().getArtifactVersion());
- docParams.put(AsdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, templateData.getDocumentParameters().getArtifactDescription());
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_UUID, templateData.getDocumentParameters().getResourceUuid());
+ docParams.put(SdcArtifactHandlerConstants.DISTRIBUTION_ID, templateData.getDocumentParameters().getDistributionId());
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_NAME, templateData.getDocumentParameters().getServiceName());
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_DESCRIPTION, templateData.getDocumentParameters().getServiceDescription());
+ docParams.put(SdcArtifactHandlerConstants.SERVICE_ARTIFACTS, templateData.getDocumentParameters().getServiceArtifacts());
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_UUID, templateData.getDocumentParameters().getResourceUuid());
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_INSTANCE_NAME, templateData.getDocumentParameters().getResourceInstanceName());
+ docParams.put(SdcArtifactHandlerConstants.REOURCE_NAME, templateData.getDocumentParameters().getResourceName());
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_VERSOIN, templateData.getDocumentParameters().getResourceVersion());
+ docParams.put(SdcArtifactHandlerConstants.RESOURCE_TYPE, templateData.getDocumentParameters().getResourceType());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_UUID, templateData.getDocumentParameters().getArtifactUuid());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_NAME, templateData.getDocumentParameters().getArtifactName());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_TYPE, templateData.getDocumentParameters().getArtifactType());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_VERSOIN, templateData.getDocumentParameters().getArtifactVersion());
+ docParams.put(SdcArtifactHandlerConstants.ARTIFACT_DESRIPTION, templateData.getDocumentParameters().getArtifactDescription());
docParams.put("artifact-contents", templateData.getDocumentParameters().getArtifactContents());
- json.put(AsdcArtifactHandlerConstants.REQUEST_INFORMATION, requestInfo);
- json.put(AsdcArtifactHandlerConstants.DOCUMENT_PARAMETERS, docParams);
+ json.put(SdcArtifactHandlerConstants.REQUEST_INFORMATION, requestInfo);
+ json.put(SdcArtifactHandlerConstants.DOCUMENT_PARAMETERS, docParams);
System.out.println("Final data =" + this.templateData);
return String.format("{\"input\": %s}", json.toString());
}
diff --git a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/AsdcArtifactHandlerConstants.java b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/SdcArtifactHandlerConstants.java
index cfcb250ee..57dbb3f6f 100644
--- a/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/AsdcArtifactHandlerConstants.java
+++ b/appc-inbound/appc-artifact-handler/provider/src/main/java/org/openecomp/appc/artifact/handler/utils/SdcArtifactHandlerConstants.java
@@ -24,7 +24,7 @@
package org.openecomp.appc.artifact.handler.utils;
-public class AsdcArtifactHandlerConstants {
+public class SdcArtifactHandlerConstants {
public static final String DOCUMENT_PARAMETERS = "document-parameters";
public static final String SERVICE_UUID = "service-uuid";
@@ -72,7 +72,7 @@ public class AsdcArtifactHandlerConstants {
public static final String DB_DOWNLOAD_DG_REFERENCE = "DOWNLOAD_DG_REFERENCE";
- public static final String DB_ASDC_REFERENCE = "ASDC_REFERENCE";
+ public static final String DB_SDC_REFERENCE = "ASDC_REFERENCE";
public static final String DB_DEVICE_INTERFACE_PROTOCOL = "DEVICE_INTERFACE_PROTOCOL";
public static final String DB_DEVICE_AUTHENTICATION = "DEVICE_AUTHENTICATION";
public static final String DB_VNFC_REFERENCE = "VNFC_REFERENCE";
diff --git a/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang b/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang
index b43ce0fad..1cd80c98b 100644
--- a/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang
+++ b/appc-inbound/appc-design-services/model/src/main/yang/appc-design-services.yang
@@ -97,7 +97,7 @@ module design-services {
grouping status {
description "The specific response codes are to be aligned with APPC/ECOMP messaging Systems";
container status {
- description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
+ description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
leaf code {
description "Response code";
type string;
diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java
index ba126aff2..86c895fd5 100644
--- a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java
+++ b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/dbervices/DesignDBService.java
@@ -188,13 +188,13 @@ public class DesignDBService {
ArtifactHandlerClient ac = new ArtifactHandlerClient();
String requestString = ac.createArtifactData(payload, requestID);
ac.execute(requestString, "POST");
- int asdc_artifact_id = getASDCArtifactIDbyRequestID(requestID);
- int asdc_reference_id = getASDCReferenceID(payload);
- createArtifactTrackingRecord(payload, requestID,asdc_artifact_id, asdc_reference_id );
+ int sdc_artifact_id = getSDCArtifactIDbyRequestID(requestID);
+ int sdc_reference_id = getSDCReferenceID(payload);
+ createArtifactTrackingRecord(payload, requestID,sdc_artifact_id, sdc_reference_id );
String status = getDataFromActionStatus(payload, "STATUS");
if(status == null || status.isEmpty())
setActionStatus(payload, "Not Tested");
- linkstatusRelationShip(asdc_artifact_id,asdc_reference_id, payload);
+ linkstatusRelationShip(sdc_artifact_id,sdc_reference_id, payload);
}
catch(Exception e){
@@ -205,13 +205,13 @@ public class DesignDBService {
}
- private void linkstatusRelationShip(int asdc_artifact_id, int asdc_reference_id, String payload) throws Exception {
+ private void linkstatusRelationShip(int sdc_artifact_id, int sdc_reference_id, String payload) throws Exception {
ObjectMapper objectMapper = new ObjectMapper();
JsonNode payloadObject = objectMapper.readTree(payload);
ArrayList<String> argList = new ArrayList<>();
- argList.add(String.valueOf(asdc_artifact_id));
- argList.add(String.valueOf(asdc_reference_id));
+ argList.add(String.valueOf(sdc_artifact_id));
+ argList.add(String.valueOf(sdc_reference_id));
argList.add(payloadObject.get(DesignServiceConstants.VNF_TYPE).textValue());
argList.add(payloadObject.get(DesignServiceConstants.ACTION).textValue());
argList.add(payloadObject.get(DesignServiceConstants.USER_ID).textValue());
@@ -233,7 +233,7 @@ public class DesignDBService {
throw new Exception("Error while updating RealtionShip table");
}
- private int getASDCReferenceID(String payload) throws Exception {
+ private int getSDCReferenceID(String payload) throws Exception {
String vnfc_type = null;
ObjectMapper objectMapper = new ObjectMapper();
@@ -259,12 +259,12 @@ public class DesignDBService {
log.info("Query String :" + queryString);
ResultSet data = dbservice.getDBData(queryString, argList);
- int asdc_reference_id = 0;
+ int sdc_reference_id = 0;
while(data.next()) {
- asdc_reference_id = data.getInt("ASDC_REFERENCE_ID");
+ sdc_reference_id = data.getInt("ASDC_REFERENCE_ID");
}
- log.info("Got asdc_reference_id = " + asdc_reference_id );
- return asdc_reference_id;
+ log.info("Got sdc_reference_id = " + sdc_reference_id );
+ return sdc_reference_id;
}
@@ -320,14 +320,14 @@ public class DesignDBService {
return updateStatus;
}
- private void createArtifactTrackingRecord(String payload, String requestID, int asdc_artifact_id, int asdc_reference_id) throws Exception {
+ private void createArtifactTrackingRecord(String payload, String requestID, int sdc_artifact_id, int sdc_reference_id) throws Exception {
String vnfc_type = null;
ObjectMapper objectMapper = new ObjectMapper();
JsonNode payloadObject = objectMapper.readTree(payload);
ArrayList<String> argList = new ArrayList<>();
- argList.add(String.valueOf(asdc_artifact_id));
- argList.add(String.valueOf(asdc_reference_id));
+ argList.add(String.valueOf(sdc_artifact_id));
+ argList.add(String.valueOf(sdc_reference_id));
argList.add(payloadObject.get(DesignServiceConstants.USER_ID).textValue());
if (payloadObject.get(DesignServiceConstants.TECHNOLOGY) != null &&! payloadObject.get(DesignServiceConstants.TECHNOLOGY).textValue().isEmpty())
argList.add(payloadObject.get(DesignServiceConstants.TECHNOLOGY).textValue());
@@ -350,7 +350,7 @@ public class DesignDBService {
}
- private int getASDCArtifactIDbyRequestID(String requestID) throws Exception {
+ private int getSDCArtifactIDbyRequestID(String requestID) throws Exception {
log.info("Starting getArtifactIDbyRequestID DB Operation");
int artifact_id = 0;
try{
@@ -367,7 +367,7 @@ public class DesignDBService {
e.printStackTrace();
throw e;
}
- log.info("Got ASDC_ARTIFACTS_ID As :" + artifact_id);
+ log.info("Got SDC_ARTIFACTS_ID As :" + artifact_id);
return artifact_id;
}
@@ -567,8 +567,8 @@ public class DesignDBService {
// localContext.setAttribute("userID", UserId);
// if (serviceLogic != null && localContext != null) {
// String queryString = "SELECT AR.VNF_TYPE, AR.VNFC_TYPE, DAT.PROTOCOL, DAT.IN_CART from " +
- // DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_ASDC_REFERENCE +
- // " AR where DAT.ASDC_REFERENCE_ID= AR.ASDC_REFERENCE_ID and DAT.USER = $userID" ;
+ // DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_SDC_REFERENCE +
+ // " AR where DAT.SDC_REFERENCE_ID= AR.SDC_REFERENCE_ID and DAT.USER = $userID" ;
//
// log.info(fn + "Query String : " + queryString);
// try {
@@ -607,7 +607,7 @@ public class DesignDBService {
argList.add(UserID);
String queryString = "SELECT AR.VNF_TYPE, AR.VNFC_TYPE, DAT.PROTOCOL, DAT.IN_CART, AR.ACTION, AR.ARTIFACT_NAME, AR.ARTIFACT_TYPE from " +
- DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_ASDC_REFERENCE +
+ DesignServiceConstants.DB_DT_ARTIFACT_TRACKING + " DAT , " + DesignServiceConstants.DB_SDC_REFERENCE +
" AR where DAT.ASDC_REFERENCE_ID= AR.ASDC_REFERENCE_ID and DAT.USER = ? ";
DesignResponse designResponse = new DesignResponse();
diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java
index 6254728ee..331c48e34 100644
--- a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java
+++ b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/ArtifactHandlerClient.java
@@ -94,7 +94,7 @@ public class ArtifactHandlerClient {
ObjectNode requestInfo = objectMapper.createObjectNode();
requestInfo.put(DesignServiceConstants.REQUETS_ID, requestID);
- requestInfo.put(DesignServiceConstants.REQUEST_ACTION, "StoreAsdcDocumentRequest");
+ requestInfo.put(DesignServiceConstants.REQUEST_ACTION, "StoreSdcDocumentRequest");
requestInfo.put(DesignServiceConstants.SOURCE, DesignServiceConstants.DESIGN_TOOL);
String random = getRandom();
diff --git a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java
index 702d1d1fa..73e6ba93f 100644
--- a/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java
+++ b/appc-inbound/appc-design-services/provider/src/main/java/org/openecomp/appc/design/services/util/DesignServiceConstants.java
@@ -83,7 +83,7 @@ public class DesignServiceConstants {
public static final String DB_DT_ARTIFACT_TRACKING = "DT_ARTIFACT_TRACKING";
- public static final String DB_ASDC_REFERENCE = "ASDC_REFERENCE";
+ public static final String DB_SDC_REFERENCE = "ASDC_REFERENCE";
public static final String SCHEMA_SDNCTL = "SDNCTL";
public static final String GETARTIFACT = "getArtifact";
public static final String USER_ID = "userID";
diff --git a/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java b/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java
index d14abceb6..d1a899d14 100644
--- a/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java
+++ b/appc-inbound/appc-design-services/provider/src/test/java/org/openecomp/appc/design/validator/TestDBService.java
@@ -175,13 +175,13 @@ public class TestDBService {
}
@Test
- public void testGetASDCReferenceID() {
+ public void testGetSDCReferenceID() {
try {
String content = FileUtils.readFileToString(new File("src/test/resources/uploadArtifact"));
String payload = " { \"userID\": \"0000\",\"status\":\"Test\", \"vnf-type\" : \"DesigTest-VNF\", \"action\" : \"Configure\", \"artifact-name\":\"DesignRestArtifact_reference\",\"artifact-version\" :\"0.01\",\"artifact-type\" :\"DESIGNTOOL-TEST\",\"artifact-status\":\"\",\"artifact-contents\": "+ content + " } ";
DesignDBService design = DesignDBService.initialise();
- Whitebox.invokeMethod(design, "getASDCReferenceID", payload);
+ Whitebox.invokeMethod(design, "getSDCReferenceID", payload);
} catch (Exception e) {
}
}
@@ -209,12 +209,12 @@ public class TestDBService {
}
@Test
- public void testGetASDCArtifactIDbyRequestID() {
+ public void testGetSDCArtifactIDbyRequestID() {
try {
String content = FileUtils.readFileToString(new File("src/test/resources/uploadArtifact"));
String payload = " { \"userID\": \"0000\",\"status\":\"Test\", \"vnf-type\" : \"DesigTest-VNF\", \"action\" : \"Configure\", \"artifact-name\":\"DesignRestArtifact_reference\",\"artifact-version\" :\"0.01\",\"artifact-type\" :\"DESIGNTOOL-TEST\",\"artifact-status\":\"\",\"artifact-contents\": "+ content + " } ";
DesignDBService design = DesignDBService.initialise();
- Whitebox.invokeMethod(design, "getASDCArtifactIDbyRequestID", "0");
+ Whitebox.invokeMethod(design, "getSDCArtifactIDbyRequestID", "0");
} catch (Exception e) {
}
}
diff --git a/appc-oam/appc-oam-model/src/main/yang/appc-oam.yang b/appc-oam/appc-oam-model/src/main/yang/appc-oam.yang
index 03675c8f2..0984daeda 100644
--- a/appc-oam/appc-oam-model/src/main/yang/appc-oam.yang
+++ b/appc-oam/appc-oam-model/src/main/yang/appc-oam.yang
@@ -92,14 +92,14 @@ module appc-oam {
}
grouping status {
- description "The specific response codes are to be aligned with ASDC reference
+ description "The specific response codes are to be aligned with SDC reference
doc (main table removed to avoid duplication and digression from
- main table). See ASDC and ECOMP Distribution Consumer Interface
+ main table). See SDC and ECOMP Distribution Consumer Interface
Agreement";
container status {
- description "The specific response codes are to be aligned with ASDC reference
+ description "The specific response codes are to be aligned with SDC reference
doc (main table removed to avoid duplication and digression from
- main table). See ASDC and ECOMP Distribution Consumer Interface
+ main table). See SDC and ECOMP Distribution Consumer Interface
Agreement";
leaf code {
description "Response code";
diff --git a/appc-provider/appc-provider-model/src/main/yang/appc-provider-lcm.yang b/appc-provider/appc-provider-model/src/main/yang/appc-provider-lcm.yang
index d46ba8cb4..a53684f68 100644
--- a/appc-provider/appc-provider-model/src/main/yang/appc-provider-lcm.yang
+++ b/appc-provider/appc-provider-model/src/main/yang/appc-provider-lcm.yang
@@ -295,9 +295,9 @@ module appc-provider-lcm {
grouping status {
- description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
+ description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
container status {
- description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
+ description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
leaf code {
description "Response code";
type uint16;
diff --git a/appc-provider/appc-provider-model/src/main/yang/appc-provider.yang b/appc-provider/appc-provider-model/src/main/yang/appc-provider.yang
index 70f202de0..b62fabdf9 100644
--- a/appc-provider/appc-provider-model/src/main/yang/appc-provider.yang
+++ b/appc-provider/appc-provider-model/src/main/yang/appc-provider.yang
@@ -353,9 +353,9 @@ module appc-provider {
}
grouping status {
- description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
+ description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
container status {
- description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
+ description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
leaf code {
description "Response code";
type uint16;
@@ -504,7 +504,7 @@ module appc-provider {
grouping ResponseAttributes {
description "The response contains the status of executed functionality";
container Status {
- description "The specific response codes are to be aligned with ASDC reference doc (main table removed to avoid duplication and digression from main table). See ASDC and ECOMP Distribution Consumer Interface Agreement";
+ description "The specific response codes are to be aligned with SDC reference doc (main table removed to avoid duplication and digression from main table). See SDC and ECOMP Distribution Consumer Interface Agreement";
leaf Code {
description "Response code value";
type uint32;
diff --git a/appc-asdc-listener/.gitignore b/appc-sdc-listener/.gitignore
index c82c130d9..c82c130d9 100644
--- a/appc-asdc-listener/.gitignore
+++ b/appc-sdc-listener/.gitignore
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/.gitignore b/appc-sdc-listener/appc-sdc-listener-bundle/.gitignore
index 09e3bc9b2..09e3bc9b2 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/.gitignore
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/.gitignore
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/.settings/org.eclipse.wst.common.project.facet.core.xml b/appc-sdc-listener/appc-sdc-listener-bundle/.settings/org.eclipse.wst.common.project.facet.core.xml
index f4ef8aa0a..f4ef8aa0a 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/.settings/org.eclipse.wst.common.project.facet.core.xml
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/etc/asdc-client.jks b/appc-sdc-listener/appc-sdc-listener-bundle/etc/asdc-client.jks
index eb0a0d35a..eb0a0d35a 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/etc/asdc-client.jks
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/etc/asdc-client.jks
Binary files differ
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/etc/asdcclientstore.jks b/appc-sdc-listener/appc-sdc-listener-bundle/etc/asdcclientstore.jks
index 5dc006db0..5dc006db0 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/etc/asdcclientstore.jks
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/etc/asdcclientstore.jks
Binary files differ
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/log4j.properties b/appc-sdc-listener/appc-sdc-listener-bundle/log4j.properties
index abdf8675a..abdf8675a 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/log4j.properties
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/log4j.properties
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/pom.xml b/appc-sdc-listener/appc-sdc-listener-bundle/pom.xml
index 316cfdda0..22040cb55 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/pom.xml
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/pom.xml
@@ -1,9 +1,32 @@
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>appc-asdc-listener</artifactId>
+ <artifactId>appc-sdc-listener</artifactId>
<groupId>org.openecomp.appc</groupId>
<version>1.1.0-SNAPSHOT</version>
</parent>
@@ -13,7 +36,7 @@
<snakeyaml.version>1.15</snakeyaml.version>
</properties>
- <artifactId>appc-asdc-listener-bundle</artifactId>
+ <artifactId>appc-sdc-listener-bundle</artifactId>
<packaging>bundle</packaging>
<dependencies>
@@ -220,7 +243,7 @@
<configuration>
<instructions>
<Bundle-SymbolicName>org.openecomp.appc.sdc.listener</Bundle-SymbolicName>
- <!--Bundle-Activator>org.openecomp.appc.sdc.listener.AppcAsdcListenerActivator</Bundle-Activator -->
+ <!--Bundle-Activator>org.openecomp.appc.sdc.listener.AppcSdcListenerActivator</Bundle-Activator -->
<Export-Package>org.openecomp.appc.sdc.listener</Export-Package>
<Import-Package>
org.openecomp.appc.licmgr,
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/ArtifactProcessor.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/ArtifactProcessor.java
index c0f52206f..c0f52206f 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/ArtifactProcessor.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/ArtifactProcessor.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/ArtifactStorageService.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/ArtifactStorageService.java
index 160ed03d0..7f461c043 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/ArtifactStorageService.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/ArtifactStorageService.java
@@ -51,62 +51,62 @@ public class ArtifactStorageService {
private static final String SCHEMA = "sdnctl";
- private static final String SELECT_QUERY = Constants.SELECT_FROM + Constants.ASDC_ARTIFACTS +
- Constants.WHERE + Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME + Constants.QUERY_PLACEHOLDER +
- AND + Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + Constants.QUERY_PLACEHOLDER +
+ private static final String SELECT_QUERY = Constants.SELECT_FROM + Constants.SDC_ARTIFACTS +
+ Constants.WHERE + Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_NAME + Constants.QUERY_PLACEHOLDER +
+ AND + Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + Constants.QUERY_PLACEHOLDER +
AND + Constants.ARTIFACT_TYPE + Constants.QUERY_PLACEHOLDER;
- private static final String SELECT_QUERY_SDC_REFERENCE = Constants.SELECT_FROM + Constants.ASDC_REFERENCE +
- Constants.WHERE + Constants.ASDC_REFERENCE_FIELDS.VNF_TYPE + Constants.QUERY_PLACEHOLDER +
- AND + Constants.ASDC_REFERENCE_FIELDS.FILE_CATEGORY + Constants.QUERY_PLACEHOLDER ;
+ private static final String SELECT_QUERY_SDC_REFERENCE = Constants.SELECT_FROM + Constants.SDC_REFERENCE +
+ Constants.WHERE + Constants.SDC_REFERENCE_FIELDS.VNF_TYPE + Constants.QUERY_PLACEHOLDER +
+ AND + Constants.SDC_REFERENCE_FIELDS.FILE_CATEGORY + Constants.QUERY_PLACEHOLDER ;
- private static final String INSERT_QUERY = Constants.INSERT + Constants.ASDC_ARTIFACTS +
- " ( " + Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_UUID + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.DISTRIBUTION_ID + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_DESCRIPTION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_UUID + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_INSTANCE_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_TYPE + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_UUID + COMMA +
+ private static final String INSERT_QUERY = Constants.INSERT + Constants.SDC_ARTIFACTS +
+ " ( " + Constants.SDC_ARTIFACTS_FIELDS.SERVICE_UUID + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.DISTRIBUTION_ID + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.SERVICE_NAME + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.SERVICE_DESCRIPTION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_UUID + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_INSTANCE_NAME + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_NAME + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_TYPE + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_UUID + COMMA +
Constants.ARTIFACT_TYPE + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_VERSION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_DESCRIPTION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.CREATION_DATE + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_VERSION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_DESCRIPTION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.CREATION_DATE + COMMA +
Constants.ARTIFACT_NAME +COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT + " ) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT + " ) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
- private static final String INSERT_QUERY_WITH_INT_VER = Constants.INSERT + Constants.ASDC_ARTIFACTS +
- " ( " + Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_UUID + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.DISTRIBUTION_ID + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_DESCRIPTION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_UUID + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_INSTANCE_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_TYPE + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_UUID + COMMA +
+ private static final String INSERT_QUERY_WITH_INT_VER = Constants.INSERT + Constants.SDC_ARTIFACTS +
+ " ( " + Constants.SDC_ARTIFACTS_FIELDS.SERVICE_UUID + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.DISTRIBUTION_ID + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.SERVICE_NAME + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.SERVICE_DESCRIPTION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_UUID + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_INSTANCE_NAME + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_NAME + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_TYPE + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_UUID + COMMA +
Constants.ARTIFACT_TYPE + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_VERSION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_DESCRIPTION + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.CREATION_DATE + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_VERSION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_DESCRIPTION + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.CREATION_DATE + COMMA +
Constants.ARTIFACT_NAME + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT + COMMA +
- Constants.ASDC_ARTIFACTS_FIELDS.INTERNAL_VERSION + " ) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
+ Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT + COMMA +
+ Constants.SDC_ARTIFACTS_FIELDS.INTERNAL_VERSION + " ) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
- private static final String ASDC_REF_INSERT_QUERY = Constants.INSERT + Constants.ASDC_REFERENCE +
- "( "+ Constants.ASDC_REFERENCE_FIELDS.VNF_TYPE + COMMA +
- Constants.ASDC_REFERENCE_FIELDS.VNFC_TYPE+ COMMA +
- Constants.ASDC_REFERENCE_FIELDS.FILE_CATEGORY +COMMA +
- Constants.ASDC_REFERENCE_FIELDS.ACTION +COMMA +
+ private static final String SDC_REF_INSERT_QUERY = Constants.INSERT + Constants.SDC_REFERENCE +
+ "( "+ Constants.SDC_REFERENCE_FIELDS.VNF_TYPE + COMMA +
+ Constants.SDC_REFERENCE_FIELDS.VNFC_TYPE+ COMMA +
+ Constants.SDC_REFERENCE_FIELDS.FILE_CATEGORY +COMMA +
+ Constants.SDC_REFERENCE_FIELDS.ACTION +COMMA +
Constants.ARTIFACT_TYPE + COMMA +
Constants.ARTIFACT_NAME + " ) values (?,?,?,?,?,?)";
- private static final String SELECT_MAX_INT_VERSION = "SELECT coalesce(max(" + Constants.ASDC_ARTIFACTS_FIELDS.INTERNAL_VERSION + ")+1,1) as " + Constants.ASDC_ARTIFACTS_FIELDS.INTERNAL_VERSION +
- " FROM " + Constants.ASDC_ARTIFACTS + Constants.WHERE + Constants.ARTIFACT_NAME + Constants.QUERY_PLACEHOLDER;
+ private static final String SELECT_MAX_INT_VERSION = "SELECT coalesce(max(" + Constants.SDC_ARTIFACTS_FIELDS.INTERNAL_VERSION + ")+1,1) as " + Constants.SDC_ARTIFACTS_FIELDS.INTERNAL_VERSION +
+ " FROM " + Constants.SDC_ARTIFACTS + Constants.WHERE + Constants.ARTIFACT_NAME + Constants.QUERY_PLACEHOLDER;
private final EELFLogger logger = EELFManager.getInstance().getLogger(ArtifactStorageService.class);
@@ -116,9 +116,9 @@ public class ArtifactStorageService {
* @param artifact - SDC Artifact object
* @throws APPCException
*/
- public void storeASDCArtifact(SDCArtifact artifact) throws APPCException {
+ public void storeSDCArtifact(SDCArtifact artifact) throws APPCException {
if(logger.isDebugEnabled()){
- logger.debug("Entering storeASDCArtifact with : " + artifact.toString());
+ logger.debug("Entering storeSDCArtifact with : " + artifact.toString());
}
try {
initializeDBLibService();
@@ -129,7 +129,7 @@ public class ArtifactStorageService {
throw new APPCException(e.getMessage(),e);
}
if(logger.isDebugEnabled()){
- logger.debug("Exiting storeASDCArtifact");
+ logger.debug("Exiting storeSDCArtifact");
}
}
@@ -139,9 +139,9 @@ public class ArtifactStorageService {
* @param reference - SDC reference object
* @throws APPCException
*/
- public void storeASDCArtifactWithReference(SDCArtifact artifact , SDCReference reference) throws APPCException {
+ public void storeSDCArtifactWithReference(SDCArtifact artifact , SDCReference reference) throws APPCException {
if(logger.isDebugEnabled()){
- logger.debug("Entering storeASDCArtifactWithReference with : " + artifact.toString());
+ logger.debug("Entering storeSDCArtifactWithReference with : " + artifact.toString());
}
try {
initializeDBLibService();
@@ -162,7 +162,7 @@ public class ArtifactStorageService {
if(existingReference == null){
logger.debug("Inserting SDC Reference data: " +reference.toString());
ArrayList<String> arguments = prepareReferenceArguments(reference);
- dbLibService.writeData(ASDC_REF_INSERT_QUERY,arguments,SCHEMA);
+ dbLibService.writeData(SDC_REF_INSERT_QUERY,arguments,SCHEMA);
}else{
logger.debug("Artifact reference already exists for: " +reference.toString());
}
@@ -171,7 +171,7 @@ public class ArtifactStorageService {
throw new APPCException(e.getMessage(),e);
}
if(logger.isDebugEnabled()){
- logger.debug("Exiting storeASDCArtifactWithReference");
+ logger.debug("Exiting storeSDCArtifactWithReference");
}
}
@@ -186,7 +186,7 @@ public class ArtifactStorageService {
arguments.add(artifactName);
CachedRowSet rowSet = dbLibService.getData(SELECT_MAX_INT_VERSION, arguments, SCHEMA);
if (rowSet.first()) {
- version = rowSet.getInt(Constants.ASDC_ARTIFACTS_FIELDS.INTERNAL_VERSION .toString());
+ version = rowSet.getInt(Constants.SDC_ARTIFACTS_FIELDS.INTERNAL_VERSION .toString());
}
}catch (SQLException e) {
logger.error("Error getting internal version for artifact name " + artifactName , e);
@@ -248,10 +248,10 @@ public class ArtifactStorageService {
/**
* Reads the SDC artifact from APP-C database
- * @param resourceName - resource Name from ASDC Artifact
- * @param resourceVersion - resource version from ASDC Artifact
- * @param artifactType artifact type from ASDC Artifact
- * @return - ASDC_ARTIFACT record if data exists
+ * @param resourceName - resource Name from SDC Artifact
+ * @param resourceVersion - resource version from SDC Artifact
+ * @param artifactType artifact type from SDC Artifact
+ * @return - SDC_ARTIFACT record if data exists
* @throws APPCException
*/
public SDCArtifact retrieveSDCArtifact(String resourceName, String resourceVersion, String artifactType) throws APPCException {
@@ -265,30 +265,30 @@ public class ArtifactStorageService {
CachedRowSet rowSet = dbLibService.getData(SELECT_QUERY, arguments, SCHEMA);
if (rowSet.first()) {
artifact = new SDCArtifact();
- artifact.setArtifactUUID(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_UUID.toString()));
+ artifact.setArtifactUUID(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_UUID.toString()));
artifact.setArtifactName(rowSet.getString(Constants.ARTIFACT_NAME));
artifact.setArtifactType(rowSet.getString(Constants.ARTIFACT_TYPE));
- artifact.setArtifactVersion(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_VERSION.toString()));
- artifact.setArtifactDescription(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_DESCRIPTION.toString()));
- artifact.setArtifactContent(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT.toString()));
+ artifact.setArtifactVersion(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_VERSION.toString()));
+ artifact.setArtifactDescription(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_DESCRIPTION.toString()));
+ artifact.setArtifactContent(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.ARTIFACT_CONTENT.toString()));
- artifact.setResourceUUID(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_UUID.toString()));
- artifact.setResourceName(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME.toString()));
- artifact.setResourceType(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_TYPE.toString()));
- artifact.setResourceVersion(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION.toString()));
- artifact.setResourceInstanceName(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_INSTANCE_NAME.toString()));
+ artifact.setResourceUUID(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_UUID.toString()));
+ artifact.setResourceName(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_NAME.toString()));
+ artifact.setResourceType(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_TYPE.toString()));
+ artifact.setResourceVersion(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_VERSION.toString()));
+ artifact.setResourceInstanceName(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_INSTANCE_NAME.toString()));
- artifact.setServiceUUID(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_UUID.toString()));
- artifact.setServiceName(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_NAME.toString()));
- artifact.setServiceDescription(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.SERVICE_DESCRIPTION.toString()));
+ artifact.setServiceUUID(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.SERVICE_UUID.toString()));
+ artifact.setServiceName(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.SERVICE_NAME.toString()));
+ artifact.setServiceDescription(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.SERVICE_DESCRIPTION.toString()));
- artifact.setCreationDate(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.CREATION_DATE.toString()));
- artifact.setDistributionId(rowSet.getString(Constants.ASDC_ARTIFACTS_FIELDS.DISTRIBUTION_ID.toString()));
+ artifact.setCreationDate(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.CREATION_DATE.toString()));
+ artifact.setDistributionId(rowSet.getString(Constants.SDC_ARTIFACTS_FIELDS.DISTRIBUTION_ID.toString()));
}
} catch (SQLException e) {
- logger.error("Error query artifact for " + Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_NAME + " = " + resourceName +
- Constants.ASDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + " = " + resourceVersion +
+ logger.error("Error query artifact for " + Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_NAME + " = " + resourceName +
+ Constants.SDC_ARTIFACTS_FIELDS.RESOURCE_VERSION + " = " + resourceVersion +
Constants.ARTIFACT_TYPE + " = " + artifactType, e);
throw new APPCException(e);
}
@@ -297,9 +297,9 @@ public class ArtifactStorageService {
/**
* Reads the SDC reference from APP-C database
- * @param vnfType - vnf Type from ASDC reference
- * @param fileCategory - file category from ASDC reference
- * @return - ASDC_ARTIFACT record if data exists
+ * @param vnfType - vnf Type from SDC reference
+ * @param fileCategory - file category from SDC reference
+ * @return - SDC_ARTIFACT record if data exists
* @throws APPCException
*/
public SDCReference retrieveSDCReference(String vnfType, String fileCategory) throws APPCException {
@@ -312,16 +312,16 @@ public class ArtifactStorageService {
CachedRowSet rowSet = dbLibService.getData(SELECT_QUERY_SDC_REFERENCE, arguments, SCHEMA);
if (rowSet.first()) {
reference = new SDCReference();
- reference.setVnfType(rowSet.getString(Constants.ASDC_REFERENCE_FIELDS.VNF_TYPE.toString()));
- reference.setVnfcType(rowSet.getString(Constants.ASDC_REFERENCE_FIELDS.VNFC_TYPE.toString()));
- reference.setFileCategory(rowSet.getString(Constants.ASDC_REFERENCE_FIELDS.FILE_CATEGORY.toString()));
- reference.setAction(rowSet.getString(Constants.ASDC_REFERENCE_FIELDS.ACTION.toString()));
+ reference.setVnfType(rowSet.getString(Constants.SDC_REFERENCE_FIELDS.VNF_TYPE.toString()));
+ reference.setVnfcType(rowSet.getString(Constants.SDC_REFERENCE_FIELDS.VNFC_TYPE.toString()));
+ reference.setFileCategory(rowSet.getString(Constants.SDC_REFERENCE_FIELDS.FILE_CATEGORY.toString()));
+ reference.setAction(rowSet.getString(Constants.SDC_REFERENCE_FIELDS.ACTION.toString()));
reference.setArtifactType(rowSet.getString(Constants.ARTIFACT_TYPE));
reference.setArtifactName(rowSet.getString(Constants.ARTIFACT_NAME));
}
} catch (SQLException e) {
- logger.error("Error querying ASDC_REFERENCE for " + Constants.ASDC_REFERENCE_FIELDS.VNF_TYPE + " = " + vnfType +
- Constants.ASDC_REFERENCE_FIELDS.FILE_CATEGORY + " = " + fileCategory , e);
+ logger.error("Error querying SDC_REFERENCE for " + Constants.SDC_REFERENCE_FIELDS.VNF_TYPE + " = " + vnfType +
+ Constants.SDC_REFERENCE_FIELDS.FILE_CATEGORY + " = " + fileCategory , e);
throw new APPCException(e);
}
return reference;
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/Constants.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/Constants.java
index 67f8025d2..4970a739e 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/Constants.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/Constants.java
@@ -25,11 +25,11 @@
package org.openecomp.appc.sdc.artifacts.helper;
/**
- * Constants required in ASDC listener module
+ * Constants required in SDC listener module
*/
public class Constants {
- static final String ASDC_ARTIFACTS = "ASDC_ARTIFACTS";
- static final String ASDC_REFERENCE = "ASDC_REFERENCE";
+ static final String SDC_ARTIFACTS = "ASDC_ARTIFACTS";
+ static final String SDC_REFERENCE = "ASDC_REFERENCE";
static final String AND = " AND ";
@@ -38,7 +38,7 @@ public class Constants {
static final String VF_LICENSE = "VF_LICENSE";
- public enum ASDC_ARTIFACTS_FIELDS {
+ public enum SDC_ARTIFACTS_FIELDS {
SERVICE_UUID,
DISTRIBUTION_ID,
SERVICE_NAME,
@@ -56,8 +56,8 @@ public class Constants {
ARTIFACT_CONTENT
}
- public enum ASDC_REFERENCE_FIELDS{
- ASDC_REFERENCE_ID,
+ public enum SDC_REFERENCE_FIELDS{
+ SDC_REFERENCE_ID,
VNF_TYPE,
VNFC_TYPE,
FILE_CATEGORY,
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/DependencyModelGenerator.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/DependencyModelGenerator.java
index 0f8065a30..0f8065a30 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/DependencyModelGenerator.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/helper/DependencyModelGenerator.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/AbstractArtifactProcessor.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/AbstractArtifactProcessor.java
index 12fd260d0..06bda8b2d 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/AbstractArtifactProcessor.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/AbstractArtifactProcessor.java
@@ -183,7 +183,7 @@ public abstract class AbstractArtifactProcessor implements ArtifactProcessor {
if (null == eventSender){
return;
}
- String errorDescription = String.format("ASDC distribution of service '%s', version '%s' is failed with reason: '%s'",
+ String errorDescription = String.format("SDC distribution of service '%s', version '%s' is failed with reason: '%s'",
serviceName, serviceVersion, errorMessage);
EventMessage eventMessage = new EventMessage(
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ArtifactProcessorFactory.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ArtifactProcessorFactory.java
index aa9d0e04b..3ad88b4b9 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ArtifactProcessorFactory.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ArtifactProcessorFactory.java
@@ -29,7 +29,6 @@ import com.att.eelf.configuration.EELFManager;
import org.openecomp.appc.adapter.message.EventSender;
import org.openecomp.appc.sdc.artifacts.ArtifactProcessor;
import org.openecomp.appc.sdc.artifacts.object.ArtifactType;
-import org.openecomp.appc.sdc.listener.AsdcListener;
import org.openecomp.sdc.api.IDistributionClient;
import org.openecomp.sdc.api.notification.IArtifactInfo;
import org.openecomp.sdc.api.notification.INotificationData;
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ConfigArtifactProcessor.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ConfigArtifactProcessor.java
index 3667b6b2a..3baca3574 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ConfigArtifactProcessor.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ConfigArtifactProcessor.java
@@ -62,7 +62,7 @@ public class ConfigArtifactProcessor extends AbstractArtifactProcessor {
@Override
public void processArtifact(SDCArtifact artifact) throws APPCException {
- String postData = Util.toAsdcStoreDocumentInput(notification, resource, super.artifact, artifact.getArtifactContent());
+ String postData = Util.toSdcStoreDocumentInput(notification, resource, super.artifact, artifact.getArtifactContent());
try {
ProviderResponse result = ProviderOperations.post(storeUri.toURL(), postData, null);
if (result.getStatus() == 200) {
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/LicenseArtifactProcessor.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/LicenseArtifactProcessor.java
index 9cbc56276..21b32dc8e 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/LicenseArtifactProcessor.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/LicenseArtifactProcessor.java
@@ -68,7 +68,7 @@ public class LicenseArtifactProcessor extends AbstractArtifactProcessor {
if (StringUtils.isEmpty(vnfType) ||
StringUtils.isEmpty(version) ||
StringUtils.isEmpty(packageArtifactID)) {
- String errStr = String.format("Missing information in ASDC request. Details: resource_type='%s', resource_version='%s', artifactID='%s'", vnfType, version, packageArtifactID);
+ String errStr = String.format("Missing information in SDC request. Details: resource_type='%s', resource_version='%s', artifactID='%s'", vnfType, version, packageArtifactID);
logger.error(errStr);
throw new APPCException(errStr);
}
@@ -78,7 +78,7 @@ public class LicenseArtifactProcessor extends AbstractArtifactProcessor {
if (existingArtifact ==null) { // new resource
logger.debug("Artifact not found from database for vnfType = " + vnfType + " , version = " + version + " , artifactType = " + artifact.getArtifactType());
- artifactStorageService.storeASDCArtifact(artifact);
+ artifactStorageService.storeSDCArtifact(artifact);
} else { // duplicate
logger.debug("Artifact retrieved from database = " + existingArtifact);
logger.warn(String.format("Artifact of type '%s' already deployed for resource_type='%s' and resource_version='%s'", Constants.VF_LICENSE, vnfType, version));
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ToscaCsarArtifactProcessor.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ToscaCsarArtifactProcessor.java
index 085902187..ff3ee5509 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ToscaCsarArtifactProcessor.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/impl/ToscaCsarArtifactProcessor.java
@@ -198,16 +198,16 @@ public class ToscaCsarArtifactProcessor extends AbstractArtifactProcessor{
reference.setVnfType(vnfType);
reference.setFileCategory("tosca_model");
reference.setArtifactName(artifact.getArtifactName());
- logger.debug("Storing TOSCA to ASDC Artifact");
- artifactStorageService.storeASDCArtifactWithReference(artifact,reference);
+ logger.debug("Storing TOSCA to SDC Artifact");
+ artifactStorageService.storeSDCArtifactWithReference(artifact,reference);
SDCArtifact dependencyArtifact = getDependencyArtifact(artifact);
SDCReference dependencyReference = new SDCReference();
dependencyReference.setVnfType(vnfType);
dependencyReference.setFileCategory("tosca_dependency_model");
dependencyReference.setArtifactName(dependencyArtifact.getArtifactName());
- logger.debug("Storing Dependency to ASDC Artifact");
- artifactStorageService.storeASDCArtifactWithReference(dependencyArtifact,dependencyReference);
+ logger.debug("Storing Dependency to SDC Artifact");
+ artifactStorageService.storeSDCArtifactWithReference(dependencyArtifact,dependencyReference);
} catch (Exception e) {
logger.error("Error processing artifact : " + artifact.toString() );
throw new APPCException(e.getMessage(),e);
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/ArtifactType.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/ArtifactType.java
index 1ff62385d..1ff62385d 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/ArtifactType.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/ArtifactType.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Resource.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Resource.java
index 42716dc47..42716dc47 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Resource.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Resource.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCArtifact.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCArtifact.java
index 6cba5b2a2..6cba5b2a2 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCArtifact.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCArtifact.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCReference.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCReference.java
index b9d630026..b9d630026 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCReference.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/SDCReference.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Vnfc.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Vnfc.java
index 47d5f4516..47d5f4516 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Vnfc.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/artifacts/object/Vnfc.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderOperations.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderOperations.java
index c644930e4..c644930e4 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderOperations.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderOperations.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderResponse.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderResponse.java
index cc21cea0c..cc21cea0c 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderResponse.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/ProviderResponse.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java
index b5307d697..d721e13a0 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcCallback.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcCallback.java
@@ -46,9 +46,9 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
-public class AsdcCallback implements INotificationCallback {
+public class SdcCallback implements INotificationCallback {
- private final EELFLogger logger = EELFManager.getInstance().getLogger(AsdcCallback.class);
+ private final EELFLogger logger = EELFManager.getInstance().getLogger(SdcCallback.class);
private URI storeUri;
private IDistributionClient client;
@@ -61,7 +61,7 @@ public class AsdcCallback implements INotificationCallback {
private AtomicBoolean isRunning = new AtomicBoolean(false);
- public AsdcCallback(URI storeUri, IDistributionClient client) {
+ public SdcCallback(URI storeUri, IDistributionClient client) {
this.storeUri = storeUri;
this.client = client;
@@ -83,16 +83,15 @@ public class AsdcCallback implements INotificationCallback {
BundleContext bctx = FrameworkUtil.getBundle(EventSender.class).getBundleContext();
ServiceReference sref = bctx.getServiceReference(EventSender.class);
eventSender = (EventSender) bctx.getService(sref);
- } catch (Exception e) {
- logger.error("AsdcCallback failed on initializing EventSender", e);
+ } catch (Throwable t) {
+ logger.error("SdcCallback failed on initializing EventSender", t);
}
}
if (isRunning.get()) {
for(IArtifactInfo artifact:data.getServiceArtifacts()){
- ArtifactProcessor artifactProcessor = ArtifactProcessorFactory.getArtifactProcessor(
- client, eventSender, data, null, artifact, storeUri);
+ ArtifactProcessor artifactProcessor = ArtifactProcessorFactory.getArtifactProcessor(client, eventSender, data, null, artifact, storeUri);
if(artifactProcessor!=null){
executor.submit(artifactProcessor);
}
@@ -100,7 +99,7 @@ public class AsdcCallback implements INotificationCallback {
for (IResourceInstance resource : data.getResources()) {
for (IArtifactInfo artifact : resource.getArtifacts()) {
- logger.info(Util.toAsdcStoreDocumentInput(data, resource, artifact, "abc"));
+ logger.info(Util.toSdcStoreDocumentInput(data, resource, artifact, "abc"));
if (executor.getQueue().size() >= threadCount) {
// log warning about job backlog
}
@@ -121,7 +120,7 @@ public class AsdcCallback implements INotificationCallback {
}
}
} else {
- // TODO - return a failed result so asdc knows we are shut down
+ // TODO - return a failed result so sdc knows we are shut down
}
}
@@ -131,7 +130,7 @@ public class AsdcCallback implements INotificationCallback {
public void stop(int waitSec) {
isRunning.set(false);
- logger.info(String.format("Stopping the ASDC listener and waiting up to %ds for %d pending jobs", waitSec,
+ logger.info(String.format("Stopping the SDC listener and waiting up to %ds for %d pending jobs", waitSec,
executor.getQueue().size()));
boolean cleanShutdown = false;
executor.shutdown();
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcConfig.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcConfig.java
index d0d5319f9..9c14d6756 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcConfig.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcConfig.java
@@ -35,7 +35,7 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
-public class AsdcConfig implements IConfiguration {
+public class SdcConfig implements IConfiguration {
private String host;
private String consumer;
@@ -55,9 +55,9 @@ public class AsdcConfig implements IConfiguration {
private Properties props;
- private final EELFLogger logger = EELFManager.getInstance().getLogger(AsdcConfig.class);
+ private final EELFLogger logger = EELFManager.getInstance().getLogger(SdcConfig.class);
- AsdcConfig(Properties props) throws Exception {
+ SdcConfig(Properties props) throws Exception {
this.props = props;
init();
}
@@ -69,18 +69,18 @@ public class AsdcConfig implements IConfiguration {
}
// Keystore for ca cert
- keystorePath = props.getProperty("appc.asdc.keystore.path");
- keystorePass = props.getProperty("appc.asdc.keystore.pass");
+ keystorePath = props.getProperty("appc.sdc.keystore.path");
+ keystorePass = props.getProperty("appc.sdc.keystore.pass");
// ASDC host
- host = props.getProperty("appc.asdc.host");
- env = props.getProperty("appc.asdc.env");
- user = props.getProperty("appc.asdc.user");
- pass = props.getProperty("appc.asdc.pass");
+ host = props.getProperty("appc.sdc.host");
+ env = props.getProperty("appc.sdc.env");
+ user = props.getProperty("appc.sdc.user");
+ pass = props.getProperty("appc.sdc.pass");
// DMaaP properties
- consumer = props.getProperty("appc.asdc.consumer");
- consumerId = props.getProperty("appc.asdc.consumer.id");
+ consumer = props.getProperty("appc.sdc.consumer");
+ consumerId = props.getProperty("appc.sdc.consumer.id");
pollingInterval = Integer.valueOf(props.getProperty("interval", "60"));
@@ -109,7 +109,7 @@ public class AsdcConfig implements IConfiguration {
types.add("VF_LICENSE");
types.add("TOSCA_CSAR");
- storeOp = new URI(props.getProperty("appc.asdc.provider.url"));
+ storeOp = new URI(props.getProperty("appc.sdc.provider.url"));
}
@Override
@@ -185,13 +185,13 @@ public class AsdcConfig implements IConfiguration {
*/
private void logParams() {
Map<String, String> params = new HashMap<>();
- params.put("ASDC Host", getAsdcAddress());
- params.put("ASDC Environment", getEnvironmentName());
+ params.put("SDC Host", getAsdcAddress());
+ params.put("SDC Environment", getEnvironmentName());
params.put("Consumer Name", getConsumerGroup());
params.put("Consumer ID", getConsumerID());
params.put("Poll Active Wait", String.valueOf(getPollingInterval()));
params.put("Poll Timeout", String.valueOf(getPollingTimeout()));
- logger.info(String.format("ASDC Params: %s", params));
+ logger.info(String.format("SDC Params: %s", params));
}
}
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcListener.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcListener.java
index a580e4077..dccc95841 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/AsdcListener.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/SdcListener.java
@@ -45,15 +45,15 @@ import java.util.concurrent.TimeUnit;
* Register connection with SDC server based on properties file configuration when start,
* and disconnect with SDC server when stop.
*/
-public class AsdcListener {
- private final EELFLogger logger = EELFManager.getInstance().getLogger(AsdcListener.class);
+public class SdcListener {
+ private final EELFLogger logger = EELFManager.getInstance().getLogger(SdcListener.class);
/**
* The bundle context
*/
private IDistributionClient client;
- private AsdcCallback callback;
- private AsdcConfig config;
+ private SdcCallback callback;
+ private SdcConfig config;
private CountDownLatch latch;
private Thread startThread = null;
@@ -66,13 +66,13 @@ public class AsdcListener {
Configuration configuration = ConfigurationFactory.getConfiguration();
Properties props = configuration.getProperties();
- config = new AsdcConfig(props);
+ config = new SdcConfig(props);
logger.debug(String.format("[%d] created SDC config", timeStamp));
client = DistributionClientFactory.createDistributionClient();
logger.debug(String.format("[%d] created SDC client", timeStamp));
- callback = new AsdcCallback(config.getStoreOpURI(), client);
+ callback = new SdcCallback(config.getStoreOpURI(), client);
logger.debug(String.format("[%d] created SDC callback", timeStamp));
latch = new CountDownLatch(1);
@@ -87,28 +87,28 @@ public class AsdcListener {
public void stop() throws InterruptedException {
// Add timestamp to the log to differentiate the jmeter run testing calls.
final long timeStamp = System.currentTimeMillis();
- logger.info(String.format("[%d] Stopping ASDC Listener", timeStamp));
+ logger.info(String.format("[%d] Stopping SDC Listener", timeStamp));
stopStartThread(timeStamp);
if (latch != null) {
- logger.debug(String.format("[%d] waiting ASDC latch count to 0 for 10 seconds", timeStamp));
+ logger.debug(String.format("[%d] waiting SDC latch count to 0 for 10 seconds", timeStamp));
latch.await(10, TimeUnit.SECONDS);
latch = null;
}
if (callback != null) {
- logger.debug(String.format("[%d] stopping ASDC callback", timeStamp));
+ logger.debug(String.format("[%d] stopping SDC callback", timeStamp));
callback.stop();
callback = null;
}
if (client != null) {
- logger.debug(String.format("[%d] stopping ASDC client", timeStamp));
+ logger.debug(String.format("[%d] stopping SDC client", timeStamp));
client.stop();
client = null;
}
- logger.info(String.format("[%d] ASDC Listener stopped successfully", timeStamp));
+ logger.info(String.format("[%d] SDC Listener stopped successfully", timeStamp));
}
void stopStartThread(long timeStamp) throws InterruptedException {
@@ -117,15 +117,15 @@ public class AsdcListener {
}
if (startThread.getState() == Thread.State.TERMINATED) {
- logger.debug(String.format("[%d] ASDC thread(%s) is already terminated.",
+ logger.debug(String.format("[%d] SDC thread(%s) is already terminated.",
timeStamp, startThread.getName()));
} else {
- logger.debug(String.format("[%d] ASDC thread(%s) is to be interrupted with state(%s)",
+ logger.debug(String.format("[%d] SDC thread(%s) is to be interrupted with state(%s)",
timeStamp, startThread.getName(), startThread.getState().toString()));
startThread.interrupt();
- logger.debug(String.format("[%d] ASDC thread(%s) has been interrupted(%s) with state(%s)",
+ logger.debug(String.format("[%d] SDC thread(%s) has been interrupted(%s) with state(%s)",
timeStamp, startThread.getName(), startThread.isInterrupted(),
startThread.getState().toString()));
}
@@ -133,7 +133,7 @@ public class AsdcListener {
}
/**
- * Runnable implementation for actual initialization during ASDC listener start
+ * Runnable implementation for actual initialization during SDC listener start
*/
class StartRunnable implements Runnable {
private final long timeStamp;
@@ -143,14 +143,14 @@ public class AsdcListener {
}
/**
- * This run method calls ASDC client for init and start which are synchronized calls along with stop.
+ * This run method calls SDC client for init and start which are synchronized calls along with stop.
* To interrupt this thread at stop time, we added thread interrupted checking in each step
* for earlier interruption.
*/
@Override
public void run() {
if (!initialRegistration()) {
- logger.warn(String.format("[%d] ASDC thread initial registration failed.", timeStamp));
+ logger.warn(String.format("[%d] SDC thread initial registration failed.", timeStamp));
}
if (isThreadInterrupted("after initial registration")) {
@@ -166,7 +166,7 @@ public class AsdcListener {
if (result.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS) {
client.start();
} else {
- logger.error(String.format("[%d] Could not register ASDC client. %s - %s",
+ logger.error(String.format("[%d] Could not register SDC client. %s - %s",
timeStamp, result.getDistributionActionResult(), result.getDistributionMessageResult()));
}
@@ -202,7 +202,7 @@ public class AsdcListener {
return result.getStatus() == 200;
} catch (Exception e) {
logger.error(
- "Error performing initial registration with ASDC server. User may not be able to connect",
+ "Error performing initial registration with SDC server. User may not be able to connect",
e);
return false;
}
@@ -210,7 +210,7 @@ public class AsdcListener {
private boolean isThreadInterrupted(String details) {
if (Thread.currentThread().isInterrupted()) {
- logger.info(String.format("[%d] ASDC thread interrupted %s.", timeStamp, details));
+ logger.info(String.format("[%d] SDC thread interrupted %s.", timeStamp, details));
return true;
}
return false;
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/Util.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/Util.java
index 2729d1dcb..2dbb66e30 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/Util.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/appc/sdc/listener/Util.java
@@ -38,14 +38,14 @@ import org.openecomp.sdc.utils.DistributionStatusEnum;
public class Util {
// TODO - Use the yang builder instead
- public static String toAsdcStoreDocumentInput(INotificationData notification, IResourceInstance resource,
+ public static String toSdcStoreDocumentInput(INotificationData notification, IResourceInstance resource,
IArtifactInfo artifact, String data) {
JSONObject json = new JSONObject();
JSONObject requestInfo = new JSONObject();
requestInfo.put("request-id", notification.getServiceUUID());
- requestInfo.put("request-action", "StoreAsdcDocumentRequest");
- requestInfo.put("source", "ASDC");
+ requestInfo.put("request-action", "StoreSdcDocumentRequest");
+ requestInfo.put("source", "SDC");
JSONObject docParams = new JSONObject();
docParams.put("service-uuid", notification.getServiceUUID());
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/tlv/sdc/security/Passwords.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/tlv/sdc/security/Passwords.java
index 30b275a51..30b275a51 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/java/org/openecomp/tlv/sdc/security/Passwords.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/java/org/openecomp/tlv/sdc/security/Passwords.java
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 4dc493c95..3f0eacc88 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -31,12 +31,12 @@
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
- <bean id="AsdcListener" class="org.openecomp.appc.sdc.listener.AsdcListener" init-method="start" destroy-method="stop" scope="singleton" activation="eager">
+ <bean id="SdcListener" class="org.openecomp.appc.sdc.listener.SdcListener" init-method="start" destroy-method="stop" scope="singleton" activation="eager">
</bean>
<!--
- <bean id="AsdcListenerBean" class="org.openecomp.appc.sdc.listener.impl.AsdcListenerBean" init-method="start" destroy-method="stop" activation="eager" scope="singleton" />
- <service id="AsdcListener" interface="org.openecomp.appc.sdc.listener.AsdcListener" ref="AsdcListenerBean"/>
+ <bean id="SdcListenerBean" class="org.openecomp.appc.sdc.listener.impl.SdcListenerBean" init-method="start" destroy-method="stop" activation="eager" scope="singleton" />
+ <service SdcListenerener" interfaorg.openecomp.appc.sdc.listener.SdcListenerner" ref="SdcListenerBean"/>
-->
</blueprint>
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/attsdc-packages.yaml b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/attsdc-packages.yaml
index 8385dc988..8385dc988 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/attsdc-packages.yaml
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/attsdc-packages.yaml
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/attsdc.yaml b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/attsdc.yaml
index 7e612fe9b..7e612fe9b 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/attsdc.yaml
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/attsdc.yaml
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/log4j.properties b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/log4j.properties
index cc8c97a6a..cc8c97a6a 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/log4j.properties
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/log4j.properties
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/titan.properties b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/titan.properties
index e4bcb4bea..e4bcb4bea 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/conf/titan.properties
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/conf/titan.properties
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/scripts/startTest.sh b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/scripts/startTest.sh
index 28e81ca2b..28e81ca2b 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/ci/scripts/startTest.sh
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/ci/scripts/startTest.sh
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/org/openecomp/appc/default.properties b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/org/openecomp/appc/default.properties
index 55acec1fe..20cbbbcb0 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/main/resources/org/openecomp/appc/default.properties
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/main/resources/org/openecomp/appc/default.properties
@@ -25,16 +25,16 @@
org.openecomp.appc.bootstrap.file=appc.properties
org.openecomp.appc.bootstrap.path=/opt/openecomp/appc/data/properties,${user.home},.
-# These ASDC properties were provided by the ASDC Op-So team
-appc.asdc.keystore.path=etc/asdc-client.jks
-appc.asdc.keystore.pass=Aa123456
+# These SDC properties were provided by the SDC Op-So team
+appc.sdc.keystore.path=etc/sdc-client.jks
+appc.sdc.keystore.pass=Aa123456
-appc.asdc.host=192.168.1.2:8443
-appc.asdc.env=TEST
-appc.asdc.user=appc
-appc.asdc.pass=appc
+appc.sdc.host=192.168.1.2:8443
+appc.sdc.env=TEST
+appc.sdc.user=appc
+appc.sdc.pass=appc
-appc.asdc.consumer=TEST
-appc.asdc.consumer.id=TEST
-appc.asdc.provider.url=http://localhost:8181/restconf/operations/AsdcMessage:configuration-document-request
+appc.sdc.consumer=TEST
+appc.sdc.consumer.id=TEST
+appc.sdc.provider.url=http://localhost:8181/restconf/operations/SdcMessage:configuration-document-request
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/AsdcCallbackTest.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/SdcCallbackTest.java
index 3971ec248..9e2a86051 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/AsdcCallbackTest.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/SdcCallbackTest.java
@@ -25,8 +25,6 @@
package org.openecomp.appc.sdc.listener;
import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.mockito.Mockito;
@@ -68,56 +66,52 @@ import java.util.List;
ArtifactStorageService.class,
ToscaCsarArtifactProcessor.class,
ArtifactProcessorFactory.class})
-public class AsdcCallbackTest {
+public class SdcCallbackTest {
- private IDistributionClient client;
+ IDistributionClient client;
private EventSender eventSender;
- private INotificationCallback asdcCallback;
+ private INotificationCallback sdcCallback;
private ArtifactStorageService storageService;
private ToscaCsarArtifactProcessor artifactProcessor;
+
@Before
public void setup() throws Exception {
client = PowerMockito.mock(IDistributionClient.class);
eventSender = PowerMockito.mock(EventSender.class);
- asdcCallback = new AsdcCallback(null,client);
+ sdcCallback = new SdcCallback(null,client);
- artifactProcessor = Mockito.spy(new ToscaCsarArtifactProcessor(
- client, eventSender, getNotificationData(), getResources().get(0),
- getServiceArtifacts().get(0),null));
+ artifactProcessor = Mockito.spy(new ToscaCsarArtifactProcessor(client,eventSender,getNotificationData(),getResources().get(0)
+ ,getServiceArtifacts().get(0),null));
storageService = PowerMockito.mock(ArtifactStorageService.class);
Whitebox.setInternalState(artifactProcessor,"artifactStorageService", storageService);
- PowerMockito.doCallRealMethod().when(artifactProcessor)
- .processArtifact((IDistributionClientDownloadResult) Matchers.anyObject());
+ PowerMockito.doCallRealMethod().when(artifactProcessor).processArtifact((IDistributionClientDownloadResult) Matchers.anyObject());
PowerMockito.doCallRealMethod().when(artifactProcessor).run();
+
PowerMockito.mockStatic(ArtifactProcessorFactory.class);
- PowerMockito.when(ArtifactProcessorFactory.getArtifactProcessor((IDistributionClient)Matchers.anyObject(),
- (EventSender)Matchers.anyObject(),
+ PowerMockito.when(ArtifactProcessorFactory.getArtifactProcessor((IDistributionClient)Matchers.anyObject(), (EventSender)Matchers.anyObject(),
(INotificationData)Matchers.anyObject(), (IResourceInstance)Matchers.anyObject(),
(IArtifactInfo)Matchers.anyObject(), (URI)Matchers.anyObject())).thenReturn(artifactProcessor);
- Whitebox.setInternalState(asdcCallback,"eventSender", eventSender);
+ Whitebox.setInternalState(sdcCallback,"eventSender", eventSender);
PowerMockito.doReturn(readDownloadResult()).when(client).download((IArtifactInfo) Matchers.anyObject());
- PowerMockito.doReturn(null).when(client).sendDownloadStatus(
- (IDistributionStatusMessage) Matchers.anyObject());
+ PowerMockito.doReturn(null).when(client).sendDownloadStatus((IDistributionStatusMessage) Matchers.anyObject());
- PowerMockito.doReturn(null).when(storageService).retrieveSDCArtifact(Matchers.anyString(),
- Matchers.anyString(), Matchers.anyString());
+ PowerMockito.doReturn(null).when(storageService).retrieveSDCArtifact(Matchers.anyString(),Matchers.anyString(),Matchers.anyString());
PowerMockito.doAnswer(new Answer<Object>() {
@Override
- public Object answer(InvocationOnMock invocationOnMock) throws Exception {
+ public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
System.out.print(invocationOnMock.getArguments()[0].toString());
return null;
}
- }).when(storageService).storeASDCArtifact((SDCArtifact)Matchers.anyObject());
+ }).when(storageService).storeSDCArtifact((SDCArtifact)Matchers.anyObject());
}
private IDistributionClientDownloadResult readDownloadResult() throws IOException, URISyntaxException {
- DistributionClientDownloadResultImpl downloadResult = new DistributionClientDownloadResultImpl(
- DistributionActionResultEnum.SUCCESS,"Download success");
+ DistributionClientDownloadResultImpl downloadResult = new DistributionClientDownloadResultImpl(DistributionActionResultEnum.SUCCESS,"Download success");
File file = new File(this.getClass().getResource("/csar/service-ServiceAppc-csar.csar").toURI());
byte[] bFile = new byte[(int) file.length()];
@@ -129,12 +123,14 @@ public class AsdcCallbackTest {
return downloadResult;
}
- @Ignore
- @Test
- public void testASDCListener()
- throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException {
+
+// @Test
+ public void testSDCListener() throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException {
+
+
INotificationData notificationData = getNotificationData();
- asdcCallback.activateCallback(notificationData);
+ sdcCallback.activateCallback(notificationData);
+
// pause();
}
@@ -146,11 +142,9 @@ public class AsdcCallbackTest {
// }
// }
- private INotificationData getNotificationData()
- throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException {
+ private INotificationData getNotificationData() throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException {
- INotificationData notificationData = (INotificationData)getObject(
- "org.openecomp.sdc.impl.NotificationDataImpl");
+ INotificationData notificationData = (INotificationData)getObject("org.openecomp.sdc.impl.NotificationDataImpl");
List<IArtifactInfo> serviceArtifacts = getServiceArtifacts();
@@ -158,11 +152,9 @@ public class AsdcCallbackTest {
return notificationData;
}
- private List<IResourceInstance> getResources()
- throws ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException {
+ private List<IResourceInstance> getResources() throws ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException {
List<IResourceInstance> resources = new ArrayList<>();
- IResourceInstance resource = (IResourceInstance)getObject(
- "org.openecomp.sdc.impl.JsonContainerResourceInstance");
+ IResourceInstance resource = (IResourceInstance)getObject("org.openecomp.sdc.impl.JsonContainerResourceInstance");
List<IArtifactInfo> serviceArtifacts = getServiceArtifacts();
invokeMethod(resource,"setArtifacts",serviceArtifacts);
@@ -173,8 +165,7 @@ public class AsdcCallbackTest {
return resources;
}
- private void invokeMethod(Object object, String methodName,Object... arguments)
- throws IllegalAccessException, InvocationTargetException {
+ private void invokeMethod(Object object, String methodName,Object... arguments) throws IllegalAccessException, InvocationTargetException {
Method[] methods = object.getClass().getDeclaredMethods();
for(Method method:methods){
if(methodName.equalsIgnoreCase(method.getName())){
@@ -184,15 +175,13 @@ public class AsdcCallbackTest {
}
}
- private Object getObject(String fqcn)
- throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException {
+ private Object getObject(String fqcn) throws ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException {
Constructor constructor = Class.forName(fqcn).getDeclaredConstructors()[0];
constructor.setAccessible(true);
return constructor.newInstance();
}
- private List<IArtifactInfo> getServiceArtifacts()
- throws ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException {
+ private List<IArtifactInfo> getServiceArtifacts() throws ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException {
List<IArtifactInfo> serviceArtifacts = new ArrayList<>();
IArtifactInfo artifactInfo = (IArtifactInfo)getObject("org.openecomp.sdc.impl.ArtifactInfoImpl");
invokeMethod(artifactInfo,"setArtifactType","TOSCA_CSAR");
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/AsdcListenerTest.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/SdcListenerTest.java
index a821812ff..17e286bc5 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/AsdcListenerTest.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/SdcListenerTest.java
@@ -44,23 +44,23 @@ import static org.mockito.Mockito.times;
@RunWith(PowerMockRunner.class)
@PrepareForTest(Thread.class)
-public class AsdcListenerTest {
- private AsdcListener asdcListener;
+public class SdcListenerTest {
+ private SdcListener sdcListener;
private EELFLogger mockLogger = mock(EELFLogger.class);
@Before
public void setUp() throws Exception {
- asdcListener = new AsdcListener();
+ sdcListener = new SdcListener();
// to avoid operation on logger fail, mock up the logger
- Whitebox.setInternalState(asdcListener, "logger", mockLogger);
+ Whitebox.setInternalState(sdcListener, "logger", mockLogger);
}
@Test
public void testStart() throws Exception {
- asdcListener.start();
+ sdcListener.start();
Assert.assertTrue("Should created startThread",
- Whitebox.getInternalState(asdcListener, "startThread") != null);
+ Whitebox.getInternalState(sdcListener, "startThread") != null);
}
@Test
@@ -68,50 +68,50 @@ public class AsdcListenerTest {
// test interrupt thread and other null case
MockThread mockThread = spy(new MockThread());
mockThread.setNewState(Thread.State.TIMED_WAITING);
- Whitebox.setInternalState(asdcListener, "startThread", mockThread);
+ Whitebox.setInternalState(sdcListener, "startThread", mockThread);
- asdcListener.stop();
+ sdcListener.stop();
Mockito.verify(mockThread, times(1)).interrupt();
Assert.assertTrue("Should reset startThread",
- Whitebox.getInternalState(asdcListener, "startThread") == null);
+ Whitebox.getInternalState(sdcListener, "startThread") == null);
// test other non-null case and thread null case
IDistributionClient mockClient = mock(IDistributionClient.class);
- Whitebox.setInternalState(asdcListener, "client", mockClient);
- AsdcCallback mockCallback = mock(AsdcCallback.class);
- Whitebox.setInternalState(asdcListener, "callback", mockCallback);
+ Whitebox.setInternalState(sdcListener, "client", mockClient);
+ SdcCallback mockCallback = mock(SdcCallback.class);
+ Whitebox.setInternalState(sdcListener, "callback", mockCallback);
CountDownLatch mockLatch = mock(CountDownLatch.class);
- Whitebox.setInternalState(asdcListener, "latch", mockLatch);
+ Whitebox.setInternalState(sdcListener, "latch", mockLatch);
- asdcListener.stop();
+ sdcListener.stop();
Mockito.verify(mockLatch, times(1)).await(10, TimeUnit.SECONDS);
Mockito.verify(mockCallback, times(1)).stop();
Mockito.verify(mockClient, times(1)).stop();
Assert.assertTrue("Should reset latch",
- Whitebox.getInternalState(asdcListener, "latch") == null);
+ Whitebox.getInternalState(sdcListener, "latch") == null);
Assert.assertTrue("Should reset callback",
- Whitebox.getInternalState(asdcListener, "callback") == null);
+ Whitebox.getInternalState(sdcListener, "callback") == null);
Assert.assertTrue("Should reset client",
- Whitebox.getInternalState(asdcListener, "client") == null);
+ Whitebox.getInternalState(sdcListener, "client") == null);
}
@Test
public void testStopStartThread() throws Exception {
// null case
- asdcListener.stopStartThread(123);
+ sdcListener.stopStartThread(123);
Mockito.verify(mockLogger, times(0)).debug(String.valueOf(any()));
MockThread mockThread = spy(new MockThread());
// thread terminated case
- Whitebox.setInternalState(asdcListener, "startThread", mockThread);
+ Whitebox.setInternalState(sdcListener, "startThread", mockThread);
mockThread.setNewState(Thread.State.TERMINATED);
- asdcListener.stopStartThread(123);
+ sdcListener.stopStartThread(123);
Mockito.verify(mockThread, times(0)).interrupt();
Mockito.verify(mockLogger, times(1)).debug(String.valueOf(any()));
Assert.assertTrue("Should reset startThread",
- Whitebox.getInternalState(asdcListener, "startThread") == null);
+ Whitebox.getInternalState(sdcListener, "startThread") == null);
// thread not termianted case
int timesCallThread = 0;
@@ -120,13 +120,13 @@ public class AsdcListenerTest {
if (state == Thread.State.TERMINATED) {
continue;
}
- Whitebox.setInternalState(asdcListener, "startThread", mockThread);
+ Whitebox.setInternalState(sdcListener, "startThread", mockThread);
mockThread.setNewState(state);
- asdcListener.stopStartThread(123);
+ sdcListener.stopStartThread(123);
Mockito.verify(mockThread, times(++ timesCallThread)).interrupt();
Mockito.verify(mockLogger, times(timesCallLogger += 2)).debug(String.valueOf(any()));
Assert.assertTrue("Should reset startThread",
- Whitebox.getInternalState(asdcListener, "startThread") == null);
+ Whitebox.getInternalState(sdcListener, "startThread") == null);
}
}
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/TestRun.java b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/TestRun.java
index 9e00ad9ef..84337e471 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/TestRun.java
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/java/org/openecomp/appc/sdc/listener/TestRun.java
@@ -31,7 +31,7 @@ public class TestRun {
@Test
public void testRunning() throws Exception {
/*
- AppcAsdcListenerActivator a = new AppcAsdcListenerActivator();
+ AppcSdcListenerActivator a = new AppcSdcListenerActivator();
a.start(null);
Thread.sleep(10000);
a.stop(null);
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/resources/csar/service-ServiceAppc-csar.csar b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/resources/csar/service-ServiceAppc-csar.csar
index a30ca2f6f..a30ca2f6f 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/resources/csar/service-ServiceAppc-csar.csar
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/resources/csar/service-ServiceAppc-csar.csar
Binary files differ
diff --git a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/resources/org/openecomp/appc/default.properties b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/resources/org/openecomp/appc/default.properties
index 291a46f09..522e0ed72 100644
--- a/appc-asdc-listener/appc-asdc-listener-bundle/src/test/resources/org/openecomp/appc/default.properties
+++ b/appc-sdc-listener/appc-sdc-listener-bundle/src/test/resources/org/openecomp/appc/default.properties
@@ -23,14 +23,14 @@
###
# These ASDC properties were provided by the ASDC Op-So team
-appc.asdc.keystore.path=etc/asdc-client.jks
-appc.asdc.keystore.pass=Aa123456
+appc.sdc.keystore.path=etc/sdc-client.jks
+appc.sdc.keystore.pass=Aa123456
-appc.asdc.host=192.168.1.2:8443
-appc.asdc.env=TEST
-appc.asdc.user=appc
-appc.asdc.pass=appc
+appc.sdc.host=192.168.1.2:8443
+appc.sdc.env=TEST
+appc.sdc.user=appc
+appc.sdc.pass=appc
-appc.asdc.consumer=TEST
-appc.asdc.consumer.id=TEST
-appc.asdc.provider.url=http://localhost:8181/restconf/operations/AsdcMessage:configuration-document-request
+appc.sdc.consumer=TEST
+appc.sdc.consumer.id=TEST
+appc.sdc.provider.url=http://localhost:8181/restconf/operations/SdcMessage:configuration-document-request
diff --git a/appc-asdc-listener/appc-asdc-listener-features/.gitignore b/appc-sdc-listener/appc-sdc-listener-features/.gitignore
index 2992ae832..2992ae832 100644
--- a/appc-asdc-listener/appc-asdc-listener-features/.gitignore
+++ b/appc-sdc-listener/appc-sdc-listener-features/.gitignore
diff --git a/appc-asdc-listener/appc-asdc-listener-features/pom.xml b/appc-sdc-listener/appc-sdc-listener-features/pom.xml
index 247d8bd32..ff93b23bf 100644
--- a/appc-asdc-listener/appc-asdc-listener-features/pom.xml
+++ b/appc-sdc-listener/appc-sdc-listener-features/pom.xml
@@ -1,12 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>appc-asdc-listener</artifactId>
+ <artifactId>appc-sdc-listener</artifactId>
<groupId>org.openecomp.appc</groupId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <artifactId>appc-asdc-listener-features</artifactId>
+ <artifactId>appc-sdc-listener-features</artifactId>
<name>Event Listener - Features</name>
<packaging>jar</packaging>
@@ -14,7 +37,7 @@
<dependencies>
<dependency>
<groupId>org.openecomp.appc</groupId>
- <artifactId>appc-asdc-listener-bundle</artifactId>
+ <artifactId>appc-sdc-listener-bundle</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/appc-asdc-listener/appc-asdc-listener-features/src/main/resources/features.xml b/appc-sdc-listener/appc-sdc-listener-features/src/main/resources/features.xml
index 5b89ae291..409d31d53 100644
--- a/appc-asdc-listener/appc-asdc-listener-features/src/main/resources/features.xml
+++ b/appc-sdc-listener/appc-sdc-listener-features/src/main/resources/features.xml
@@ -24,18 +24,18 @@
-->
-<features name="appc-asdc-listener-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+<features name="appc-sdc-listener-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
<!-- <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.version}/xml/features</repository> -->
<repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
- <feature name='appc-asdc-listener' description="asdc listener" version='${project.version}'>
+ <feature name='appc-sdc-listener' description="sdc listener" version='${project.version}'>
<!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
<feature version="${broker-mdsal.version}">odl-mdsal-broker</feature>
<bundle dependency="true">mvn:org.openecomp.appc/appc-common/${project.version}</bundle>
- <bundle>mvn:org.openecomp.appc/appc-asdc-listener-bundle/${project.version}</bundle>
+ <bundle>mvn:org.openecomp.appc/appc-sdc-listener-bundle/${project.version}</bundle>
</feature>
</features>
diff --git a/appc-asdc-listener/appc-asdc-listener-installer/.gitignore b/appc-sdc-listener/appc-sdc-listener-installer/.gitignore
index 731eb433c..731eb433c 100644
--- a/appc-asdc-listener/appc-asdc-listener-installer/.gitignore
+++ b/appc-sdc-listener/appc-sdc-listener-installer/.gitignore
diff --git a/appc-asdc-listener/appc-asdc-listener-installer/pom.xml b/appc-sdc-listener/appc-sdc-listener-installer/pom.xml
index 7535b6d6f..cc15ae14e 100644
--- a/appc-asdc-listener/appc-asdc-listener-installer/pom.xml
+++ b/appc-sdc-listener/appc-sdc-listener-installer/pom.xml
@@ -1,19 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>appc-asdc-listener</artifactId>
+ <artifactId>appc-sdc-listener</artifactId>
<groupId>org.openecomp.appc</groupId>
<version>1.1.0-SNAPSHOT</version>
</parent>
- <artifactId>appc-asdc-listener-installer</artifactId>
- <name>ASDC Listener - Karaf Installer</name>
+ <artifactId>appc-sdc-listener-installer</artifactId>
+ <name>SDC Listener - Karaf Installer</name>
<packaging>pom</packaging>
<properties>
- <application.name>appc-asdc-listener</application.name>
- <features.boot>appc-asdc-listener</features.boot>
- <features.repositories>mvn:org.openecomp.appc/appc-asdc-listener-features/${project.version}/xml/features</features.repositories>
+ <application.name>appc-sdc-listener</application.name>
+ <features.boot>appc-sdc-listener</features.boot>
+ <features.repositories>mvn:org.openecomp.appc/appc-sdc-listener-features/${project.version}/xml/features</features.repositories>
<include.transitive.dependencies>false</include.transitive.dependencies>
</properties>
@@ -21,7 +44,7 @@
<dependency>
<groupId>org.openecomp.appc</groupId>
- <artifactId>appc-asdc-listener-features</artifactId>
+ <artifactId>appc-sdc-listener-features</artifactId>
<version>${project.version}</version>
<classifier>features</classifier>
<type>xml</type>
@@ -35,7 +58,7 @@
<dependency>
<groupId>org.openecomp.appc</groupId>
- <artifactId>appc-asdc-listener-bundle</artifactId>
+ <artifactId>appc-sdc-listener-bundle</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
diff --git a/appc-asdc-listener/appc-asdc-listener-installer/src/assembly/assemble_installer_zip.xml b/appc-sdc-listener/appc-sdc-listener-installer/src/assembly/assemble_installer_zip.xml
index 322fa76eb..322fa76eb 100644
--- a/appc-asdc-listener/appc-asdc-listener-installer/src/assembly/assemble_installer_zip.xml
+++ b/appc-sdc-listener/appc-sdc-listener-installer/src/assembly/assemble_installer_zip.xml
diff --git a/appc-asdc-listener/appc-asdc-listener-installer/src/assembly/assemble_mvnrepo_zip.xml b/appc-sdc-listener/appc-sdc-listener-installer/src/assembly/assemble_mvnrepo_zip.xml
index 615ee37d0..615ee37d0 100644
--- a/appc-asdc-listener/appc-asdc-listener-installer/src/assembly/assemble_mvnrepo_zip.xml
+++ b/appc-sdc-listener/appc-sdc-listener-installer/src/assembly/assemble_mvnrepo_zip.xml
diff --git a/appc-asdc-listener/appc-asdc-listener-installer/src/main/resources/scripts/install-feature.sh b/appc-sdc-listener/appc-sdc-listener-installer/src/main/resources/scripts/install-feature.sh
index 13d41ca56..13d41ca56 100644
--- a/appc-asdc-listener/appc-asdc-listener-installer/src/main/resources/scripts/install-feature.sh
+++ b/appc-sdc-listener/appc-sdc-listener-installer/src/main/resources/scripts/install-feature.sh
diff --git a/appc-asdc-listener/appc-yang-generator/pom.xml b/appc-sdc-listener/appc-yang-generator/pom.xml
index 11b5b9d76..abe531e35 100644
--- a/appc-asdc-listener/appc-yang-generator/pom.xml
+++ b/appc-sdc-listener/appc-yang-generator/pom.xml
@@ -1,10 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>appc-asdc-listener</artifactId>
+ <artifactId>appc-sdc-listener</artifactId>
<groupId>org.openecomp.appc</groupId>
<version>1.1.0-SNAPSHOT</version>
</parent>
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/YANGGenerator.java b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/YANGGenerator.java
index 562c4abf2..562c4abf2 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/YANGGenerator.java
+++ b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/YANGGenerator.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/exception/YANGGenerationException.java b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/exception/YANGGenerationException.java
index a37d6f685..a37d6f685 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/exception/YANGGenerationException.java
+++ b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/exception/YANGGenerationException.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorFactory.java b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorFactory.java
index 25d9b211a..25d9b211a 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorFactory.java
+++ b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorFactory.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java
index 246563932..246563932 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java
+++ b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/impl/YANGGeneratorImpl.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/objects/Leaf.java b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/objects/Leaf.java
index 013e31475..013e31475 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/objects/Leaf.java
+++ b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/objects/Leaf.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/type/YangTypes.java b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/type/YangTypes.java
index ca18c4311..ca18c4311 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/type/YangTypes.java
+++ b/appc-sdc-listener/appc-yang-generator/src/main/java/org/openecomp/appc/yang/type/YangTypes.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/main/resources/templates/YangTemplate.vm b/appc-sdc-listener/appc-yang-generator/src/main/resources/templates/YangTemplate.vm
index ab608c5e1..ab608c5e1 100644
--- a/appc-asdc-listener/appc-yang-generator/src/main/resources/templates/YangTemplate.vm
+++ b/appc-sdc-listener/appc-yang-generator/src/main/resources/templates/YangTemplate.vm
diff --git a/appc-asdc-listener/appc-yang-generator/src/test/java/org/openecomp/appc/TestYANGGenerator.java b/appc-sdc-listener/appc-yang-generator/src/test/java/org/openecomp/appc/TestYANGGenerator.java
index a4487ac52..a4487ac52 100644
--- a/appc-asdc-listener/appc-yang-generator/src/test/java/org/openecomp/appc/TestYANGGenerator.java
+++ b/appc-sdc-listener/appc-yang-generator/src/test/java/org/openecomp/appc/TestYANGGenerator.java
diff --git a/appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFile.yml b/appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFile.yml
index 0356678d1..0356678d1 100644
--- a/appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFile.yml
+++ b/appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFile.yml
diff --git a/appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithSyntaxError.yml b/appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithSyntaxError.yml
index 8ef1729a9..8ef1729a9 100644
--- a/appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithSyntaxError.yml
+++ b/appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithSyntaxError.yml
diff --git a/appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithUnsupportedTypes.yml b/appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithUnsupportedTypes.yml
index e2102e134..e2102e134 100644
--- a/appc-asdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithUnsupportedTypes.yml
+++ b/appc-sdc-listener/appc-yang-generator/src/test/resources/tosca/toscaFileWithUnsupportedTypes.yml
diff --git a/appc-asdc-listener/appc-yang-generator/src/test/resources/yang/expectedYang.yang b/appc-sdc-listener/appc-yang-generator/src/test/resources/yang/expectedYang.yang
index 29c89182b..29c89182b 100644
--- a/appc-asdc-listener/appc-yang-generator/src/test/resources/yang/expectedYang.yang
+++ b/appc-sdc-listener/appc-yang-generator/src/test/resources/yang/expectedYang.yang
diff --git a/appc-asdc-listener/pom.xml b/appc-sdc-listener/pom.xml
index 23b6e86f7..6a515faf6 100644
--- a/appc-asdc-listener/pom.xml
+++ b/appc-sdc-listener/pom.xml
@@ -1,4 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -7,8 +30,8 @@
<version>1.1.0-SNAPSHOT</version>
</parent>
- <artifactId>appc-asdc-listener</artifactId>
- <name>ASDC Event Listener</name>
+ <artifactId>appc-sdc-listener</artifactId>
+ <name>SDC Event Listener</name>
<description>Listener to read and write events from DMaaP (Cambria) or DMaaP.</description>
<packaging>pom</packaging>
@@ -99,8 +122,8 @@
<modules>
<module>appc-yang-generator</module>
- <module>appc-asdc-listener-bundle</module>
- <module>appc-asdc-listener-features</module>
- <module>appc-asdc-listener-installer</module>
+ <module>appc-sdc-listener-bundle</module>
+ <module>appc-sdc-listener-features</module>
+ <module>appc-sdc-listener-installer</module>
</modules>
</project> \ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2b6abfdaf..11e7de72d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,4 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+============LICENSE_START=======================================================
+ONAP : APPC
+================================================================================
+Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+================================================================================
+Copyright (C) 2017 Amdocs
+=============================================================================
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.
+============LICENSE_END=========================================================
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
@@ -600,7 +623,7 @@
<module>appc-adapters</module>
<module>appc-provider</module>
<module>appc-event-listener</module>
- <module>appc-asdc-listener</module>
+ <module>appc-sdc-listener</module>
<module>appc-lifecycle-management</module>
<module>appc-oam</module>
<module>appc-config</module>