Mass-pnf-simulator publishing ports
[integration.git] / test / mocks / mass-pnf-sim / pnf-sim-lightweight / README.md
1 ##Local development shortcuts:
2 ####To start listening on port 10000 for test purposes
3 `nc -l -k -p 10000`
4 ####Test the command above: 
5 `echo "Hello World" | nc localhost  10000`
6
7 ####Trigger the pnf simulator locally:
8
9 ```
10 ~/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 
11 http://localhost:5000/simulator/start
12 ```
13
14
15 Message from the stdout of nc:
16
17 ```
18 POST / HTTP/1.1
19 Content-Type: application/json
20 X-ONAP-RequestID: 123
21 X-InvocationID: 3a256e95-2594-4b11-b25c-68c4baeb5c20
22 Content-Length: 734
23 Host: localhost:10000
24 Connection: Keep-Alive
25 User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_162)
26 Accept-Encoding: gzip,deflate
27 ```
28
29 ```javascript
30 {"event":{"commonEventHeader":{"startEpochMicrosec":"1551865758690","sourceId":"val13","eventId":"registration_51865758",
31 "nfcNamingCode":"oam","internalHeaderFields":{},"priority":"Normal","version":"4.0.1","reportingEntityName":"NOK6061ZW3",
32 "sequence":"0","domain":"notification","lastEpochMicrosec":"1551865758690","eventName":"pnfRegistration_Nokia_5gDu",
33 "vesEventListenerVersion":"7.0.1","sourceName":"NOK6061ZW3","nfNamingCode":"gNB"},
34 "notificationFields":{"notificationFieldsVersion":"2.0","changeType":"FileReady","changeIdentifier":"PM_MEAS_FILES",
35 "arrayOfNamedHashMap":[{"name":"10MB.tar.gz","hashMap":{
36 "location":"ftpes://10.11.0.68/10MB.tar.gz","fileFormatType":"org.3GPP.32.435#measCollec",
37 "fileFormatVersion":"V10","compression":"gzip"}}]}}}
38 ```