aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans/vfc-nfvo-driver-vnfm-svnfm/sanity-check/setup.sh
blob: 047c067e887d2fdf17d4429637fb74c7172d2f0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
#
# Copyright 2017 ZTE Corporation.
#
# 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.
#
# Place the scripts in run order:
# Start all process required for executing test case

source ${SCRIPTS}/common_functions.sh


#start msb
docker run -d -p 8500:8500  --name msb_consul consul:0.9.3
MSB_CONSUL_IP=`get-instance-ip.sh msb_consul`
echo MSB_CONSUL_IP=${MSB_CONSUL_IP}
docker run -d  -p 10081:10081  -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
echo MSB_DISCOVERY_IP=${MSB_DISCOVERY_IP}
docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
echo MSB_IAG_IP=${MSB_IAG_IP}

# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
for i in {1..10}; do
    curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
    echo sleep $i
    sleep $i
done

# wait for container initalization
echo sleep 60
sleep 60

# start vfc-ztevnfmdriver
docker run -d --name vfc-ztevnfmdriver -p 8410:8410 -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/ztevnfmdriver
ZTEVNFMDRIVER_IP=`get-instance-ip.sh vfc-ztevnfmdriver`

# Wait for initialization
for i in {1..10}; do
    curl -sS ${ZTEVNFMDRIVER_IP}:8410 && break
    echo sleep $i
    sleep $i
done


# Start svnfm-huawei
docker run -d --name vfc-svnfm-huawei -p 8482:8482 -p 8443:8443 -e MSB_ADDR=${MSB_IAG_IP}:80 nexus3.onap.org:10001/onap/vfc/nfvo/svnfm/huawei
SERVICE_IP=`get-instance-ip.sh vfc-svnfm-huawei`
for i in {1..20}; do
    curl -sS ${SERVICE_IP}:8482 && break
    echo sleep $i
    sleep $i
done

# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v ZTEVNFMDRIVER_IP:${ZTEVNFMDRIVER_IP} -v MSB_IP:${MSB_IAG_IP} -v SERVICE_IP:${SERVICE_IP} -v SCRIPTS:${SCRIPTS}"
} /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<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>
	<artifactId>catalog-fe</artifactId>
	<packaging>war</packaging>

	<parent>
		<groupId>org.openecomp.sdc</groupId>
		<artifactId>sdc-main</artifactId>
		<version>1.2.0-SNAPSHOT</version>
	</parent>

	<dependencies>

		<dependency>
			<groupId>org.functionaljava</groupId>
			<artifactId>functionaljava</artifactId>
			<version>${functionaljava.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.openecomp.sdc</groupId>
			<artifactId>security-utils</artifactId>
			<version>${project.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.openecomp.sdc</groupId>
			<artifactId>common-app-api</artifactId>
			<version>${project.version}</version>
		</dependency>

		<!-- File changes listener -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j-api.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
            <version>${logback.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>${groovy.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.codehaus.janino</groupId>
			<artifactId>janino</artifactId>
			<version>${janino.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
			<version>${snakeyaml.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-jci-core</artifactId>
			<version>${commons-jci-core.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>${gson.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-servlet</artifactId>
            <version>${jersey-bom.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-multipart</artifactId>
			<version>${jersey-bom.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-moxy</artifactId>
			<version>${jersey-bom.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>javax.mail-api</artifactId>
			<version>1.5.2</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
			<version>${jersey-bom.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
			<version>${jackson.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
			<version>${jackson.annotations.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- http client -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
            <version>${httpcore.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpmime</artifactId>
            <version>${httpclient.version}</version>
			<!--<version>4.3.2</version>-->
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>${commons-logging}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
            <version>${commons-codec}</version>
			<scope>compile</scope>
		</dependency>
		<!-- http client END -->

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
            <version>${servlet-api.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- JSON and YAML Parsing -->
		<dependency>
			<groupId>com.fasterxml.jackson.dataformat</groupId>
			<artifactId>jackson-dataformat-yaml</artifactId>
			<version>${jackson.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- Jetty Proxy -->
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-proxy</artifactId>
			<version>${jetty.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlets</artifactId>
			<version>${jetty.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- Proxy servlet -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
            <version>${guava.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- Aspects -->
		<dependency>
			<groupId>com.jcabi</groupId>
			<artifactId>jcabi-aspects</artifactId>
			<version>${jcabi.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
			<version>${aspectjrt.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
            <version>${lang3.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- Inserted for ECOMP Portal Integration -->
		<dependency>
			<groupId>org.openecomp.ecompsdkos</groupId>
			<artifactId>epsdk-fw</artifactId>
			<version>${ecomp.version}</version>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
					<groupId>com.att.nsa</groupId>
					<artifactId>cambriaClient</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-log4j12</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- System metrics -->
		<dependency>
			<groupId>org.fusesource</groupId>
			<artifactId>sigar</artifactId>
			<version>${sigar.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- TEST -->
		<dependency>
			<groupId>org.glassfish.jersey.test-framework.providers</groupId>
			<artifactId>jersey-test-framework-provider-bundle</artifactId>
			<version>${jersey-bom.version}</version>
			<type>pom</type>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlet</artifactId>
            <version>${jetty.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-webapp</artifactId>
            <version>${jetty.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<finalName>${project.artifactId}-${project.version}</finalName>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
					</archive>

					<webResources>
						<resource>
							<directory>src/main/resources</directory>
						</resource>
					</webResources>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty.version}</version>
				<!--<version>9.0.6.v20130930</version>-->
				<configuration>
					<contextPath>/</contextPath>
					<webApp>
						<contextPath>/</contextPath>
						<webInfIncludeJarPattern>.*/.*jersey-[^/]\.jar$</webInfIncludeJarPattern>
					</webApp>
					<war>${project.build.directory}/${project.build.finalName}.war</war>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.jcabi</groupId>
				<artifactId>jcabi-maven-plugin</artifactId>
				<version>${jcabi.plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>ajc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>

								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.jcabi</groupId>
										<artifactId>jcabi-maven-plugin</artifactId>
										<versionRange>[0.0,)</versionRange>
										<goals>
											<goal>ajc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute />
									</action>
								</pluginExecution>

							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>

				<!-- jacbi (log injection) -->

			</plugins>
		</pluginManagement>

	</build>

	<profiles>
        <profile>
            <id>catalog</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>

            <build>
            	<finalName>${project.artifactId}-${project.version}</finalName>          
            </build>
        </profile>
	</profiles>
</project>