Merge "Remove -a build flag"
[multicloud/k8s.git] / kud / tests / vFW / README.md
1 # vFirewall ONAP Use Case
2
3 This use case is composed of three virtual functions (VFs) running in
4 separate Ubuntu Virtual Machines:
5
6   * [Packet generator][1]: Sends packets to the packet sink through the
7 firewall. This includes a script that periodically generates different
8 volumes of traffic.
9   * [Firewall][2]: Reports the volume of traffic passing though to the
10 ONAP DCAE collector.
11   * [Traffic sink][3]: Displays the traffic volume that lands at the sink
12 VM using the link http://192.168.20.250:667 through your browser
13 and enable automatic page refresh by clicking the "Off" button. You
14 can see the traffic volume in the charts.
15
16 ![Diagram](diagram.png)
17
18 ## Adjust packet generator:
19
20 The packet generator contains 10 streams: fw\_udp1, fw\_udp2,
21 fw\_udp3, . . . , fw\_udp10. Each stream generates 100 packets every
22 10 seconds. The  */opt/run\_traffic\_fw\_demo.sh* script on the packet
23 generator VM starts automatically and alternates high traffic (i.e.
24 10 active streams at the same time) and low traffic (1 active stream)
25 every 5 minutes.
26
27 To enable a stream, include `{"id":"fw_udp1", "is-enabled":"true"}`
28 in the *pg-stream* bracket. 
29
30 To adjust the traffic volume produced by the packet generator, run the
31 following command in a shell:
32
33 ```
34     curl -X PUT \
35          -H "Authorization: Basic YWRtaW46YWRtaW4=" \
36          -H "Content-Type: application/json" \
37          -H "Cache-Control: no-cache" \
38          -d '{"pg-streams":{"pg-stream": [{"id":"fw_udp1", "is-enabled":"true"},{"id":"fw_udp2", "is-enabled":"true"},{"id":"fw_udp3", "is-enabled":"true"},{"id":"fw_udp4", "is-enabled":"true"},{"id":"fw_udp5", "is-enabled":"true"}]}}' \
39         "http://192.168.10.200:8183/restconf/config/sample-plugin:sample-plugin/pg-streams"
40 ```
41
42 The command above enables 5 streams.
43
44 ## License
45
46 Apache-2.0
47
48 [1]: packetgen
49 [2]: firewall
50 [3]: sink