diff options
Diffstat (limited to 'cps-service/src')
3 files changed, 4 insertions, 4 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java b/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java index 5ff08c9ac8..e8c3e7775c 100644 --- a/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java +++ b/cps-service/src/main/java/org/onap/cps/api/CpsModuleService.java @@ -47,13 +47,13 @@ public interface CpsModuleService { Map<String, String> yangResourcesNameToContentMap); /** - * Create a schema set from new modules and existing modules. + * Create or upgrade a schema set from new modules and existing modules or only existing modules. * @param dataspaceName Dataspace name * @param schemaSetName schema set name * @param newModuleNameToContentMap YANG resources map where key is a module name and value is content * @param allModuleReferences All YANG resource module references */ - void createSchemaSetFromModules(String dataspaceName, String schemaSetName, + void createOrUpgradeSchemaSetFromModules(String dataspaceName, String schemaSetName, Map<String, String> newModuleNameToContentMap, Collection<ModuleReference> allModuleReferences); diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java index 7d9c472e69..444c895fb7 100644 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsModuleServiceImpl.java @@ -66,7 +66,7 @@ public class CpsModuleServiceImpl implements CpsModuleService { } @Override - public void createSchemaSetFromModules(final String dataspaceName, final String schemaSetName, + public void createOrUpgradeSchemaSetFromModules(final String dataspaceName, final String schemaSetName, final Map<String, String> newModuleNameToContentMap, final Collection<ModuleReference> allModuleReferences) { cpsValidator.validateNameCharacters(dataspaceName, schemaSetName); diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy index a794c58fc6..61f67416d2 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy @@ -65,7 +65,7 @@ class CpsModuleServiceImplSpec extends Specification { def moduleReferenceForExistingModule = new ModuleReference('test', '2021-10-12','test.org') def listOfExistingModulesModuleReference = [moduleReferenceForExistingModule] when: 'create schema set from modules method is invoked' - objectUnderTest.createSchemaSetFromModules('someDataspaceName', 'someSchemaSetName', [newModule: 'newContent'], listOfExistingModulesModuleReference) + objectUnderTest.createOrUpgradeSchemaSetFromModules('someDataspaceName', 'someSchemaSetName', [newModule: 'newContent'], listOfExistingModulesModuleReference) then: 'processing is delegated to persistence service' 1 * mockCpsModulePersistenceService.storeSchemaSetFromModules('someDataspaceName', 'someSchemaSetName', [newModule: 'newContent'], listOfExistingModulesModuleReference) and: 'the CpsValidator is called on the dataspaceName and schemaSetName' |