Blueprints Processor Service
authorMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Wed, 15 Aug 2018 21:31:10 +0000 (21:31 +0000)
committerMuthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
Thu, 16 Aug 2018 14:47:23 +0000 (14:47 +0000)
Blueprints Processor API definitions

Change-Id: Id44c74938f75e847a43b8e6d0733c36d4dc99e97
Issue-ID: CCSDK-411
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
42 files changed:
ms/blueprintsprocessor/.gitignore [new file with mode: 0644]
ms/blueprintsprocessor/application/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java [new file with mode: 0644]
ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java [new file with mode: 0644]
ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java [new file with mode: 0644]
ms/blueprintsprocessor/application/src/main/resources/application.properties [new file with mode: 0644]
ms/blueprintsprocessor/application/src/main/resources/logback.xml [new file with mode: 0644]
ms/blueprintsprocessor/application/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplicationTest.java [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/adaptors/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/core/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorException.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/core/src/main/resources/application.properties [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/db-lib/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/resource/api/ResourceResolutionController.java [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/ExecutionServiceController.java [new file with mode: 0644]
ms/blueprintsprocessor/modules/outbounds/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/db-service/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/execution-service/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ExecutionService.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/execution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ExecutionServiceTest.java [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/payload/inputs/input.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/payload/requests/sample-execution-request.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json [new file with mode: 0644]
ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json [new file with mode: 0644]
ms/blueprintsprocessor/parent/pom.xml [new file with mode: 0644]
ms/blueprintsprocessor/pom.xml [new file with mode: 0644]

diff --git a/ms/blueprintsprocessor/.gitignore b/ms/blueprintsprocessor/.gitignore
new file mode 100644 (file)
index 0000000..8dd19d0
--- /dev/null
@@ -0,0 +1,28 @@
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+.classpath
+.settings/
+
+# Target dirs in all projects
+**/target-ide/*
+**/target/*
+**/logs/*
+**/tokens/*
+
+# Added for Intellij IDEA IDE
+**/debug-logs/*
+**/.idea/*
+**/*.iml
+**/*.project
+**/.springBeans
+
+**/*versionsBackup
+**/blackDuckHub*
+**/*.jsonld
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
new file mode 100644 (file)
index 0000000..ea42260
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>parent</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <artifactId>application</artifactId>
+    <packaging>jar</packaging>
+    <name>Blueprints Processor Application</name>
+    <description>Blueprints Processor Application</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>resource-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>selfservice-api</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplication.java
new file mode 100644 (file)
index 0000000..2a13f92
--- /dev/null
@@ -0,0 +1,39 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor;\r
+\r
+import org.springframework.boot.SpringApplication;\r
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r
+import org.springframework.boot.autoconfigure.SpringBootApplication;\r
+import org.springframework.context.annotation.ComponentScan;\r
+import org.springframework.web.reactive.config.EnableWebFlux;\r
+\r
+/**\r
+ * BlueprintProcessorApplication\r
+ *\r
+ * @author Brinda Santh 8/14/2018\r
+ */\r
+@SpringBootApplication\r
+@EnableAutoConfiguration\r
+@EnableWebFlux\r
+@ComponentScan(basePackages = {"org.onap.ccsdk.apps.controllerblueprints",\r
+        "org.onap.ccsdk.apps.blueprintsprocessor"})\r
+public class BlueprintProcessorApplication {\r
+    public static void main(String[] args) {\r
+        SpringApplication.run(BlueprintProcessorApplication.class, args);\r
+    }\r
+}\r
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/SwaggerConfig.java
new file mode 100644 (file)
index 0000000..0b5f622
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.context.annotation.Bean;\r
+import org.springframework.context.annotation.ComponentScan;\r
+import org.springframework.context.annotation.Configuration;\r
+import org.springframework.web.bind.annotation.RequestMapping;\r
+import springfox.documentation.builders.PathSelectors;\r
+import springfox.documentation.builders.RequestHandlerSelectors;\r
+import springfox.documentation.service.ApiInfo;\r
+import springfox.documentation.service.Contact;\r
+import springfox.documentation.spi.DocumentationType;\r
+import springfox.documentation.spring.web.plugins.Docket;\r
+import springfox.documentation.swagger2.annotations.EnableSwagger2;\r
+\r
+import java.util.Arrays;\r
+import java.util.Collections;\r
+import java.util.HashSet;\r
+import java.util.Set;\r
+\r
+/**\r
+ * SwaggerConfig\r
+ *\r
+ * @author Brinda Santh 8/13/2018\r
+ */\r
+@Configuration\r
+@EnableSwagger2\r
+public class SwaggerConfig {\r
+    private static final Set<String> DEFAULT_PRODUCES_AND_CONSUMES =\r
+            new HashSet<String>(Arrays.asList("application/json",\r
+                    "application/xml"));\r
+    private static Logger log = LoggerFactory.getLogger(SwaggerConfig.class);\r
+\r
+    @Bean\r
+    public Docket api() {\r
+        return new Docket(DocumentationType.SWAGGER_2)\r
+                .select()\r
+                .apis(RequestHandlerSelectors.any())\r
+                .paths(PathSelectors.any())\r
+                .build()\r
+                .apiInfo(apiInfo());\r
+    }\r
+\r
+    private ApiInfo apiInfo() {\r
+        return new ApiInfo(\r
+                "Blueprints Processor API",\r
+                "Controller blueprints processor API for VNF Selfservice.",\r
+                "1.0.0",\r
+                "Terms of service",\r
+                new Contact("Brinda Santh", "www.onap.com", "bs2796@onap.com"),\r
+                "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0", Collections.emptyList());\r
+    }\r
+\r
+\r
+}\r
diff --git a/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java b/ms/blueprintsprocessor/application/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/WebConfig.java
new file mode 100644 (file)
index 0000000..f1b8f9d
--- /dev/null
@@ -0,0 +1,39 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.context.annotation.Configuration;\r
+import org.springframework.format.FormatterRegistry;\r
+import org.springframework.web.reactive.config.*;\r
+\r
+/**\r
+ * WebConfig\r
+ *\r
+ * @author Brinda Santh 8/13/2018\r
+ */\r
+@Configuration\r
+public class WebConfig extends WebFluxConfigurationSupport {\r
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {\r
+        registry.addResourceHandler("swagger-ui.html")\r
+                .addResourceLocations("classpath:/META-INF/resources/");\r
+\r
+        registry.addResourceHandler("/webjars/**")\r
+                .addResourceLocations("classpath:/META-INF/resources/webjars/");\r
+    }\r
+}\r
diff --git a/ms/blueprintsprocessor/application/src/main/resources/application.properties b/ms/blueprintsprocessor/application/src/main/resources/application.properties
new file mode 100644 (file)
index 0000000..f30a7f1
--- /dev/null
@@ -0,0 +1,15 @@
+#\r
+#  Copyright © 2017-2018 AT&T Intellectual Property.\r
+#\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#      http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/application/src/main/resources/logback.xml b/ms/blueprintsprocessor/application/src/main/resources/logback.xml
new file mode 100644 (file)
index 0000000..a97bb8c
--- /dev/null
@@ -0,0 +1,36 @@
+<!--\r
+  ~  Copyright © 2017-2018 AT&T Intellectual Property.\r
+  ~\r
+  ~  Licensed under the Apache License, Version 2.0 (the "License");\r
+  ~  you may not use this file except in compliance with the License.\r
+  ~  You may obtain a copy of the License at\r
+  ~\r
+  ~      http://www.apache.org/licenses/LICENSE-2.0\r
+  ~\r
+  ~  Unless required by applicable law or agreed to in writing, software\r
+  ~  distributed under the License is distributed on an "AS IS" BASIS,\r
+  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  ~  See the License for the specific language governing permissions and\r
+  ~  limitations under the License.\r
+  -->\r
+\r
+<configuration>\r
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">\r
+        <!-- encoders are assigned the type\r
+             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->\r
+        <encoder>\r
+            <pattern>%d{HH:mm:ss.SSS} %-5level %logger{100} - %msg%n</pattern>\r
+        </encoder>\r
+    </appender>\r
+\r
+\r
+    <logger name="org.springframework" level="info"/>\r
+    <logger name="org.springframework.web" level="info"/>\r
+    <logger name="org.hibernate" level="error"/>\r
+    <logger name="org.onap.ccsdk.apps" level="info"/>\r
+\r
+    <root level="warn">\r
+        <appender-ref ref="STDOUT"/>\r
+    </root>\r
+\r
+</configuration>\r
diff --git a/ms/blueprintsprocessor/application/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplicationTest.java b/ms/blueprintsprocessor/application/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/BlueprintProcessorApplicationTest.java
new file mode 100644 (file)
index 0000000..3cba1f9
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor;\r
+\r
+\r
+import org.junit.Assert;\r
+import org.junit.Before;\r
+import org.junit.Test;\r
+import org.junit.runner.RunWith;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.context.ApplicationContext;\r
+import org.springframework.test.context.ContextConfiguration;\r
+import org.springframework.test.context.junit4.SpringRunner;\r
+\r
+/**\r
+ * BlueprintProcessorApplicationTest\r
+ *\r
+ * @author Brinda Santh\r
+ * DATE : 8/14/2018\r
+ */\r
+\r
+@RunWith(SpringRunner.class)\r
+@ContextConfiguration(classes = BlueprintProcessorApplication.class)\r
+//@SpringBootTest(classes = BlueprintProcessorApplication.class,\r
+//        webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)\r
+public class BlueprintProcessorApplicationTest {\r
+\r
+    @Autowired\r
+    private ApplicationContext context;\r
+\r
+    @Before\r
+    public void setUp() {\r
+\r
+    }\r
+\r
+    @Test\r
+    public void testSample(){\r
+        Assert.assertNotNull("Failed to create Application Context ", context);\r
+    }\r
+\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml b/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml
new file mode 100644 (file)
index 0000000..efd7d74
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>commons</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>adaptors</artifactId>
+       <packaging>pom</packaging>
+       <name>Blueprints Processor Adaptors POM</name>
+       <description>Blueprints Processor Adaptors</description>
+       <modules>
+
+       </modules>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/commons/core/pom.xml b/ms/blueprintsprocessor/modules/commons/core/pom.xml
new file mode 100644 (file)
index 0000000..a601560
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>commons</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>core</artifactId>
+       <packaging>jar</packaging>
+       <name>Blueprints Processor Core</name>
+       <description>Blueprints Processor Core</description>
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                       <artifactId>db-lib</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                       <artifactId>rest-lib</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.onap.ccsdk.apps</groupId>
+                       <artifactId>controllerblueprints-resource-dict</artifactId>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorData.kt
new file mode 100644 (file)
index 0000000..4836cd2
--- /dev/null
@@ -0,0 +1,131 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.core.api.data\r
+\r
+import com.fasterxml.jackson.annotation.JsonFormat\r
+import com.fasterxml.jackson.databind.node.ObjectNode\r
+import io.swagger.annotations.ApiModelProperty\r
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment\r
+\r
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+/**\r
+ * BlueprintProcessorData\r
+ * @author Brinda Santh\r
+ * DATE : 8/15/2018\r
+ */\r
+\r
+open class ResourceResolutionInput {\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var commonHeader: CommonHeader\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var actionIdentifiers: ActionIdentifiers\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var resourceAssignments: List<ResourceAssignment>\r
+    @get:ApiModelProperty(required=true )\r
+    lateinit var payload: ObjectNode\r
+}\r
+\r
+open class ResourceResolutionOutput {\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var commonHeader: CommonHeader\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var actionIdentifiers: ActionIdentifiers\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var status: Status\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var resourceAssignments: List<ResourceAssignment>\r
+}\r
+\r
+open class ExecutionServiceInput {\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var commonHeader: CommonHeader\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var actionIdentifiers: ActionIdentifiers\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var payload: ObjectNode\r
+}\r
+\r
+open class ExecutionServiceOutput {\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var commonHeader: CommonHeader\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var actionIdentifiers: ActionIdentifiers\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var status: Status\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var payload: ObjectNode\r
+}\r
+\r
+open class ActionIdentifiers {\r
+    @get:ApiModelProperty(required=false)\r
+    lateinit var blueprintName: String\r
+    @get:ApiModelProperty(required=false)\r
+    lateinit var blueprintVersion: String\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var actionName: String\r
+    @get:ApiModelProperty(required=true, allowableValues = "sync, async")\r
+    lateinit var mode: String\r
+}\r
+\r
+open class CommonHeader {\r
+    @get:ApiModelProperty(required=true, example = "2012-04-23T18:25:43.511Z")\r
+    @get:JsonFormat(shape = JsonFormat.Shape.STRING,  pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")\r
+    lateinit var timestamp: String\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var originatorId: String\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var requestId: String\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var subRequestId: String\r
+    @get:ApiModelProperty(required=false)\r
+    var flags: Flags? = null\r
+}\r
+\r
+open class Flags {\r
+    var isForce: Boolean = false\r
+    @get:ApiModelProperty(value = "3600")\r
+    var ttl: Int = 3600\r
+}\r
+\r
+open class Status {\r
+    @get:ApiModelProperty(required=true)\r
+    var code: Int = 200\r
+    @get:ApiModelProperty(required=false)\r
+    var errorMessage: String? = null\r
+    @get:ApiModelProperty(required=true)\r
+    lateinit var message: String\r
+}\r
+\r
+\r
+\r
+\r
+\r
diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorException.kt b/ms/blueprintsprocessor/modules/commons/core/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/core/api/data/BlueprintProcessorException.kt
new file mode 100644 (file)
index 0000000..df4d670
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.core.api.data\r
+\r
+/**\r
+ * BlueprintProcessorException\r
+ * @author Brinda Santh\r
+ * DATE : 8/15/2018\r
+ */\r
+open class BlueprintProcessorException : Exception {\r
+    var code: Int = 100\r
+\r
+    constructor(cause: Throwable) : super(cause)\r
+    constructor(message: String) : super(message)\r
+    constructor(message: String, cause: Throwable) : super(message, cause)\r
+    constructor(cause: Throwable, message: String, vararg args: Any?) : super(String.format(message, *args), cause)\r
+\r
+    constructor(code: Int, cause: Throwable) : super(cause) {\r
+        this.code = code\r
+    }\r
+\r
+    constructor(code: Int, message: String) : super(message) {\r
+        this.code = code\r
+    }\r
+\r
+    constructor(code: Int, message: String, cause: Throwable) : super(message, cause) {\r
+        this.code = code\r
+    }\r
+\r
+    constructor(code: Int, cause: Throwable, message: String, vararg args: Any?)\r
+            : super(String.format(message, *args), cause) {\r
+        this.code = code\r
+    }\r
+}
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/commons/core/src/main/resources/application.properties b/ms/blueprintsprocessor/modules/commons/core/src/main/resources/application.properties
new file mode 100644 (file)
index 0000000..2ce8714
--- /dev/null
@@ -0,0 +1,16 @@
+#\r
+#  Copyright © 2017-2018 AT&T Intellectual Property.\r
+#\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#      http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#\r
+\r
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml
new file mode 100644 (file)
index 0000000..31abb40
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>commons</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>db-lib</artifactId>
+       <packaging>jar</packaging>
+       <name>Blueprints Processor DB Lib</name>
+       <description>Blueprints Processor DB Lib</description>
+
+       <dependencies>
+
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-data-jpa</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>javax.validation</groupId>
+                       <artifactId>validation-api</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>com.h2database</groupId>
+                       <artifactId>h2</artifactId>
+               </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-testing</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+       </dependencies>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml
new file mode 100644 (file)
index 0000000..83a3cb8
--- /dev/null
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>modules</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>commons</artifactId>
+    <packaging>pom</packaging>
+    <name>Blueprints Processor Commons POM</name>
+    <description>Blueprints Processor Commons</description>
+
+    <modules>
+        <module>db-lib</module>
+        <module>rest-lib</module>
+        <module>adaptors</module>
+        <module>core</module>
+    </modules>
+    <dependencies>
+        <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-kotlin</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib-jdk8</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-reflect</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.projectreactor</groupId>
+            <artifactId>reactor-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml
new file mode 100644 (file)
index 0000000..d671f12
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>commons</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>rest-lib</artifactId>
+       <packaging>jar</packaging>
+       <name>Blueprints Processor Rest Lib</name>
+       <description>Blueprints Processor Rest Lib</description>
+       <dependencies>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-webflux</artifactId>
+               </dependency>
+       </dependencies>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml
new file mode 100644 (file)
index 0000000..1b9d278
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>modules</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>inbounds</artifactId>
+    <packaging>pom</packaging>
+    <name>Blueprints Processor Inbounds POM</name>
+    <description>Blueprints Processor Inbounds</description>
+
+    <modules>
+        <module>resource-api</module>
+        <module>selfservice-api</module>
+    </modules>
+    <dependencies>
+
+
+
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>execution-service</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>resolution-service</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml
new file mode 100644 (file)
index 0000000..6ed7c9d
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>inbounds</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>resource-api</artifactId>
+       <packaging>jar</packaging>
+       <name>Blueprints Processor Resource API</name>
+       <description>Blueprints Processor Resource API</description>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/resource/api/ResourceResolutionController.java b/ms/blueprintsprocessor/modules/inbounds/resource-api/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/resource/api/ResourceResolutionController.java
new file mode 100644 (file)
index 0000000..8aeb415
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.resource.api;\r
+\r
+import io.swagger.annotations.ApiOperation;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.services.resolution.ResourceResolutionService;\r
+import org.springframework.http.MediaType;\r
+import org.springframework.web.bind.annotation.*;\r
+import reactor.core.publisher.Mono;\r
+\r
+/**\r
+ * ResourceResolutionController\r
+ *\r
+ * @author Brinda Santh Date : 8/13/2018\r
+ */\r
+\r
+@RestController\r
+@RequestMapping("/api/v1/resource")\r
+public class ResourceResolutionController {\r
+\r
+    private ResourceResolutionService resourceResolutionService;\r
+\r
+    public ResourceResolutionController(ResourceResolutionService resourceResolutionService) {\r
+        this.resourceResolutionService = resourceResolutionService;\r
+    }\r
+\r
+    @RequestMapping(path = "/ping", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r
+    public @ResponseBody\r
+    Mono<String> ping() {\r
+        return Mono.just("Success");\r
+    }\r
+\r
+    @RequestMapping(path = "/resolve-mapping", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\r
+    @ApiOperation(value = "Resolve Resource Mappings",\r
+            notes = "Also returns a link to retrieve all students with rel - all-students")\r
+    public @ResponseBody\r
+    Mono<ResourceResolutionOutput> resolveResource(@RequestBody ResourceResolutionInput resourceResolutionInput) {\r
+        return Mono.just(resourceResolutionService.resolveResource(resourceResolutionInput));\r
+    }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml
new file mode 100644 (file)
index 0000000..a777c08
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>inbounds</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>selfservice-api</artifactId>
+       <packaging>jar</packaging>
+       <name>Blueprints Processor Selfservice API</name>
+       <description>Blueprints Processor Selfservice API</description>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/ExecutionServiceController.java b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/src/main/java/org/onap/ccsdk/apps/blueprintsprocessor/selfservice/api/ExecutionServiceController.java
new file mode 100644 (file)
index 0000000..75407c5
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.selfservice.api;\r
+\r
+import io.swagger.annotations.ApiOperation;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ExecutionService;\r
+import org.springframework.http.MediaType;\r
+import org.springframework.web.bind.annotation.*;\r
+import reactor.core.publisher.Mono;\r
+\r
+/**\r
+ * ExecutionServiceController\r
+ *\r
+ * @author Brinda Santh 8/14/2018\r
+ */\r
+@RestController\r
+@RequestMapping("/api/v1/execution-service")\r
+public class ExecutionServiceController {\r
+\r
+    private ExecutionService executionService;\r
+\r
+    public ExecutionServiceController(ExecutionService executionService) {\r
+        this.executionService = executionService;\r
+    }\r
+\r
+    @RequestMapping(path = "/ping", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r
+    public @ResponseBody\r
+    Mono<String> ping() {\r
+        return Mono.just("Success");\r
+    }\r
+\r
+    @RequestMapping(path = "/process", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\r
+    @ApiOperation(value = "Resolve Resource Mappings",\r
+            notes = "Takes the blueprint information and process as per the payload")\r
+    public @ResponseBody\r
+    Mono<ExecutionServiceOutput> process(@RequestBody ExecutionServiceInput executionServiceInput) {\r
+        return Mono.just(executionService.process(executionServiceInput));\r
+    }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/outbounds/pom.xml b/ms/blueprintsprocessor/modules/outbounds/pom.xml
new file mode 100644 (file)
index 0000000..213e516
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>modules</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>outbounds</artifactId>
+       <packaging>pom</packaging>
+       <name>Blueprints Processor Outbounds POM</name>
+       <description>Blueprints Processor Outbounds</description>
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml
new file mode 100644 (file)
index 0000000..6844743
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>parent</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+               <relativePath>../parent</relativePath>
+       </parent>
+
+       <artifactId>modules</artifactId>
+       <packaging>pom</packaging>
+       <name>Blueprints Processor Modules POM</name>
+       <description>Blueprints Processor Modules</description>
+
+       <modules>
+               <module>commons</module>
+               <module>outbounds</module>
+               <module>services</module>
+               <module>inbounds</module>
+       </modules>
+
+    <properties>
+        <kotlin.version>1.2.60</kotlin.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib-jdk8</artifactId>
+            <version>${kotlin.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-test</artifactId>
+            <version>${kotlin.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-maven-plugin</artifactId>
+                <version>${kotlin.version}</version>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>test-compile</id>
+                        <phase>test-compile</phase>
+                        <goals>
+                            <goal>test-compile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <jvmTarget>1.8</jvmTarget>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>
diff --git a/ms/blueprintsprocessor/modules/services/db-service/pom.xml b/ms/blueprintsprocessor/modules/services/db-service/pom.xml
new file mode 100644 (file)
index 0000000..b11ba6d
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+               <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+               <artifactId>services</artifactId>
+               <version>0.0.3-SNAPSHOT</version>
+       </parent>
+
+       <artifactId>db-service</artifactId>
+       <packaging>jar</packaging>
+       <name>Blueprints Processor DB Service</name>
+       <description>Blueprints Processor DB Service</description>
+
+       <dependencies>
+       </dependencies>
+</project>
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml
new file mode 100644 (file)
index 0000000..c49476f
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>services</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>execution-service</artifactId>
+    <packaging>jar</packaging>
+    <name>Blueprints Processor Execution Service</name>
+    <description>Blueprints Processor Execution Service</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>db-service</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ExecutionService.kt b/ms/blueprintsprocessor/modules/services/execution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ExecutionService.kt
new file mode 100644 (file)
index 0000000..75b26bb
--- /dev/null
@@ -0,0 +1,46 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.services.execution\r
+\r
+\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status\r
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils\r
+import org.springframework.stereotype.Service\r
+import com.fasterxml.jackson.databind.node.ObjectNode\r
+\r
+/**\r
+ * ExecutionService\r
+ * @author Brinda Santh\r
+ * 8/14/2018\r
+ */\r
+@Service\r
+class ExecutionService {\r
+\r
+    fun process(executionServiceInput: ExecutionServiceInput): ExecutionServiceOutput {\r
+        val executionServiceOutput = ExecutionServiceOutput()\r
+        executionServiceOutput.actionIdentifiers = executionServiceInput.actionIdentifiers\r
+        executionServiceOutput.commonHeader = executionServiceInput.commonHeader\r
+        executionServiceOutput.payload = JacksonUtils.jsonNode("{}") as ObjectNode\r
+        val status = Status()\r
+        status.code = 200\r
+        status.message = "Success"\r
+        executionServiceOutput.status = status\r
+        return executionServiceOutput\r
+    }\r
+}
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ExecutionServiceTest.java b/ms/blueprintsprocessor/modules/services/execution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/execution/ExecutionServiceTest.java
new file mode 100644 (file)
index 0000000..0df95d2
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.services.execution;\r
+\r
+import com.fasterxml.jackson.databind.node.ObjectNode;\r
+import org.apache.commons.io.FileUtils;\r
+import org.junit.Assert;\r
+import org.junit.Test;\r
+import org.junit.runner.RunWith;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceOutput;\r
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.test.context.ContextConfiguration;\r
+import org.springframework.test.context.junit4.SpringRunner;\r
+\r
+import java.io.File;\r
+import java.nio.charset.Charset;\r
+\r
+\r
+/**\r
+ * ExecutionServiceTest\r
+ *\r
+ * @author Brinda Santh\r
+ * DATE : 8/15/2018\r
+ */\r
+@RunWith(SpringRunner.class)\r
+@ContextConfiguration(classes = ExecutionService.class)\r
+public class ExecutionServiceTest {\r
+    private static Logger log = LoggerFactory.getLogger(ExecutionServiceTest.class);\r
+\r
+    @Autowired\r
+    private ExecutionService executionService;\r
+\r
+    @Test\r
+    public void testExecutionService() throws Exception {\r
+\r
+        Assert.assertNotNull("failed to create ResourceResolutionService", executionService);\r
+\r
+        String resourceResolutionInputContent = FileUtils.readFileToString(\r
+                new File("src/test/resources/payload/requests/sample-execution-request.json"), Charset.defaultCharset());\r
+\r
+        ExecutionServiceInput executionServiceInput = JacksonUtils.readValue(resourceResolutionInputContent, ExecutionServiceInput.class );\r
+        Assert.assertNotNull("failed to populate executionServiceInput request ",executionServiceInput);\r
+\r
+        ObjectNode inputContent = (ObjectNode)JacksonUtils.jsonNodeFromFile("src/test/resources/payload/inputs/input.json");\r
+        Assert.assertNotNull("failed to populate input payload ",inputContent);\r
+        executionServiceInput.setPayload(inputContent);\r
+\r
+        ExecutionServiceOutput executionServiceOutput = executionService.process(executionServiceInput);\r
+        Assert.assertNotNull("failed to populate output",executionServiceOutput);\r
+\r
+    }\r
+}
\ No newline at end of file
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/payload/inputs/input.json b/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/payload/inputs/input.json
new file mode 100644 (file)
index 0000000..cd6fac1
--- /dev/null
@@ -0,0 +1,18 @@
+{\r
+       "api-ver": "2.00",\r
+       "originator-id": "MSO",\r
+       "request-id": "123456",\r
+       "service-instance-id": "ibcx0001vm001",\r
+       "service-type": "AVPN",\r
+       "vnf-type": "vUSP - vDBE-IPX HUB",\r
+       "vnf-id": 123456,\r
+       "service-template-name": "VRR-baseconfiguration",\r
+       "service-template-version": "1.0.0",\r
+       "action-name": "resource-assignment-action",\r
+       "group-name": "sample group name",\r
+       "bundle-id": "sample bundle id",\r
+       "bundle-mac": [\r
+               "Sample bundle mac",\r
+               "Sample bundle mac"\r
+       ]\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/payload/requests/sample-execution-request.json b/ms/blueprintsprocessor/modules/services/execution-service/src/test/resources/payload/requests/sample-execution-request.json
new file mode 100644 (file)
index 0000000..b28ac5a
--- /dev/null
@@ -0,0 +1,20 @@
+{\r
+  "actionIdentifiers": {\r
+    "actionName": "sample-action",\r
+    "blueprintName": "sample-blurprint",\r
+    "blueprintVersion": "1.0.0",\r
+    "mode": "sync"\r
+  },\r
+  "commonHeader": {\r
+    "flags": {\r
+      "force": true,\r
+      "ttl": 3600\r
+    },\r
+    "originatorId": "sdnc",\r
+    "requestId": "123456-1000",\r
+    "subRequestId": "sub-123456-1000",\r
+    "timestamp": "2012-04-23T18:25:43.511Z"\r
+  },\r
+  "payload": {\r
+  }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml
new file mode 100644 (file)
index 0000000..4ab8d00
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>modules</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>services</artifactId>
+    <name>Blueprints Processor Service POM</name>
+    <description>Blueprints Processor Service</description>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>db-service</module>
+        <module>resolution-service</module>
+        <module>execution-service</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>core</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml b/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml
new file mode 100644 (file)
index 0000000..581dd14
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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>
+        <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+        <artifactId>services</artifactId>
+        <version>0.0.3-SNAPSHOT</version>
+    </parent>
+    <artifactId>resolution-service</artifactId>
+    <packaging>jar</packaging>
+    <name>Blueprints Processor Resolution Service</name>
+    <description>Blueprints Processor Resolution Service</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+            <artifactId>db-service</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt b/ms/blueprintsprocessor/modules/services/resolution-service/src/main/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionService.kt
new file mode 100644 (file)
index 0000000..14ab784
--- /dev/null
@@ -0,0 +1,46 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution\r
+\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.Status\r
+import org.springframework.stereotype.Service\r
+\r
+/**\r
+ * ResourceResolutionService\r
+ * @author Brinda Santh\r
+ * 8/14/2018\r
+ */\r
+\r
+@Service\r
+class ResourceResolutionService {\r
+\r
+    fun resolveResource(resourceResolutionInput: ResourceResolutionInput): ResourceResolutionOutput {\r
+        val resourceResolutionOutput = ResourceResolutionOutput()\r
+        resourceResolutionOutput.actionIdentifiers = resourceResolutionInput.actionIdentifiers\r
+        resourceResolutionOutput.commonHeader = resourceResolutionInput.commonHeader\r
+        resourceResolutionOutput.resourceAssignments = resourceResolutionInput.resourceAssignments\r
+\r
+        val status = Status()\r
+        status.code = 200\r
+        status.message = "Success"\r
+        resourceResolutionOutput.status = status\r
+\r
+        return resourceResolutionOutput\r
+    }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/java/org/onap/ccsdk/apps/blueprintsprocessor/services/resolution/ResourceResolutionServiceTest.java
new file mode 100644 (file)
index 0000000..6335990
--- /dev/null
@@ -0,0 +1,80 @@
+/*\r
+ *  Copyright © 2017-2018 AT&T Intellectual Property.\r
+ *\r
+ *  Licensed under the Apache License, Version 2.0 (the "License");\r
+ *  you may not use this file except in compliance with the License.\r
+ *  You may obtain a copy of the License at\r
+ *\r
+ *      http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ *  Unless required by applicable law or agreed to in writing, software\r
+ *  distributed under the License is distributed on an "AS IS" BASIS,\r
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ *  See the License for the specific language governing permissions and\r
+ *  limitations under the License.\r
+ */\r
+\r
+package org.onap.ccsdk.apps.blueprintsprocessor.services.resolution;\r
+\r
+import com.fasterxml.jackson.databind.node.ObjectNode;\r
+import org.apache.commons.collections.CollectionUtils;\r
+import org.apache.commons.io.FileUtils;\r
+import org.junit.Assert;\r
+import org.junit.Test;\r
+import org.junit.runner.RunWith;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionInput;\r
+import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ResourceResolutionOutput;\r
+import org.onap.ccsdk.apps.controllerblueprints.core.utils.JacksonUtils;\r
+import org.onap.ccsdk.apps.controllerblueprints.resource.dict.ResourceAssignment;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.test.context.ContextConfiguration;\r
+import org.springframework.test.context.junit4.SpringRunner;\r
+\r
+import java.io.File;\r
+import java.nio.charset.Charset;\r
+import java.util.List;\r
+\r
+/**\r
+ * ResourceResolutionServiceTest\r
+ *\r
+ * @author Brinda Santh DATE : 8/15/2018\r
+ */\r
+@RunWith(SpringRunner.class)\r
+@ContextConfiguration(classes = ResourceResolutionService.class)\r
+public class ResourceResolutionServiceTest {\r
+    private static Logger log = LoggerFactory.getLogger(ResourceResolutionServiceTest.class);\r
+\r
+    @Autowired\r
+    private ResourceResolutionService resourceResolutionService;\r
+\r
+    @Test\r
+    public void testResolveResource() throws Exception {\r
+\r
+        Assert.assertNotNull("failed to create ResourceResolutionService", resourceResolutionService);\r
+\r
+        String resourceResolutionInputContent = FileUtils.readFileToString(\r
+                new File("src/test/resources/payload/requests/sample-resourceresolution-request.json"), Charset.defaultCharset());\r
+\r
+        ResourceResolutionInput resourceResolutionInput = JacksonUtils.readValue(resourceResolutionInputContent, ResourceResolutionInput.class );\r
+        Assert.assertNotNull("failed to populate resourceResolutionInput request ",resourceResolutionInput);\r
+\r
+        String resourceAssignmentContent = FileUtils.readFileToString(\r
+                new File("src/test/resources/mapping/db/resource-assignments-simple.json"), Charset.defaultCharset());\r
+        List<ResourceAssignment> batchResourceAssignment =\r
+                JacksonUtils.getListFromJson(resourceAssignmentContent, ResourceAssignment.class);\r
+\r
+        Assert.assertTrue("failed to create ResourceAssignment from file", CollectionUtils.isNotEmpty(batchResourceAssignment));\r
+        resourceResolutionInput.setResourceAssignments(batchResourceAssignment);\r
+\r
+        ObjectNode inputContent = (ObjectNode)JacksonUtils.jsonNodeFromFile("src/test/resources/payload/inputs/input.json");\r
+        Assert.assertNotNull("failed to populate input payload ",inputContent);\r
+        resourceResolutionInput.setPayload(inputContent);\r
+        log.info("ResourceResolutionInput : {}", JacksonUtils.getJson(resourceResolutionInput, true));\r
+\r
+        ResourceResolutionOutput resourceResolutionOutput = resourceResolutionService.resolveResource(resourceResolutionInput);\r
+        Assert.assertNotNull("failed to populate output",resourceResolutionOutput);\r
+\r
+    }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-array.json
new file mode 100644 (file)
index 0000000..679b92d
--- /dev/null
@@ -0,0 +1,35 @@
+{\r
+       "locations": {\r
+               "name": "locations",\r
+               "data-type": "list",\r
+               "entry-schema": "dt-location",\r
+               "source": {\r
+                       "db": {\r
+                               "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",\r
+                               "input-key-mapping": {\r
+                                       "profile_name": "profile_name"\r
+                               },\r
+                               "output-key-mapping": {\r
+                                       "db-country": "country",\r
+                                       "db-state": "state"\r
+                               }\r
+                       }\r
+               },\r
+               "candidate-dependency": {\r
+                       "db": {\r
+                               "names": [\r
+                                       "profile_name"\r
+                               ]\r
+                       }\r
+               }\r
+       },\r
+       "profile_name": {\r
+               "name": "profile_name",\r
+               "data-type": "string",\r
+               "source": {\r
+                       "input": {\r
+                               \r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-complex.json
new file mode 100644 (file)
index 0000000..32d04b6
--- /dev/null
@@ -0,0 +1,27 @@
+{\r
+       "location": {\r
+               "name": "location",\r
+               "data-type": "dt-location",\r
+               "source": {\r
+                       "db": {\r
+                               "query": "SELECT db-country, db-state FROM DEVICE_PROFILE WHERE profile_name = :profile_name",\r
+                               "input-key-mapping": {\r
+                                       "profile_name": "profile_name"\r
+                               },\r
+                               "output-key-mapping": {\r
+                                       "db-country": "country",\r
+                                       "db-state": "state"\r
+                               }\r
+                       }\r
+               }\r
+       },\r
+       "profile_name": {\r
+               "name": "profile_name",\r
+               "data-type": "string",\r
+               "source": {\r
+                       "input": {\r
+                               \r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/db-simple.json
new file mode 100644 (file)
index 0000000..841404f
--- /dev/null
@@ -0,0 +1,26 @@
+{\r
+       "country": {\r
+               "name": "country",\r
+               "data-type": "string",\r
+               "source": {\r
+                       "db": {\r
+                               "query": "SELECT country FROM DEVICE_PROFILE WHERE profile_name = :profile_name",\r
+                               "input-key-mapping": {\r
+                                       "profile_name": "profile_name"\r
+                               },\r
+                               "output-key-mapping": {\r
+                                       "country": "country"\r
+                               }\r
+                       }\r
+               }\r
+       },\r
+       "profile_name": {\r
+               "name": "profile_name",\r
+               "data-type": "string",\r
+               "source": {\r
+                       "input": {\r
+                               \r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/dt-location.json
new file mode 100644 (file)
index 0000000..52e0a79
--- /dev/null
@@ -0,0 +1,15 @@
+{\r
+       "version": "1.0.0",\r
+       "description": "test Data Type",\r
+       "properties": {\r
+               "country": {\r
+                       "required": true,\r
+                       "type": "string"\r
+               },\r
+               "state": {\r
+                       "required": false,\r
+                       "type": "string"\r
+               }\r
+       },\r
+       "derived_from": "tosca.datatypes.Root"\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/mapping/db/resource-assignments-simple.json
new file mode 100644 (file)
index 0000000..02ce68b
--- /dev/null
@@ -0,0 +1,12 @@
+[\r
+       {\r
+               "name": "country",\r
+               "input-param": true,\r
+               "property": {\r
+                       "type": "string"\r
+               },\r
+               "dictionary-name": "country",\r
+               "dictionary-source": "db",\r
+               "dependencies": []\r
+       }\r
+]\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/inputs/input.json
new file mode 100644 (file)
index 0000000..cd6fac1
--- /dev/null
@@ -0,0 +1,18 @@
+{\r
+       "api-ver": "2.00",\r
+       "originator-id": "MSO",\r
+       "request-id": "123456",\r
+       "service-instance-id": "ibcx0001vm001",\r
+       "service-type": "AVPN",\r
+       "vnf-type": "vUSP - vDBE-IPX HUB",\r
+       "vnf-id": 123456,\r
+       "service-template-name": "VRR-baseconfiguration",\r
+       "service-template-version": "1.0.0",\r
+       "action-name": "resource-assignment-action",\r
+       "group-name": "sample group name",\r
+       "bundle-id": "sample bundle id",\r
+       "bundle-mac": [\r
+               "Sample bundle mac",\r
+               "Sample bundle mac"\r
+       ]\r
+}\r
diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json b/ms/blueprintsprocessor/modules/services/resolution-service/src/test/resources/payload/requests/sample-resourceresolution-request.json
new file mode 100644 (file)
index 0000000..e8830a8
--- /dev/null
@@ -0,0 +1,22 @@
+{\r
+  "actionIdentifiers": {\r
+    "actionName": "sample-action",\r
+    "blueprintName": "sample-blurprint",\r
+    "blueprintVersion": "1.0.0",\r
+    "mode": "sync"\r
+  },\r
+  "commonHeader": {\r
+    "flags": {\r
+      "force": true,\r
+      "ttl": 3600\r
+    },\r
+    "originatorId": "sdnc",\r
+    "requestId": "123456-1000",\r
+    "subRequestId": "sub-123456-1000",\r
+    "timestamp": "2012-04-23T18:25:43.511Z"\r
+  },\r
+  "payload": {\r
+  },\r
+  "resourceAssignments": [\r
+  ]\r
+}\r
diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml
new file mode 100644 (file)
index 0000000..b6c8e0c
--- /dev/null
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<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">
+    <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+    <version>0.0.3-SNAPSHOT</version>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>parent</artifactId>
+    <packaging>pom</packaging>
+    <name>Blueprints Processor Parent</name>
+    <description>Blueprints Processor Parent</description>
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <java.version>1.8</java.version>
+        <controllerblueprints.version>0.3.0-SNAPSHOT</controllerblueprints.version>
+        <spring.boot.version>2.0.4.RELEASE</spring.boot.version>
+        <kotlin.version>1.2.60</kotlin.version>
+        <springfox.swagger2.version>2.9.2</springfox.swagger2.version>
+        <h2database.version>1.4.197</h2database.version>
+    </properties>
+    <dependencyManagement>
+        <dependencies>
+            <!-- Application Module Dependencies -->
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>db-lib</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>rest-lib</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>core</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>db-service</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>execution-service</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>resolution-service</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>resource-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId>
+                <artifactId>selfservice-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <!-- Application Component Dependency -->
+            <dependency>
+                <groupId>org.onap.ccsdk.apps</groupId>
+                <artifactId>controllerblueprints-resource-dict</artifactId>
+                <version>${controllerblueprints.version}</version>
+            </dependency>
+
+            <!--Swagger Dependencies -->
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-swagger2</artifactId>
+                <version>${springfox.swagger2.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>io.springfox</groupId>
+                <artifactId>springfox-swagger-ui</artifactId>
+                <version>${springfox.swagger2.version}</version>
+            </dependency>
+
+            <!-- Spring Boot -->
+
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-starter-parent</artifactId>
+                <version>${spring.boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-stdlib-jdk8</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-reflect</artifactId>
+                <version>${kotlin.version}</version>
+            </dependency>
+            <!-- Database -->
+            <dependency>
+                <groupId>com.h2database</groupId>
+                <artifactId>h2</artifactId>
+                <version>${h2database.version}</version>
+            </dependency>
+            <!-- Test Dependency -->
+            <dependency>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-test</artifactId>
+                <version>${kotlin.version}</version>
+                <scope>test</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.2.2</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.7</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-test</artifactId>
+            <version>${kotlin.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.projectreactor</groupId>
+            <artifactId>reactor-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib-jdk8</artifactId>
+            <version>${kotlin.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.jetbrains.kotlin</groupId>
+                <artifactId>kotlin-maven-plugin</artifactId>
+                <version>${kotlin.version}</version>
+                <executions>
+                    <execution>
+                        <id>compile</id>
+                          <goals>
+                            <goal>compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
+                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>test-compile</id>
+                        <goals>
+                            <goal>test-compile</goal>
+                        </goals>
+                        <configuration>
+                            <sourceDirs>
+                                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
+                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
+                            </sourceDirs>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.5.1</version>
+                <configuration>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml
new file mode 100644 (file)
index 0000000..6c980be
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+
+<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>
+               <groupId>org.onap.ccsdk.apps</groupId>
+               <artifactId>ccsdk-apps</artifactId>
+               <version>0.3.0-SNAPSHOT</version>
+       </parent>
+       <artifactId>blueprintsprocessor</artifactId>
+       <packaging>pom</packaging>
+       <name>Blueprints Processor POM</name>
+       <description>Blueprints Processor POM</description>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <maven.compiler.target>1.8</maven.compiler.target>
+               <maven.compiler.source>1.8</maven.compiler.source>
+               <kotlin.version>1.2.60</kotlin.version>
+       </properties>
+
+       <modules>
+               <module>parent</module>
+               <module>modules</module>
+               <module>application</module>
+       </modules>
+
+</project>