diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-01-07 16:33:02 -0500 |
---|---|---|
committer | Alexis de Talhouët <alexis.de_talhouet@bell.ca> | 2019-01-09 22:11:43 +0000 |
commit | f9a15b74e4dd0bb9262d194483d0ba9aaee713e3 (patch) | |
tree | 8cc428a1f3e91fa85134371c2a28025867eceefc /components/core | |
parent | 83993ac9ca45b35a70b165130c8907b09a12ea1e (diff) |
Add support for blueprintprocessor runtime DB
- created db-resources module to store controller blueprint
related controller blueprint repository and entities. Also
create an abstract BlueprintCatalogServiceImpl so it can be
used both by controllerblueprint and blueprintprocessor
- created blueprint-validation to store the implementation
of the validation interface.
- change controllerblueprint service to levrage db-resources
- implement CatalogService for blueprintprocessor db-lib by
using db-resources.
Change-Id: I0539e414e4ff3b7a6edf0f6304d6cbc5e6eac404
Issue-ID: CCSDK-664
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'components/core')
4 files changed, 60 insertions, 7 deletions
diff --git a/components/core/pom.xml b/components/core/pom.xml index 2e0ab54af..8b6c524d0 100644 --- a/components/core/pom.xml +++ b/components/core/pom.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright © 2017-2018 AT&T Intellectual Property.
- ~
~ Modifications Copyright © 2018 IBM.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,9 +17,9 @@ -->
<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- 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"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onap.ccsdk.apps.components</groupId>
diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/common/ApplicationConstants.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/common/ApplicationConstants.kt new file mode 100644 index 000000000..994ea5b7b --- /dev/null +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/common/ApplicationConstants.kt @@ -0,0 +1,23 @@ +/* + * Copyright © 2019 Bell Canada + * + * 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. + */ + +package org.onap.ccsdk.apps.controllerblueprints.core.common + +object ApplicationConstants { + const val ACTIVE_Y = "Y" + const val ACTIVE_N = "N" + const val ASDC_ARTIFACT_TYPE_SDNC_MODEL = "SDNC_MODEL" +} diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/config/BluePrintLoadConfiguration.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/config/BluePrintLoadConfiguration.kt new file mode 100644 index 000000000..235cfd56b --- /dev/null +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/config/BluePrintLoadConfiguration.kt @@ -0,0 +1,34 @@ +/* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * 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. + */ + +package org.onap.ccsdk.apps.controllerblueprints.core.config + +open class BluePrintLoadConfiguration { + + lateinit var blueprintDeployPath: String + lateinit var blueprintArchivePath: String + lateinit var blueprintEnrichmentPath: String + + var loadInitialData: Boolean = false + var loadBluePrint: Boolean = false + var loadBluePrintPaths: String? = null + + var loadModelType: Boolean = false + var loadModeTypePaths: String? = null + + var loadResourceDictionary: Boolean = false + var loadResourceDictionaryPaths: String? = null +}
\ No newline at end of file diff --git a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt index beb649134..ab5175dea 100755 --- a/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt +++ b/components/core/src/main/kotlin/org/onap/ccsdk/apps/controllerblueprints/core/utils/BluePrintArchiveUtils.kt @@ -22,13 +22,10 @@ import kotlinx.coroutines.runBlocking import org.apache.commons.compress.archivers.zip.ZipArchiveEntry import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream import org.apache.commons.io.IOUtils -import org.apache.commons.io.filefilter.DirectoryFileFilter import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintException import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintProcessorException -import reactor.core.publisher.zip import java.io.* import java.nio.charset.Charset -import java.nio.file.Files import java.util.zip.ZipFile class BluePrintArchiveUtils { |