From 6a6caa113eaf7f57058a35084dfec83b406407f1 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sat, 2 Apr 2022 22:34:13 +0200 Subject: [PATCH 1/3] Update usage output --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6e198f7..67ef443 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,20 @@ pyinstaller vppcfg --onefile ``` dist/vppcfg -h -usage: vppcfg [-h] -c CONFIG [-s SCHEMA] [-d] +usage: vppcfg [-h] [-s SCHEMA] [-d] [-q] [-f] -c CONFIG {check,plan,apply} ... + +positional arguments: + {check,plan,apply} optional arguments: -h, --help show this help message and exit - -c CONFIG, --config CONFIG - YAML configuration file for VPP -s SCHEMA, --schema SCHEMA YAML schema validation file - -d, --debug Enable debug, default False + -d, --debug Enable debug logging, default False + -q, --quiet Be quiet (only warnings/errors), default False + -f, --force Force progress despite warnings, default False + -c CONFIG, --config CONFIG + YAML configuration file for vppcfg ``` ## Design From 682d157d5b941629d2851ec3eff36f24e4c0b53b Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sat, 2 Apr 2022 22:37:45 +0200 Subject: [PATCH 2/3] Add note on 'Applying' verb which will come next. --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 67ef443..f67effb 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ Fields: an error is repeated N times, and it's good practice to precisely establish how many errors should be expected. That said, this field can be empty or omitted. -## Reconciling +## Planning The second important task of this utility is to take the wellformed (validated) configuration and apply it to the VPP dataplane. The overall flow consists of three phases: @@ -202,3 +202,19 @@ and finally all objects are synchronized with the configuration (IP addresses, M must be temporarily set admin-down to change that!) 1. Add IPv4/IPv6 addresses 1. Set admin state for all interfaces + +## Applying + +Finally, once the path planner does its work and orders the operations to reconcile the running dataplane +into the desired configuration, we can apply the configuration. Currently not implemented, pending a bit +of community feedback. + +For now, the path planner works by reading the API configuration state exactly once (at startup), and then +it figures out the CLI calls to print without needing to consult VPP again. This is super useful as it’s a +non-intrusive way to inspect the changes before applying them, and it’s a property I’d like to carry forward. +However, I don’t necessarily think that emitting the CLI statements is the best user experience, it’s more for +the purposes of analysis that they can be useful. What I really want to do is emit API calls after the plan +is created and reviewed/approved, directly reprogramming the VPP dataplane. However, the VPP API set needed +to do this is not 100% baked yet. For example, I observed crashes when tinkering with BVIs and Loopbacks, +and fixed a few obvious errors in the Linux CP API but there are still a few more issues to work through +before I can set the next step with vppcfg. From 5e7f1bdba405fabcb6a6264cce3e7b0007a6e16b Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sat, 2 Apr 2022 23:31:40 +0200 Subject: [PATCH 3/3] Update LICENSE file was copied from another project (github.com/pimvanpelt/vpp-snmp-agent) which contains code from another author. That author is not affiliated with this repository, so remove them from the LICENSE file. --- LICENSE | 1 - 1 file changed, 1 deletion(-) diff --git a/LICENSE b/LICENSE index cfdc2a0..02282f7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ -Copyright (c) 2013, Rayed A Alrashed Copyright (c) 2021, Pim van Pelt All rights reserved.