summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
diff options
context:
space:
mode:
authoremaclee <lee.anjella.macabuhay@est.tech>2024-01-24 18:46:15 +0000
committeremaclee <lee.anjella.macabuhay@est.tech>2024-01-26 12:10:35 +0000
commit8cc5ca13310b47ff715d38f12cde0943dc0d6cc4 (patch)
treeef1309fa2e4019c548a3e490231905984b207c3c /cps-ncmp-service/src/main
parentad5d1fccb4e07ac0260ca4a6a0f7034861e631ad (diff)
Correct datastore names via DatastoreType Enum
- Use existing DatastoreType enum in defining datastore name Issue-ID: CPS-2046 Change-Id: I6f2f77c96b239546f7141267c0c01edfc599b445 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
index 88ba5e91be..c0b1f34d49 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/CmDataSubscriptionModelLoader.java
@@ -30,6 +30,7 @@ import org.onap.cps.api.CpsDataService;
import org.onap.cps.api.CpsDataspaceService;
import org.onap.cps.api.CpsModuleService;
import org.onap.cps.ncmp.api.impl.exception.NcmpStartUpException;
+import org.onap.cps.ncmp.api.impl.operations.DatastoreType;
import org.onap.cps.spi.exceptions.AlreadyDefinedException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -42,8 +43,6 @@ public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
private static final String SCHEMASET_NAME = "cm-data-subscriptions";
private static final String ANCHOR_NAME = "cm-data-subscriptions";
private static final String REGISTRY_DATANODE_NAME = "datastores";
- private static final String DATASTORE_PASSTHROUGH_OPERATIONAL = "ncmp-datastores:passthrough-operational";
- private static final String DATASTORE_PASSTHROUGH_RUNNING = "ncmp-datastores:passthrough-running";
public CmDataSubscriptionModelLoader(final CpsDataspaceService cpsDataspaceService,
final CpsModuleService cpsModuleService,
@@ -70,7 +69,8 @@ public class CmDataSubscriptionModelLoader extends AbstractModelLoader {
createSchemaSet(NCMP_DATASPACE_NAME, SCHEMASET_NAME, MODEL_FILENAME);
createAnchor(NCMP_DATASPACE_NAME, SCHEMASET_NAME, ANCHOR_NAME);
createTopLevelDataNode(NCMP_DATASPACE_NAME, ANCHOR_NAME, REGISTRY_DATANODE_NAME);
- createDatastore(DATASTORE_PASSTHROUGH_OPERATIONAL, DATASTORE_PASSTHROUGH_RUNNING);
+ createDatastore(DatastoreType.PASSTHROUGH_OPERATIONAL.getDatastoreName(),
+ DatastoreType.PASSTHROUGH_RUNNING.getDatastoreName());
}
private void createDatastore(final String... datastoreNames) {