aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/mass-pnf-sim/README.md
blob: fc829f5d15a83bbcacf7e64439905d1e512fbb95 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
### 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

### 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.

### Build simulator image

```
./mass-pnf-sim.py build
```

### Bootstrap simulator instances

```
./mass-pnf-sim.py bootstrap --count 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
```

### Start

Define the amount of simulators to be launched

```
./mass-pnf-sim.py start --count 2
```

### Trigger

```
./mass-pnf-sim.py trigger --count 2
```

### Trigger only a subset of the simulators

The following command will trigger 0,1,2,3:

```
./mass-pnf-sim.py trigger-custom --triggerstart 0 --triggerend 3
```

The following command will trigger 4 and 5:

```
./mass-pnf-sim.py trigger-custom --triggerstart 4 --triggerend 5
```

### Stop and clean

```
./mass-pnf-sim.py stop --count 2
./mass-pnf-sim.py clean
```

### Verbose printout from Python

```
python3 -m trace --trace --count -C . ./mass-pnf-sim.py .....
```

### Cleaning and recovery after incorrect configuration

```
./clean.sh
```