Commit 55e639d
committed
add topology load at startup and save to memory and file after each modification
This feature allows to load a topology from file at startup, either from the default folder or from a user selected file, like
polycubed --cubes-dump ~/Desktop/cubes.yaml
keeping the whole configuration in memory.
After each modification in any of the topology of the cube, the configuration in memory is updated and another thread saves it to file updating it too.
It is possible to start the daemon with an empty topology by using the flag --cubes-init: if the file contains a topology, at the first update it is overwritten.
It is possible to start the daemon without the dumping to file functionality by using the flag --cubes-nodump.
Signed-off-by: Riccardo Marchi <riccardo.marchi4@gmail.com>1 parent 48d4620 commit 55e639d
19 files changed
Lines changed: 761 additions & 51 deletions
File tree
- src/polycubed/src
- server/Resources
- Body
- Endpoint
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| 43 | + | |
41 | 44 | | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
98 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
| |||
180 | 192 | | |
181 | 193 | | |
182 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
183 | 220 | | |
184 | 221 | | |
185 | 222 | | |
| |||
246 | 283 | | |
247 | 284 | | |
248 | 285 | | |
| 286 | + | |
| 287 | + | |
249 | 288 | | |
250 | 289 | | |
251 | 290 | | |
| |||
270 | 309 | | |
271 | 310 | | |
272 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
273 | 315 | | |
274 | 316 | | |
275 | 317 | | |
| |||
363 | 405 | | |
364 | 406 | | |
365 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
366 | 411 | | |
367 | 412 | | |
368 | 413 | | |
| |||
408 | 453 | | |
409 | 454 | | |
410 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
411 | 465 | | |
412 | 466 | | |
413 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
56 | 68 | | |
57 | 69 | | |
58 | 70 | | |
| |||
80 | 92 | | |
81 | 93 | | |
82 | 94 | | |
| 95 | + | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
| 102 | + | |
88 | 103 | | |
89 | 104 | | |
90 | 105 | | |
| |||
0 commit comments