aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim
diff options
context:
space:
mode:
authormrichomme <morgan.richomme@orange.com>2020-04-10 18:22:59 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2020-04-14 17:25:12 +0000
commit28babfa0a7ab8a6c1df9d16c7235d968c1337df3 (patch)
tree2a3bf4bd9aeb83ac2ee44a2e41ee665b3b394931 /test/mocks/mass-pnf-sim
parentc06ea62716be250a59bd1d3857baa1a3a927a317 (diff)
Fix integration markdown errors for linter
Issue-ID: INT-1523 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: I2be0865395b12e1f277834b0c096f5d183cb5056 Signed-off-by: mrichomme <morgan.richomme@orange.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim')
-rw-r--r--test/mocks/mass-pnf-sim/README.md60
-rw-r--r--test/mocks/mass-pnf-sim/pnf-sim-lightweight/README.md29
2 files changed, 65 insertions, 24 deletions
diff --git a/test/mocks/mass-pnf-sim/README.md b/test/mocks/mass-pnf-sim/README.md
index 07f74e2b7..f997f56ad 100644
--- a/test/mocks/mass-pnf-sim/README.md
+++ b/test/mocks/mass-pnf-sim/README.md
@@ -1,48 +1,78 @@
### Mass PNF simulator
+
The purpose of this simulator is to mimic the PNF for benchmark purposes.
This variant is based on the PNF simulator and use several components.
The modification are focusing on the following areas:
- -add a script configuring and governing multiple instances of PNF simualtor
- -removing parts which are not required for benchmark purposes.
- -add functionality which creates and maintains the ROP files
- -add functionality to query the actual ROP files and construct VES events based on them
+- add a script configuring and governing multiple instances of PNF simualtor
+- removing parts which are not required for benchmark purposes.
+- add functionality which creates and maintains the ROP files
+- add functionality to query the actual ROP files and construct VES events based on them
+### Pre-configuration
-###Pre-configuration
The ipstart should align to a /28 Ip address range start (e.g. 10.11.0.16, 10.11.0.32)
For debug purposes, you can use your own IP address as VES collector, use "ip" command to determine it.
Example:
+
+```
./mass-pnf-sim.py --bootstrap 2 --urlves http://10.148.95.??:10000/eventListener/v7 --ipfileserver 10.148.95.??? --typefileserver sftp --ipstart 10.11.0.16
+```
Note that the file creator is started at a time of the bootstrapping.
Stop/start will not re-launch it.
-###Replacing VES for test purposes
-`sudo nc -vv -l -k -p 10000`
+### Replacing VES for test purposes
+
+```
+sudo nc -vv -l -k -p 10000
+```
+
+### Start
-###Start
Define the amount of simulators to be launched
+
+```
./mass-pnf-sim.py --start 2
+```
+
+### Trigger
-###Trigger
+```
./mass-pnf-sim.py --trigger 2
+```
-###Trigger only a subset of the simulators
+### Trigger only a subset of the simulators
+
+The following command will trigger 0,1,2,3:
+
+```
./mass-pnf-sim.py --triggerstart 0 --triggerend 3
-#this will trigger 0,1,2,3
+```
+
+The following command will trigger 4 and 5:
+```
./mass-pnf-sim.py --triggerstart 4 --triggerend 5
-#this will trigger 4,5
+```
-###Stop and clean
+### Stop and clean
+
+```
./mass-pnf-sim.py --stop 2
./mass-pnf-sim.py --clean
+```
+
+### Verbose printout from Python
-###Verbose printout from Python
+```
python3 -m trace --trace --count -C . ./mass-pnf-sim.py .....
+```
+
+### Cleaning and recovery after incorrect configuration
-###Cleaning and recovery after incorrect configuration
+```
docker stop $(docker ps -aq); docker rm $(docker ps -aq)
+```
diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/README.md b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/README.md
index 0e2b668a4..927140571 100644
--- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/README.md
+++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/README.md
@@ -1,16 +1,26 @@
-##Local development shortcuts:
-####To start listening on port 10000 for test purposes
-`nc -l -k -p 10000`
-####Test the command above:
-`echo "Hello World" | nc localhost 10000`
+## Local development shortcuts:
-####Trigger the pnf simulator locally:
+To start listening on port 10000 for test purposes:
+
+```
+nc -l -k -p 10000
+```
+
+Test the command above:
+
+```
+echo "Hello World" | nc localhost 10000
+```
+
+Trigger the pnf simulator locally:
```
~/dev/git/integration/test/mocks/mass-pnf-sim/pnf-sim-lightweight$ curl -s -X POST -H "Content-Type: application/json" -H "X-ONAP-RequestID: 123" -H "X-InvocationID: 456" -d @config/config.json
http://localhost:5000/simulator/start
```
-#### VES event sending
+
+## VES event sending
+
the default action is to send a VES Message every 15 minutes and the total duration of the VES FileReady Message sending is 1 day (these values can be changed in config/config.json)
Message from the stdout of nc:
@@ -27,7 +37,8 @@ User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_162)
Accept-Encoding: gzip,deflate
```
-```javascript
+```i
+javascript
{"event":{"commonEventHeader":{"startEpochMicrosec":"1551865758690","sourceId":"val13","eventId":"registration_51865758",
"nfcNamingCode":"oam","internalHeaderFields":{},"priority":"Normal","version":"4.0.1","reportingEntityName":"NOK6061ZW3",
"sequence":"0","domain":"notification","lastEpochMicrosec":"1551865758690","eventName":"pnfRegistration_Nokia_5gDu",
@@ -36,4 +47,4 @@ Accept-Encoding: gzip,deflate
"arrayOfNamedHashMap":[{"name":"10MB.tar.gz","hashMap":{
"location":"ftpes://10.11.0.68/10MB.tar.gz","fileFormatType":"org.3GPP.32.435#measCollec",
"fileFormatVersion":"V10","compression":"gzip"}}]}}}
-``` \ No newline at end of file
+```