summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mocks/hvvessimulator/hvves_sim.yaml6
-rw-r--r--test/mocks/pnfsimulator/README.md2
-rw-r--r--test/mocks/pnfsimulator/docker-compose.yml12
-rw-r--r--test/mocks/pnfsimulator/pom.xml1
-rwxr-xr-xtest/mocks/pnfsimulator/simulator.sh9
-rw-r--r--test/mocks/pnfsimulator/src/assembly/resources.xml3
6 files changed, 22 insertions, 11 deletions
diff --git a/test/mocks/hvvessimulator/hvves_sim.yaml b/test/mocks/hvvessimulator/hvves_sim.yaml
index a3baeed99..c037036f4 100644
--- a/test/mocks/hvvessimulator/hvves_sim.yaml
+++ b/test/mocks/hvvessimulator/hvves_sim.yaml
@@ -3,7 +3,7 @@ description: Heat template for HV-VES simulator deployment
heat_template_version: 2013-05-23
parameters:
- name: { description: Instance name, label: Name, type: string, default: hv-ves_sim }
+ name: { description: Instance name, label: Name, type: string, default: hvves-sim }
flavor_name: { description: Instance flavor to be used, label: Flavor Name, type: string }
image_name: { description: Ubuntu 16.04 image to be used, label: Image Name, type: string }
private_net_id: { description: Private network id, label: Private Network ID, type: string }
@@ -86,7 +86,7 @@ resources:
}
proto_files_checkout () {
- mkdir -p ~/hv-ves_sim/proto;cd ~/hv-ves_sim/proto;wget "https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/hv-ves.git;a=blob_plain;f=hv-collector-domain/src/main/proto/event/VesEvent.proto;hb=HEAD" -O VesEvent.proto;wget "https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/hv-ves.git;a=blob_plain;f=hv-collector-domain/src/main/proto/measurements/HVMeasFields.proto;hb=HEAD" -O HVMeasFields.proto;wget "https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/hv-ves.git;a=blob_plain;f=hv-collector-domain/src/main/proto/measurements/MeasDataCollection.proto;hb=HEAD" -O MeasDataCollection.proto
+ mkdir -p ~/hv-ves_sim/proto;cd ~/hv-ves_sim/proto;wget "https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/hv-ves.git;a=blob_plain;f=hv-collector-domain/src/main/proto/event/VesEvent.proto;hb=HEAD" -O VesEvent.proto
}
kafkacat_install () {
@@ -176,7 +176,7 @@ resources:
message_samples_checkout () {
mkdir ~/hv-ves_sim/samples
- cd ~/hv-ves_sim/samples ; wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json;hb=HEAD" -O xnf-valid-messages-request.json ; wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json;hb=HEAD" -O xnf-invalid-gpb-data-request.json ; wget "https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/csit/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json;hb=HEAD" -O xnf-simulator-smaller-valid-request.json
+ cd ~/hv-ves_sim/samples ; wget "https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob_plain;f=tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json;hb=HEAD" -O xnf-valid-messages-request.json ; wget "https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob_plain;f=tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json;hb=HEAD" -O xnf-invalid-gpb-data-request.json ; wget "https://gerrit.onap.org/r/gitweb?p=integration/csit.git;a=blob_plain;f=tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json;hb=HEAD" -O xnf-simulator-smaller-valid-request.json
}
set_versions
diff --git a/test/mocks/pnfsimulator/README.md b/test/mocks/pnfsimulator/README.md
index e53d72fb7..24359ae08 100644
--- a/test/mocks/pnfsimulator/README.md
+++ b/test/mocks/pnfsimulator/README.md
@@ -20,7 +20,9 @@ Proper config must contain *simulatorParams*, *commonEventHeaderParams* and *pnf
The recommended way is to checkout PNF Simulator project from ONAP Git repository and use *simulator*.sh script.
If you copy *simulator.sh* script to another location, keep in mind to copy also *docker-compose.yml* and directories: *config,json_schema and netconf*.
In order to run simulator, invoke ./simulator.sh start
+You may be asked for providing password for ypur user during startup.
Script downloads if necessary needed Docker images and runs instances of these images.
+The easiest way is to download or generate PNF Simulator zip archive with all needed configuration files.
###Logging
It is possible to get access to logs by invocation of *./simulator.sh* logs.
diff --git a/test/mocks/pnfsimulator/docker-compose.yml b/test/mocks/pnfsimulator/docker-compose.yml
index adaa3eb2c..d853ca9da 100644
--- a/test/mocks/pnfsimulator/docker-compose.yml
+++ b/test/mocks/pnfsimulator/docker-compose.yml
@@ -27,7 +27,8 @@ services:
restart: on-failure
depends_on:
- sftp-server
- - ftpes-server
+ - ftpes-server-pure-ftpd
+ - ftpes-server-vsftpd
sftp-server:
container_name: sftp-server
@@ -40,8 +41,8 @@ services:
restart: on-failure
command: sftp-user::1001
- ftpes-server:
- container_name: ftpes-server
+ ftpes-server-pure-ftpd:
+ container_name: ftpes-server-pure-ftpd
image: stilliard/pure-ftpd:latest
ports:
- "2221:21"
@@ -56,8 +57,8 @@ services:
FTP_USER_HOME: onap
restart: on-failure
- vsftpd_ftpes_server:
- container_name: vsftpd_ftpes_server
+ ftpes-server-vsftpd:
+ container_name: ftpes-server-vsftpd
image: docker.io/panubo/vsftpd
ports:
- "8221:21"
@@ -76,3 +77,4 @@ services:
- ./ftpes/files/onap/ftpes-onap.txt:/srv/ftpes-onap.txt:ro
restart: on-failure
command: vsftpd /etc/vsftpd_ssl.conf
+
diff --git a/test/mocks/pnfsimulator/pom.xml b/test/mocks/pnfsimulator/pom.xml
index c8355dcd2..1f52bbdf2 100644
--- a/test/mocks/pnfsimulator/pom.xml
+++ b/test/mocks/pnfsimulator/pom.xml
@@ -4,7 +4,6 @@
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.oparent</groupId>
<artifactId>oparent</artifactId>
diff --git a/test/mocks/pnfsimulator/simulator.sh b/test/mocks/pnfsimulator/simulator.sh
index 23facce6a..6b61e6b87 100755
--- a/test/mocks/pnfsimulator/simulator.sh
+++ b/test/mocks/pnfsimulator/simulator.sh
@@ -46,7 +46,12 @@ function build_image(){
fi
}
+function set_vsftpd_file_owner() {
+ sudo chown root ./ftpes/vsftpd/configuration/vsftpd_ssl.conf
+}
+
function start_netconf_server() {
+ set_vsftpd_file_owner
docker-compose -f $1 up -d $NETOPEER_CONTAINER_NAME
echo
echo "NETCONF server container's logs:"
@@ -62,7 +67,7 @@ function start(){
echo "Simulator containers are already up"
else
echo "Starting simulator containers using netconf model specified in config/netconf.env"
-
+ set_vsftpd_file_owner
archive_logs
start_netconf_server $1
docker-compose -f $1 up -d $SIMULATOR_CONTAINER_NAME
@@ -138,7 +143,7 @@ Logs are written to logs/pnf-simulator.log. After each "start/start-dev" old log
FOR DEVELOPERS
1. Build local simulator image using "./simulator.sh build"
-2. Run containers with "./simulator.sh start-debug"
+2. Run containers with "./simulator.sh start-dev"
If you change the source code you have to rebuild image with "./simulator.sh build" and run "./simulator.sh start/start-dev" again
EndOfMessage
diff --git a/test/mocks/pnfsimulator/src/assembly/resources.xml b/test/mocks/pnfsimulator/src/assembly/resources.xml
index 4963fa76d..063c7100a 100644
--- a/test/mocks/pnfsimulator/src/assembly/resources.xml
+++ b/test/mocks/pnfsimulator/src/assembly/resources.xml
@@ -39,6 +39,8 @@
<includes>
<include>**/*</include>
</includes>
+ <fileMode>0644</fileMode>
+
</fileSet>
<fileSet>
<directory>json_schema</directory>
@@ -67,6 +69,7 @@
<includes>
<include>**/*</include>
</includes>
+
</fileSet>
</fileSets>
</assembly> \ No newline at end of file