Compare commits

...

2 Commits

Author SHA1 Message Date
Pim van Pelt
80c91bcfab Update order 2025-11-23 08:44:36 +01:00
Pim van Pelt
db05eb1bfa Update 'vppcfg apply' section. Bugfix: make sure {head,tail}.vpp are not empty 2025-11-23 08:43:07 +01:00

View File

@@ -283,8 +283,9 @@ exec /etc/vpp/config/vppcfg.vpp
exec /etc/vpp/config/tail.vpp
EOF
$ touch /etc/vpp/config/head.vpp /etc/vpp/config/tail.vpp
$ echo "comment { commands to execute before vppcfg }" > /etc/vpp/config/head.vpp
$ vppcfg plan --novpp -c /etc/vpp/vppcfg.yaml -o /etc/vpp/config/vppcfg.vpp
$ echo "comment { commands to execute after vppcfg }" > /etc/vpp/config/tail.vpp
```
After adding `unix { startup /etc/vpp/config/bootstrap.vpp }`, the VPP dataplane will execute
@@ -299,5 +300,11 @@ set (typically using `device-type: dpdk` in the PHY interface definition).
### vppcfg apply
Applying state is not (yet) implemented. Don't worry, it's not much work, but this is punted until
developer community feedback is reviewed :-)
The purpose of the **apply** module, is to take the diff from the **plan** module, and change
the VPP dataplane to match the intent in the YAML file. It internally runs the **plan** module,
but instead of outputting the CLI commands to stdout or a given output file, it'll issue them
programmatically against VPP. If no diffs are found, it'll exit gracefully.
***NOTE***: the `vppcfg apply` command will use the so-called `inband_cli` API call, and feed
the _prune_, _create_ and _sync_ commands one by one. This approach matches most closely with
what plan output the user might paste into `vppctl`.