Initial OpenECOMP SDC commit

Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b
Signed-off-by: Michael Lando <ml636r@att.com>
diff --git a/ui-ci/src/main/resources/ci/conf/credentials.yaml b/ui-ci/src/main/resources/ci/conf/credentials.yaml
new file mode 100644
index 0000000..a30d8ce
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/conf/credentials.yaml
@@ -0,0 +1,48 @@
+    designer: {
+        username: cs0008,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    admin: {
+        username: jh0003,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    ops: {
+        username: op0001,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    tester: {
+        username: jm0007,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    governor: {
+        username: gv0001,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    product_strategist: {
+        username: ps0001,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    product_manager: {
+        username: pm0001,
+        password: demo,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
+    product_local: {
+        username: pm0001,
+        password: 123123a,
+        firstname: ASDC,
+        lastname: KASPIN
+    }
\ No newline at end of file
diff --git a/ui-ci/src/main/resources/ci/conf/log4j.properties b/ui-ci/src/main/resources/ci/conf/log4j.properties
new file mode 100644
index 0000000..3e159ec
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/conf/log4j.properties
@@ -0,0 +1,34 @@
+# Define the root logger with appender file
+log4j.rootLogger = DEBUG, FILE, stdout
+
+# Define the file appender
+log4j.appender.FILE=org.apache.log4j.RollingFileAppender
+log4j.appender.FILE.File=${targetlog}logs/ci-log.out
+
+# Define the layout for file appender
+log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.FILE.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%10c] : %m%n
+
+# Set the maximum file size before rollover
+log4j.appender.FILE.maxFileSize=5MB
+
+# Set the the backup index
+log4j.appender.FILE.maxBackupIndex=10
+
+
+#############################################################
+
+# Direct log messages to stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n
+
+log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG
+log4j.logger.com.thinkaurelius.titan.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout
+
+log4j.logger.org.openecomp.sdc.ci.tests.utils=TRACE, FILE, stdout
+log4j.additivity.org.openecomp.sdc.ci.tests.utils=false
+
+
diff --git a/ui-ci/src/main/resources/ci/conf/sdc-packages.yaml b/ui-ci/src/main/resources/ci/conf/sdc-packages.yaml
new file mode 100644
index 0000000..dcb78ee
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/conf/sdc-packages.yaml
@@ -0,0 +1,2 @@
+packages:
+ - org.openecomp.sdc.ci.tests.execute.resourceui
\ No newline at end of file
diff --git a/ui-ci/src/main/resources/ci/conf/sdc.yaml b/ui-ci/src/main/resources/ci/conf/sdc.yaml
new file mode 100644
index 0000000..8e84fec
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/conf/sdc.yaml
@@ -0,0 +1,57 @@
+outputFolder: target
+reportName: index.html
+catalogBeHost: localhost
+catalogFeHost: localhost
+esHost: eshost
+disributionClientHost: disClient
+catalogFePort: 8181
+catalogBePort: 8080
+disributionClientPort: 8181
+esPort: 9200
+neoHost: neoHost
+neoPort: 7474
+neoDBusername: neo4j	
+neoDBpassword: 123456
+url: http://localhost:8285/sdc1
+remoteTestingMachineIP: 1.2.3.4
+remoteTestingMachinePort: 5555
+remoteTesting: false
+
+resourceConfigDir: src/test/resources/CI/tests
+componentsConfigDir: src/test/resources/CI/components
+importResourceConfigDir: src/test/resources/CI/importResource
+importResourceTestsConfigDir: src/test/resources/CI/importResourceTests
+errorConfigurationFile: ../catalog-be/src/main/resources/config/error-configuration.yaml
+configurationFile: ../catalog-be/src/main/resources/config/configuration.yaml
+importTypesConfigDir: src/test/resources/CI/importTypesTest
+
+
+titanPropertiesFile: src/main/resources/ci/conf/titan.properties
+
+stopOnClassFailure: false
+
+#List of non-abstract resources to keep during titan cleanup between tests
+#Only 1.0 version will be kept
+resourcesNotToDelete:
+     - tosca.nodes.Compute
+     - tosca.nodes.Database
+     - tosca.nodes.ObjectStorage
+     - tosca.nodes.BlockStorage
+     - tosca.nodes.LoadBalancer
+     - org.openecomp.resource.cp.Port
+     - org.openecomp.resource.vl.Network
+
+#Resource categories to keep (including all their subcategories)
+resourceCategoriesNotToDelete:
+     - Generic
+     - Network L2-3
+     - Network L4+
+     - Application L4+
+     - Network Connectivity
+
+#Service categories to keep
+serviceCategoriesNotToDelete:
+     - Mobility
+     - Network L1-3
+     - Network L4
+     - VoIP Call Control
\ No newline at end of file
diff --git a/ui-ci/src/main/resources/ci/conf/titan.properties b/ui-ci/src/main/resources/ci/conf/titan.properties
new file mode 100644
index 0000000..94d12cf
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/conf/titan.properties
@@ -0,0 +1,7 @@
+storage.backend=cassandra
+storage.hostname=cassandrahost
+storage.port=9160
+
+cache.db-cache-clean-wait = 20
+cache.db-cache-time = 180000
+cache.db-cache-size = 0.5
\ No newline at end of file
diff --git a/ui-ci/src/main/resources/ci/scripts/startTest.sh b/ui-ci/src/main/resources/ci/scripts/startTest.sh
new file mode 100644
index 0000000..b4b2cb1
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/scripts/startTest.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+function usage {
+	echo "Usage: $0 <jar file>"
+}
+
+function exitOnError() {
+        if [ $1 -ne 0 ]
+        then
+                echo "Failed running task $2"
+                exit 2
+        fi
+}
+
+if [ $# -lt 1 ]
+then
+	usage
+	exit 2
+fi
+
+CURRENT_DIR=`pwd`
+BASEDIR=$(dirname $0)
+
+if [ ${BASEDIR:0:1} = "/" ]
+then
+        FULL_PATH=$BASEDIR
+else
+        FULL_PATH=$CURRENT_DIR/$BASEDIR
+fi
+
+LOGS_PROP_FILE=file:${FULL_PATH}/conf/log4j.properties
+#############################################
+TARGET_DIR=${FULL_PATH}/target
+CONF_FILE=${FULL_PATH}/conf/sdc.yaml
+
+DEBUG=true
+MainClass=org.openecomp.sdc.ci.tests.run.StartTest
+
+JAR_FILE=$1
+SUITE_FILE=$2
+FILES_TEST=$3
+
+if [ -z "$3" ]
+then
+		FILES_TEST=${FULL_PATH}/Files
+		echo "$3"
+fi
+
+#TARGET_DIR=`echo ${TARGET_DIR} | sed 's/\//\//g'`
+#echo $TARGET_DIR
+
+TESTS_DIR=/opt/app/sdc/ci/resources/tests
+COMPONENTS_DIR=/opt/app/sdc/ci/resources/components
+
+#sed -i 's#\(outputFolder:\).*#\1 '${TARGET_DIR}'#g' $CONF_FILE
+#sed -i 's#\(resourceConfigDir:\).*#\1 '${TESTS_DIR}'#g' $CONF_FILE
+#sed -i 's#\(componentsConfigDir:\).*#\1 '${COMPONENTS_DIR}'#g' $CONF_FILE
+TARGET_LOG_DIR="${TARGET_DIR}/"
+
+# mkdir -p ${TARGET_DIR}
+#if [ -d ${TARGET_DIR} ]
+#then
+#     rm -rf ${TARGET_DIR}/*
+#exitOnError $? "Failed_to_delete_target_dir"
+#fi
+
+debug_port=8800
+#JAVA_OPTION="-javaagent:/var/tmp/jacoco/lib/jacocoagent.jar=destfile=jacoco-it.exec"
+JAVA_OPTION=""
+case "$2" in
+	-debug) echo "Debug mode, Listen on port $debug_port"; JAVA_OPTION="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${debug_port}" ;;
+	"") echo "Standard mode";;
+	*) echo "USAGE: startTest.sh [-debug]";;
+esac
+
+cmd="nohup java $JAVA_OPTION -DdisplayException=true -Dtargetlog=${TARGET_LOG_DIR} -Dfilepath=${FILES_TEST} -Dconfig.resource=${CONF_FILE} -Ddebug=${DEBUG} -Dlog4j.configuration=${LOGS_PROP_FILE} -cp $JAR_FILE ${MainClass} $SUITE_FILE &" 
+
+#echo $cmd
+#console=`$cmd`
+
+if [ $DEBUG == "true" ]
+then
+	$cmd
+else
+	$cmd >> /dev/null
+fi 
+status=`echo $?`
+
+
+
+echo "##################################################"
+echo "################# status is ${status} #################" 
+echo "##################################################"
+
+exit $status 
+
diff --git a/ui-ci/src/main/resources/ci/testSuites/ui-ci.xml b/ui-ci/src/main/resources/ci/testSuites/ui-ci.xml
new file mode 100644
index 0000000..a6c2584
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/testSuites/ui-ci.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="uitests" configfailurepolicy="continue">
+  <test name="uitests">
+    <classes>
+    	<!--onboard-->
+   		<class name="org.openecomp.sdc.ci.tests.execute.sanity.Onboard">
+   			  <methods>
+				<include name="onboardVNFTest"/>
+			  </methods>
+		</class>
+		<!--vf-->
+		<class name="org.openecomp.sdc.ci.tests.execute.sanity.Vf"/>
+    </classes>
+  </test> <!-- uitests -->
+</suite> <!-- uisuite -->
\ No newline at end of file