+++ /dev/null
-#!/bin/bash
-
-###
-# ============LICENSE_START=======================================================
-# ONAP : SDNC
-# ================================================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights
-# reserved.
-# ================================================================================
-# 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.
-# ============LICENSE_END=========================================================
-###
-
-export SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
-export GRA_JAR=${GRA_JAR:-@sdnc.gra.jar@}
-export SVCLOGIC_DIR=${SVCLOGIC_DIR:-opt/onap/sdnc/svclogic/graphs}
-export LOG_PATH=${LOG_PATH:-/var/log/onap/sdnc}
-export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/onap/sdnc/config}
-export SDNC_CERT_DIR=${SDNC_CERT_DIR:-${SDNC_CONFIG_DIR}}
-export TRUSTSTORE=${TRUSTSTORE:-truststoreONAPall.jks}
-export JAVA_SECURITY_DIR=${JAVA_SECURITY_DIR:-/etc/ssl/certs/java}
-export CACERT_PASSWORD=${CACERT_PASSWORD:-${TRUSTSTORE_PASSWORD}}
-export MYSQL_DB_HOST=${MYSQL_DB_HOST:-dbhost}
-export SVCLOGIC_PROPERTIES=${SVCLOGIC_PROPERTIES:-${SDNC_CONFIG_DIR}/svclogic.properties}
-
-#
-# Wait for database
-#
-echo "Waiting for database"
-until mysqladmin ping -h ${MYSQL_DB_HOST} --silent; do
- printf "."
- sleep 1
-done
-echo -e "\nDatabase ready"
-
-# Create tablespace and user account
-
-#mysql -h ${MYSQL_DB_HOST} -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END
-#CREATE DATABASE ${MYSQL_DB_DATABASE};
-#CREATE USER '${MYSQL_DB_USER}'@'localhost' IDENTIFIED BY '${MYSQL_DB_PASSWD}';
-#CREATE USER '${MYSQL_DB_USER}'@'%' IDENTIFIED BY '${MYSQL_DB_PASSWD}';
-#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'localhost' WITH GRANT OPTION;
-#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'%' WITH GRANT OPTION;
-#commit;
-#END
-
-# Initialize schema
-if [ -f ${SDNC_CONFIG_DIR}/schema-mysql.sql ]
-then
- mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < ${SDNC_CONFIG_DIR}/schema-mysql.sql
-fi
-
-# Load data
-if [ -f ${SDNC_CONFIG_DIR}/data-mysql.sql ]
-then
- mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} < ${SDNC_CONFIG_DIR}/data-mysql.sql
-fi
-
-if [ ! -f ${SDNC_CERT_DIR}/${TRUSTSTORE} ]; then
- echo "${SDNC_CERT_DIR}/${TRUSTSTORE} not found ... skipping ONAP CA cert installation"
-elif [ -z "$TRUSTSTORE_PASSWORD" ]; then
- echo "TRUSTSTORE_PASSWORD unset - cannot install ONAP CA certs"
-else
- sudo keytool -importkeystore -srckeystore ${SDNC_CERT_DIR}/${TRUSTSTORE} -srcstorepass ${TRUSTSTORE_PASSWORD} -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass ${CACERT_PASSWORD}
- echo -e "\nCerts ready"
-fi
-
-cd $SDNC_HOME
-java -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -jar ${SDNC_HOME}/lib/${GRA_JAR}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<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.sdnc.apps</groupId>
+ <artifactId>gra</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.onap.sdnc.apps</groupId>
+ <artifactId>gra-app</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>sdnc-apps :: ms :: gra :: ${project.artifactId}</name>
+ <description>Generic Resource API application</description>
+ <url>http://wiki.onap.org</url>
+
+ <properties>
+ <start-class>org.onap.sdnc.apps.ms.gra.GenericResourceMsApp</start-class>
+ <liquibase.properties>${project.basedir}/src/main/resources/liquibase.properties</liquibase.properties>
+ <maven.compiler.source>1.11</maven.compiler.source>
+ <maven.compiler.target>1.11</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-log4j2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.dataformat</groupId>
+ <artifactId>jackson-dataformat-xml</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.aaf.authz</groupId>
+ <artifactId>aaf-auth-client</artifactId>
+ <version>${aaf.cadi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.aaf.authz</groupId>
+ <artifactId>aaf-misc-env</artifactId>
+ <version>${aaf.cadi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.aaf.authz</groupId>
+ <artifactId>aaf-misc-rosetta</artifactId>
+ <version>${aaf.cadi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-validation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger2</artifactId>
+ <version>2.9.2</version>
+ </dependency>
+ <dependency>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger-ui</artifactId>
+ <version>2.9.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.apps</groupId>
+ <artifactId>services</artifactId>
+ <version>${ccsdk.apps.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.apps</groupId>
+ <artifactId>sliboot</artifactId>
+ <version>${ccsdk.apps.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${ccsdk.sli.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sli-provider-base</artifactId>
+ <version>${ccsdk.sli.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.logging-analytics</groupId>
+ <artifactId>logging-filter-spring</artifactId>
+ <version>1.6.6</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
+ <artifactId>sliPluginUtils-provider</artifactId>
+ <version>${ccsdk.sli.core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+ <artifactId>mdsal-resource-provider</artifactId>
+ <version>${ccsdk.sli.adaptors.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.adaptors.messagerouter</groupId>
+ <artifactId>publisher.provider</artifactId>
+ <version>${ccsdk.sli.adaptors.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+ <artifactId>netbox-client-provider</artifactId>
+ <version>${ccsdk.sli.adaptors.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+ <artifactId>sql-resource-provider</artifactId>
+ <version>${ccsdk.sli.adaptors.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>restapi-call-node-provider</artifactId>
+ <version>${ccsdk.sli.plugins.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.sli.plugins</groupId>
+ <artifactId>properties-node-provider</artifactId>
+ <version>${ccsdk.sli.plugins.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ <version>4.3.0</version>
+ </dependency>
+
+ <!-- this jersey jar is needed for rest api call node to function properly -->
+ <dependency>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!-- Necessary to run tests with coverage in IntelliJ -->
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-launcher</artifactId>
+ <version>1.6.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.10</version>
+
+ <executions>
+ <execution>
+ <id>get-gra-yaml</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.onap.sdnc.northbound</groupId>
+ <artifactId>generic-resource-api-model-swagger</artifactId>
+ <version>${sdnc.northbound.version}</version>
+ <type>yaml</type>
+ <outputDirectory>${project.build.directory}/yaml</outputDirectory>
+ <destFileName>generic-resource.yaml</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <!-- DGs are needed for unit tests as well -->
+ <execution>
+ <id>unpack dgs</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.onap.sdnc.oam</groupId>
+ <artifactId>platform-logic-installer</artifactId>
+ <version>${sdnc.oam.version}</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <version>2.3.1</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <output>target/generated-sources</output>
+ <inputSpec>${project.build.directory}/yaml/generic-resource.yaml</inputSpec>
+ <language>spring</language>
+ <apiPackage>org.onap.sdnc.apps.ms.gra.swagger</apiPackage>
+ <modelPackage>org.onap.sdnc.apps.ms.gra.swagger.model</modelPackage>
+ <invokerPackage>org.onap.sdnc.apps.ms.gra.swagger</invokerPackage>
+ <generateApis>true</generateApis>
+ <generateApiTests>true</generateApiTests>
+ <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
+ <withXml>true</withXml>
+ <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
+ <configOptions>
+ <java8>true</java8>
+ <springBootVersion>2.2.4-RELEASE</springBootVersion>
+ </configOptions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>addSource</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.basedir}/target/generated-sources/src/main/java</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19.1</version>
+ <configuration>
+ <environmentVariables>
+ <SDNC_CONFIG_DIR>${basedir}/src/test/resources</SDNC_CONFIG_DIR>
+ <SVCLOGIC_PROPERTIES>${basedir}/src/test/resources/svclogic.properties</SVCLOGIC_PROPERTIES>
+ <MYSQL_DATABASE>${gratest.mysql.database}</MYSQL_DATABASE>
+ <MYSQL_USER>${gratest.mysql.user}</MYSQL_USER>
+ <MYSQL_PASSWORD>${gratest.mysql.password}</MYSQL_PASSWORD>
+ </environmentVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <skipITs>true</skipITs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
import org.onap.ccsdk.apps.filters.ContentTypeFilter;\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;\r
import org.springframework.boot.web.servlet.FilterRegistrationBean;\r
import org.springframework.context.annotation.Bean;\r
import org.springframework.context.annotation.Configuration;\r
import org.springframework.core.annotation.Order;\r
\r
@Configuration\r
+@ConditionalOnProperty("cadi_prop_files")\r
public class FilterConfiguration {\r
\r
private static final Logger log = LoggerFactory.getLogger(FilterConfiguration.class);\r
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.database=derby
serviceLogicProperties=src/test/resources/svclogic.properties
-serviceLogicDirectory=target/docker-stage/opt/onap/sdnc/svclogic/graphs/generic-resource-api
+serviceLogicDirectory=target/svclogic/graphs/generic-resource-api
<parent>
<groupId>org.onap.sdnc.apps</groupId>
- <artifactId>sdnc-apps-ms</artifactId>
+ <artifactId>gra</artifactId>
<version>2.1.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.sdnc.apps</groupId>
- <artifactId>generic-resource-api</artifactId>
+ <artifactId>gra-docker</artifactId>
<version>2.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>sdnc-apps :: ms :: ${project.artifactId}</name>
- <description>POM to be used for yang2swagger generation of client in SDNC project</description>
+ <name>sdnc-apps :: ms :: gra :: ${project.artifactId}</name>
+ <description>Generic Resource API docker creation</description>
<url>http://wiki.onap.org</url>
<properties>
- <start-class>org.onap.sdnc.apps.ms.gra.GenericResourceMsApp</start-class>
- <aaf.cadi.version>2.1.21</aaf.cadi.version>
- <ccsdk.apps.version>1.2.0-SNAPSHOT</ccsdk.apps.version>
- <ccsdk.docker.version>1.1-STAGING-latest</ccsdk.docker.version>
- <sdnc.northbound.version>2.2.0-SNAPSHOT</sdnc.northbound.version>
- <sdnc.oam.version>2.2.0-SNAPSHOT</sdnc.oam.version>
-
<base.image.name>onap/ccsdk-alpine-j11-image</base.image.name>
<image.name>onap/sdnc-gra-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
<ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
- <sdnc.gra.jar>${project.artifactId}-${project.version}.jar</sdnc.gra.jar>
+ <sdnc.gra.jar>gra-app-${project.version}.jar</sdnc.gra.jar>
+ <onap.truststore>truststoreONAPall.jks</onap.truststore>
<docker.push.phase>deploy</docker.push.phase>
- <docker.verbose>true</docker.verbose>
- <gratest.mysql.database>testdb</gratest.mysql.database>
- <gratest.mysql.root.password>itsASecret</gratest.mysql.root.password>
- <gratest.mysql.user>testdb</gratest.mysql.user>
- <gratest.mysql.password>test123</gratest.mysql.password>
<docker.autoCreateCustomNetworks>true</docker.autoCreateCustomNetworks>
- <liquibase.properties>${project.basedir}/src/main/resources/liquibase.properties</liquibase.properties>
-
- <maven.compiler.source>1.11</maven.compiler.source>
- <maven.compiler.target>1.11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-log4j2</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.dataformat</groupId>
- <artifactId>jackson-dataformat-xml</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-auth-client</artifactId>
- <version>${aaf.cadi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-misc-env</artifactId>
- <version>${aaf.cadi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-misc-rosetta</artifactId>
- <version>${aaf.cadi.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-validation</artifactId>
- </dependency>
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger2</artifactId>
- <version>2.9.2</version>
- </dependency>
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger-ui</artifactId>
- <version>2.9.2</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>services</artifactId>
- <version>${ccsdk.apps.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>sliboot</artifactId>
- <version>${ccsdk.apps.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-common</artifactId>
- <version>${ccsdk.sli.core.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sli-provider-base</artifactId>
- <version>${ccsdk.sli.core.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.logging-analytics</groupId>
- <artifactId>logging-filter-spring</artifactId>
- <version>1.6.6</version>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.core</groupId>
- <artifactId>sliPluginUtils-provider</artifactId>
- <version>${ccsdk.sli.core.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.adaptors</groupId>
- <artifactId>mdsal-resource-provider</artifactId>
- <version>${ccsdk.sli.adaptors.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.adaptors.messagerouter</groupId>
- <artifactId>publisher.provider</artifactId>
- <version>${ccsdk.sli.adaptors.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.adaptors</groupId>
- <artifactId>netbox-client-provider</artifactId>
- <version>${ccsdk.sli.adaptors.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.adaptors</groupId>
- <artifactId>sql-resource-provider</artifactId>
- <version>${ccsdk.sli.adaptors.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>restapi-call-node-provider</artifactId>
- <version>${ccsdk.sli.plugins.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.ccsdk.sli.plugins</groupId>
- <artifactId>properties-node-provider</artifactId>
- <version>${ccsdk.sli.plugins.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-core</artifactId>
- <version>4.3.0</version>
- </dependency>
-
- <!-- this jersey jar is needed for rest api call node to function properly -->
- <dependency>
- <groupId>org.glassfish.jersey.inject</groupId>
- <artifactId>jersey-hk2</artifactId>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <scope>test</scope>
- </dependency>
- <!-- Necessary to run tests with coverage in IntelliJ -->
- <dependency>
- <groupId>org.junit.platform</groupId>
- <artifactId>junit-platform-launcher</artifactId>
- <version>1.6.2</version>
- <scope>test</scope>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>gra-app</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.groovy.maven</groupId>
- <artifactId>gmaven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- <configuration>
- <source>${basedir}/../../TagVersion.groovy</source>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
-
- <executions>
- <execution>
- <id>get-gra-yaml</id>
- <phase>initialize</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.sdnc.northbound</groupId>
- <artifactId>generic-resource-api-model-swagger</artifactId>
- <version>${sdnc.northbound.version}</version>
- <type>yaml</type>
- <outputDirectory>${project.build.directory}/yaml</outputDirectory>
- <destFileName>generic-resource.yaml</destFileName>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- <!-- DGs are needed for unit tests as well -->
- <execution>
- <id>unpack dgs</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
- <artifactItems>
- <artifactItem>
- <groupId>org.onap.sdnc.oam</groupId>
- <artifactId>platform-logic-installer</artifactId>
- <version>${sdnc.oam.version}</version>
- <type>zip</type>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>2.3.1</version>
- <executions>
- <execution>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <output>target/generated-sources</output>
- <inputSpec>${project.build.directory}/yaml/generic-resource.yaml</inputSpec>
- <language>spring</language>
- <apiPackage>org.onap.sdnc.apps.ms.gra.swagger</apiPackage>
- <modelPackage>org.onap.sdnc.apps.ms.gra.swagger.model</modelPackage>
- <invokerPackage>org.onap.sdnc.apps.ms.gra.swagger</invokerPackage>
- <generateApis>true</generateApis>
- <generateApiTests>true</generateApiTests>
- <ignoreFileOverride>${project.basedir}/.swagger-codegen-ignore</ignoreFileOverride>
- <withXml>true</withXml>
- <templateDirectory>${project.basedir}/src/main/templates</templateDirectory>
- <configOptions>
- <java8>true</java8>
- <springBootVersion>2.2.4-RELEASE</springBootVersion>
- </configOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>addSource</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.basedir}/target/generated-sources/src/main/java</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.19.1</version>
- <configuration>
- <environmentVariables>
- <SDNC_CONFIG_DIR>${basedir}/src/test/resources</SDNC_CONFIG_DIR>
- <SVCLOGIC_PROPERTIES>${basedir}/src/test/resources/svclogic.properties</SVCLOGIC_PROPERTIES>
- <MYSQL_DATABASE>${gratest.mysql.database}</MYSQL_DATABASE>
- <MYSQL_USER>${gratest.mysql.user}</MYSQL_USER>
- <MYSQL_PASSWORD>${gratest.mysql.password}</MYSQL_PASSWORD>
- </environmentVariables>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <skipITs>true</skipITs>
- </configuration>
- </plugin>
- </plugins>
- </build>
<profiles>
<profile>
<id>docker</id>
<build>
<plugins>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>${basedir}/../../../TagVersion.groovy</source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<copyPom>false</copyPom>
</configuration>
</execution>
+ <execution>
+ <id>unpack dgs</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc</outputDirectory>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.onap.sdnc.oam</groupId>
+ <artifactId>platform-logic-installer</artifactId>
+ <version>${sdnc.oam.version}</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
</executions>
</plugin>
+
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</configuration>
</execution>
<execution>
- <id>copy-script</id>
+ <id>copy-jks</id>
<goals>
<goal>copy-resources</goal>
</goals> <!-- here the phase you need -->
<phase>generate-resources</phase>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
+ <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/config</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
- <include>*.sh</include>
+ <include>*.jks</include>
</includes>
- <filtering>true</filtering>
+ <filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
- <id>copy-jar</id>
+ <id>copy-script</id>
<goals>
<goal>copy-resources</goal>
</goals> <!-- here the phase you need -->
- <phase>package</phase>
+ <phase>generate-resources</phase>
<configuration>
- <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/lib</outputDirectory>
+ <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/bin</outputDirectory>
<resources>
<resource>
- <directory>${basedir}/target</directory>
+ <directory>src/main/resources</directory>
<includes>
- <include>${sdnc.gra.jar}</include>
+ <include>*.sh</include>
</includes>
- <filtering>false</filtering>
+ <filtering>true</filtering>
</resource>
</resources>
</configuration>
FROM @base.image.name@:@ccsdk.docker.version@ AS stage0
ENV LOG_PATH /var/log/onap/sdnc
+ENV SDNC_CONFIG_DIR /opt/onap/sdnc/config
+ENV TRUSTSTORE @onap.truststore@
+ENV JAVA_SECURITY_DIR /opt/java/openjdk/lib/security
USER root
# copy deliverables to opt
COPY opt /opt
+# Install ONAP certificates
+RUN keytool -importkeystore -srckeystore ${SDNC_CONFIG_DIR}/${TRUSTSTORE} -srcstorepass changeit -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass changeit -noprompt
+
## END OF STAGE0 ##
# Install sudo and IP utilities
RUN apk update && apk --no-cache add sudo iputils openssl
-
# Enable wheel group
RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers
--- /dev/null
+
+springfox.documentation.swagger.v2.path=/api-docs
+server.servlet.context-path=/restconf
+server.port=8080
+spring.jackson.date-format=org.onap.sdnc.apps.ms.gra.swagger.RFC3339DateFormat
+spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
+logging.level.com.att=${LOG_LEVEL}
+logging.level.org.onap=${LOG_LEVEL}
+spring.datasource.url=jdbc:mariadb://${MYSQL_DB_HOST}:3306/${MYSQL_DATABASE}
+spring.datasource.hikari.data-source-properties.useUnicode=true
+spring.datasource.hikari.data-source-properties.characterEncoding=UTF-8
+spring.datasource.username=${MYSQL_USER}
+spring.datasource.password=${MYSQL_PASSWORD}
+spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
+spring.datasource.platform=mysql
+spring.datasource.testWhileIdle=true
+spring.datasource.validationQuery=SELECT 1
+spring.jpa.show-sql=true
+spring.jpa.properties.hibernate.default_schema=${MYSQL_DATABASE}
+spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
+# spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
+spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+
+spring.jpa.database=mysql
--- /dev/null
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+###
+
+# dblib.properrties
+org.onap.ccsdk.sli.dbtype=jdbc
+
+org.onap.ccsdk.sli.jdbc.hosts=dbhost
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://${MYSQL_DB_HOST}:3306/${MYSQL_DATABASE}
+org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver
+org.onap.ccsdk.sli.jdbc.database=${MYSQL_DATABASE}
+org.onap.ccsdk.sli.jdbc.user=${MYSQL_USER}
+org.onap.ccsdk.sli.jdbc.password=${MYSQL_PASSWORD}
+org.onap.ccsdk.sli.jdbc.connection.name=dbhost
+org.onap.ccsdk.sli.jdbc.connection.timeout=50
+org.onap.ccsdk.sli.jdbc.request.timeout=100
+org.onap.ccsdk.sli.jdbc.limit.init=10
+org.onap.ccsdk.sli.jdbc.limit.min=10
+org.onap.ccsdk.sli.jdbc.limit.max=20
+org.onap.dblib.connection.recovery=false
+
--- /dev/null
+restapi.templateDir=/opt/onap/sdnc/restapi/templates
+controller.url=http://localhost:8080
+controller.user=${ODL_USER}
+controller.pwd=${ODL_PASSWORD}
+honeycomb.url=http://{honeycomb-instance-ip}:8183
+honeycomb.user=${HONEYCOMB_USER}
+honeycomb.pwd=${HONEYCOMB_PASSWORD}
+restapi.trustStoreFileName=/opt/onap/sdnc/config/truststoreONAPall.jks
+restapi.trustStorePassword=${TRUSTSTORE_PASSWORD}
+restapi.keyStoreFileName=/opt/onap/sdnc/config/org.onap.sdnc.p12
+restapi.keyStorePassword=${KEYSTORE_PASSWORD}
+restapi.connection-oof-url=http://oof-osdf:8698/api/oof/v1/route
+naming.gen-name.url=http://neng-serv:8080
+naming.gen-name.user=ccsdkapps
+naming.gen-name.pwd=ccsdkapps
+so.user=${SO_USER}
+so.pwd=${SO_PASSWORD}
+cds.url=http://cds-blueprints-processor-http:8080
+cds.user=${CDS_USER}
+cds.pwd=${CDS_PASSWORD}
+
+# Templates
+restapi.sz.templatefile=security-zone-allotted-resource.json
+restapi.cr.templatefile=contrail-route-allotted-resource.json
+restapi.brg.templatefile=brg-allotted-resource.json
+restapi.vpp.vxlan-tunnel.templatefile=vcpe-vxlan-tunnel.json
+restapi.vpp.bridge-domain.templatefile=vcpe-vpp-bridge-domain.json
+restapi.vpp.xconnect.templatefile=vcpe-l2-interface.json
+restapi.tx.templatefile=tunnelxconn-allotted-resource.json
+restapi.parentsvc.templatefile=parent-provided-allotted-resource.json
+restapi.network-ar.templatefile=network-provided-allotted-resources.json
+restapi.vnf-ar.templatefile=vnf-provided-allotted-resources.json
+restapi.services.templatefile=vcpe-services-service.json
+restapi.services.vnf.vfmodule.templatefile=vfmodule-vim-parameters.vgw.json
+restapi.sotn-attachment.templatefile=sotn-attachment-allotted-resource.json
+restapi.sdwan-attachment.templatefile=sdwan-attachment-allotted-resource.json
+restapi.oof-getpath.templatefile=oof-getpath.json
+restapi.naming.gen-name.templatefile=naming-ms-post-gen-name.json
+restapi.ss.pnf.templatefile=self-serve-pnf-assignments.json
+restapi.ss.vnf.templatefile=self-serve-vnf-assignments.json
+restapi.ss.vfmodule.templatefile=self-serve-vfmodule-assignments.json
+restapi.ss.mS.vlan.tag.assign.templatefile=self-serve-mS-vlan-tag-assignments.json
+restapi.ss.mS.vlan.tag.unassign.templatefile=self-serve-mS-vlan-tag-unassignments.json
+restapi.ss.mS.mac.address.assign.templatefile=self-serve-mS-mac-address-assign.json
+restapi.ss.mS.mac.address.unassign.templatefile=self-serve-mS-mac-address-unassign.json
+
+# Default cloud owner
+cloud-region.cloud-owner=CloudOwner
+
+# URLs
+restapi.cr-allottedresource=/restconf/config/GENERIC-RESOURCE-API:contrail-route-allotted-resources/contrail-route-allotted-resource/{allotted-resource-id}/
+restapi.sz-allottedresource=/restconf/config/GENERIC-RESOURCE-API:security-zone-allotted-resources/security-zone-allotted-resource/{allotted-resource-id}/
+restapi.brg-allottedresource=/restconf/config/GENERIC-RESOURCE-API:brg-allotted-resources/brg-allotted-resource/{allotted-resource-id}/
+restapi.vpp-honeycomb=/restconf/config/ietf-interfaces:interfaces/interface/{tunnel-name}/
+restapi.tx-allottedresource=/restconf/config/GENERIC-RESOURCE-API:tunnelxconn-allotted-resources/tunnelxconn-allotted-resource/{allotted-resource-id}/
+restapi.vnf-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/
+restapi.network-provided-allottedresource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vnf-provided-allotted-resources/
+restapi.pm-configuration=/restconf/config/GENERIC-RESOURCE-API:port-mirror-configurations/port-mirror-configuration/{configuration-id}/
+restapi.network=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/
+restapi.vnf=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/
+restapi.vnf-api.service-information=/restconf/config/VNF-API:vnfs/vnf-list/{vnf-id}/service-data/
+restapi.parent-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/provided-allotted-resources/provided-allotted-resource/{allotted-resource-id}/
+restapi.network-provided-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/networks/network/{network-id}/network-data/network-provided-allotted-resources/
+restapi.services=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/
+restapi.service.vnf.vfmodule-resource=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+restapi.connection-attachment-allottedresource=/restconf/config/GENERIC-RESOURCE-API:connection-attachment-allotted-resources/connection-attachment-allotted-resource/{allotted-resource-id}/
+restapi.naming.gen-name.service=/web/service/v1/genNetworkElementName
+restapi.ss-pnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/pnfs/pnf/{pnf-id}/
+restapi.ss-vnf-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
+restapi.ss-vfmodule-assignments=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+restapi.ss-mS-vlan-tag-assign=/vlantagapi/v1/{action}
+restapi.ss-mS-mac-address-assign=/api/macaddress/v1/service/assign/
+restapi.ss-mS-mac-address-unassign=/api/macaddress/v1/service/unassign/
+restapi.preload-network=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/{network-name}/network/preload-data/preload-network-topology-information/
+restapi.preloadinformation=/restconf/config/GENERIC-RESOURCE-API:preload-information/preload-list/
+restapi.vf-module=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/vnf-data/vf-modules/vf-module/{vf-module-id}/
+restapi.vnf-assign=/restconf/config/GENERIC-RESOURCE-API:services/service/{service-instance-id}/service-data/vnfs/vnf/{vnf-id}/
--- /dev/null
+ #-
+ # ============LICENSE_START=======================================================
+ # ONAP - CCSDK
+ # ================================================================================
+ # Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ # ================================================================================
+ # 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.
+ # ============LICENSE_END=========================================================
+ #
+
+property.logDir = ${env:LOG_PATH:-./target}
+property.logLevel = ${env:LOG_LEVEL:-INFO}
+
+property.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{currentGraph} - %X{nodeId} | %m%n
+
+#default mdc values
+property.ServiceName = INTERNAL
+property.ErrorCode = 900
+property.ErrorDesc = UnknownError
+
+rootLogger.level = ${logLevel}
+rootLogger.appenderRef.AppFile.ref = AppFile
+rootLogger.appenderRef.Console.ref = Console
+rootLogger.appenderRef.DebugFile.ref = DebugFile
+rootLogger.appenderRef.ErrorFile.ref = ErrorFile
+rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter
+rootLogger.appenderRef.Console.filter.threshold.level = ${logLevel}
+
+appender.console.type = Console
+appender.console.name = Console
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = ${pattern}
+
+appender.app.type = RollingRandomAccessFile
+appender.app.name = AppFile
+appender.app.fileName = ${logDir}/app.log
+appender.app.filePattern = ${logDir}/app.log.%i
+appender.app.immediateFlush = true
+appender.app.append = true
+appender.app.layout.type = PatternLayout
+appender.app.layout.pattern = ${pattern}
+appender.app.policies.type = Policies
+appender.app.policies.size.type = SizeBasedTriggeringPolicy
+appender.app.policies.size.size = 10MB
+appender.app.strategy.type = DefaultRolloverStrategy
+appender.app.strategy.max = 100
+appender.app.strategy.fileIndex = min
+
+appender.debug.type = RollingRandomAccessFile
+appender.debug.name = DebugFile
+appender.debug.fileName = ${logDir}/debug.log
+appender.debug.filePattern = ${logDir}/debug.log.%i
+appender.debug.immediateFlush = true
+appender.debug.append = true
+appender.debug.layout.type = PatternLayout
+appender.debug.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|%-5.5p|%-32.32c{1}|%X{currentGraph} - %X{nodeId}|%m%n
+appender.debug.policies.type = Policies
+appender.debug.policies.size.type = SizeBasedTriggeringPolicy
+appender.debug.policies.size.size = 10MB
+appender.debug.strategy.type = DefaultRolloverStrategy
+appender.debug.strategy.max = 200
+appender.debug.strategy.fileIndex = min
+appender.error.filter.threshold.type = ThresholdFilter
+appender.error.filter.threshold.level = DEBUG
+
+appender.error.type = RollingRandomAccessFile
+appender.error.name = ErrorFile
+appender.error.fileName = ${logDir}/error.log
+appender.error.filePattern = ${logDir}/error.log.%i
+appender.error.immediateFlush = true
+appender.error.append = true
+appender.error.layout.type = PatternLayout
+appender.error.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%-16.16t|$${ctx:ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%p|$${ctx:ErrorCode}|$${ctx:ErrorDesc}|%m%n
+
+appender.error.policies.type = Policies
+appender.error.policies.size.type = SizeBasedTriggeringPolicy
+appender.error.policies.size.size = 10MB
+appender.error.strategy.type = DefaultRolloverStrategy
+appender.error.strategy.max = 100
+appender.error.strategy.fileIndex = min
+appender.error.filter.threshold.type = ThresholdFilter
+appender.error.filter.threshold.level = WARN
+
+appender.metric.type = RollingRandomAccessFile
+appender.metric.name = MetricFile
+appender.metric.fileName = ${logDir}/metric.log
+appender.metric.filePattern = ${logDir}/metric.log.%i
+appender.metric.immediateFlush = true
+appender.metric.append = true
+appender.metric.layout.type = PatternLayout
+appender.metric.layout.pattern=%X{InvokeTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|%p|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|||%X{TargetElement}|%markerSimpleName|%X|%X{currentGraph} - %X{nodeId}||%m%n
+appender.metric.policies.type = Policies
+appender.metric.policies.size.type = SizeBasedTriggeringPolicy
+appender.metric.policies.size.size = 10MB
+appender.metric.strategy.type = DefaultRolloverStrategy
+appender.metric.strategy.max = 100
+appender.metric.strategy.fileIndex = min
+
+appender.audit.type = RollingRandomAccessFile
+appender.audit.name = AuditFile
+appender.audit.fileName = ${logDir}/audit.log
+appender.audit.filePattern = ${logDir}/audit.log.%i
+appender.audit.immediateFlush = true
+appender.audit.append = true
+appender.audit.layout.type = PatternLayout
+appender.audit.layout.pattern=%X{EntryTimestamp}|%X{LogTimestamp}|%X{RequestID}|%X{ServiceInstanceID}|%-16.16t|%X{ServerFQDN}|%X{ServiceName}|%X{PartnerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDesc}|%X{InstanceID}|INFO|%X{Severity}|192.168.23.111|%X{ElapsedTime}|${hostName}|%X{ClientIPAddress}|%C{1}|%X{AUDIT-Unused}|%X{AUDIT-ProcessKey}|%markerSimpleName|%X|||%m%n
+appender.audit.policies.type = Policies
+appender.audit.policies.size.type = SizeBasedTriggeringPolicy
+appender.audit.policies.size.size = 10MB
+appender.audit.strategy.type = DefaultRolloverStrategy
+appender.audit.strategy.max = 200
+appender.audit.strategy.fileIndex = min
+
+appender.rr.name = RequestResponseFile
+appender.rr.type = RollingRandomAccessFile
+appender.rr.fileName = ${logDir}/request-response.log
+appender.rr.filePattern = ${logDir}/request-response.log.%i
+appender.rr.immediateFlush = true
+appender.rr.append = true
+appender.rr.layout.type = PatternLayout
+appender.rr.layout.pattern = %d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%X{PartnerName}|%m%n
+appender.rr.policies.type = Policies
+appender.rr.policies.size.type = SizeBasedTriggeringPolicy
+appender.rr.policies.size.size = 10MB
+appender.rr.strategy.type = DefaultRolloverStrategy
+appender.rr.strategy.max = 100
+appender.rr.strategy.fileIndex = min
+
+logger.metric.name = org.onap.ccsdk.sli.core.filters.metric
+logger.metric.level = INFO
+logger.metric.additivity = false
+logger.metric.appenderRef.MetricFile.ref = MetricFile
+
+logger.metric2.name = org.onap.logging.filter.base.AbstractMetricLogFilter
+logger.metric2.level = INFO
+logger.metric2.additivity = false
+logger.metric2.appenderRef.MetricFile.ref = MetricFile
+
+logger.audit.name = org.onap.logging.filter.base.AbstractAuditLogFilter
+logger.audit.level = INFO
+logger.audit.additivity = false
+logger.audit.appenderRef.AuditFile.ref = AuditFile
+
+logger.rr.name = org.onap.logging.filter.base.PayloadLoggingServletFilter
+logger.rr.level = INFO
+logger.rr.additivity = false
+logger.rr.appenderRef.RequestResponseFile.ref = RequestResponseFile
+
+logger.ccsdk.name = org.onap.ccsdk
+logger.ccsdk.level = DEBUG
+
+logger.onaplogging.name = org.onap.logging
+logger.onaplogging.level = DEBUG
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ONAP : SDNC
+# ================================================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+###
+
+export SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc}
+export GRA_JAR=${GRA_JAR:-@sdnc.gra.jar@}
+export SVCLOGIC_DIR=${SVCLOGIC_DIR:-opt/onap/sdnc/svclogic/graphs}
+export LOG_PATH=${LOG_PATH:-/var/log/onap/sdnc}
+export SDNC_CONFIG_DIR=${SDNC_CONFIG_DIR:-/opt/onap/sdnc/config}
+export MYSQL_DB_HOST=${MYSQL_DB_HOST:-dbhost}
+export SVCLOGIC_PROPERTIES=${SVCLOGIC_PROPERTIES:-${SDNC_CONFIG_DIR}/svclogic.properties}
+
+cd $SDNC_HOME
+
+ echo "Waiting for mysql"
+ until mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_USER} -p${MYSQL_PASSWORD} ${MYSQL_DATABASE} &> /dev/null
+ do
+ printf "."
+ sleep 1
+ done
+ echo -e "\nmysql ready"
+
+java -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -jar ${SDNC_HOME}/lib/${GRA_JAR}
--- /dev/null
+###
+# ============LICENSE_START=======================================================
+# ONAP : CCSDK
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+###
+
+org.onap.ccsdk.sli.dbtype = jdbc
+org.onap.ccsdk.sli.jdbc.url=jdbc:mariadb://dbhost:3306/${MYSQL_DATABASE}
+org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver
+org.onap.ccsdk.sli.jdbc.database = ${MYSQL_DATABASE}
+org.onap.ccsdk.sli.jdbc.user = ${MYSQL_USER}
+org.onap.ccsdk.sli.jdbc.password = ${MYSQL_PASSWORD}
+
+sliapi.serviceLogicDirectory=/opt/onap/sdnc/svclogic/graphs
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.sdnc.apps</groupId>
+ <artifactId>sdnc-apps-ms</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>gra</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>sdnc-apps :: ms :: ${project.artifactId}</name>
+ <description>Generic Resource API microservice</description>
+
+ <properties>
+ <aaf.cadi.version>2.1.21</aaf.cadi.version>
+ <ccsdk.apps.version>1.2.0-SNAPSHOT</ccsdk.apps.version>
+ <ccsdk.docker.version>1.1-STAGING-latest</ccsdk.docker.version>
+ <sdnc.northbound.version>2.2.0-SNAPSHOT</sdnc.northbound.version>
+ <sdnc.oam.version>2.2.0-SNAPSHOT</sdnc.oam.version>
+ <gratest.mysql.database>testdb</gratest.mysql.database>
+ <gratest.mysql.root.password>itsASecret</gratest.mysql.root.password>
+ <gratest.mysql.user>testdb</gratest.mysql.user>
+ <gratest.mysql.password>test123</gratest.mysql.password>
+ </properties>
+
+ <modules>
+ <module>gra-app</module>
+ <module>gra-docker</module>
+ </modules>
+</project>
<description>Micro-services</description>
<modules>
- <module>generic-resource-api</module>
+ <module>gra</module>
</modules>
</project>