From: mtahhan@redhat.com
To: netdev@vger.kernel.org, kuba@kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com
Cc: Maryam Tahhan <mtahhan@redhat.com>
Subject: [net-next,v1 0/2] tools/net/ynl: enable json configuration
Date: Thu, 27 Jul 2023 04:55:55 -0400 [thread overview]
Message-ID: <cover.1690447762.git.mtahhan@redhat.com> (raw)
From: Maryam Tahhan <mtahhan@redhat.com>
Use a json configuration file to pass parameters to ynl to allow
for operations on multiple specs in one go. Additionally, check
this new configuration against a schema to validate it in the cli
module before parsing it and passing info to the ynl module.
Example configs would be:
{
"yaml-specs-path": "/<path-to>/linux/Documentation/netlink/specs",
"spec-args": {
"ethtool.yaml": {
"do": "rings-get",
"json-params": {
"header": {
"dev-name": "eno1"
}
}
},
"netdev.yaml": {
"do": "dev-get",
"json-params": {
"ifindex": 3
}
}
}
}
OR
{
"yaml-specs-path": "/<path-to>/linux/Documentation/netlink/specs",
"spec-args": {
"ethtool.yaml": {
"subscribe": "monitor",
"sleep": 10
},
"netdev.yaml": {
"subscribe": "mgmt",
"sleep": 5
}
}
}
Maryam Tahhan (2):
tools/net/ynl: configuration through json
tools/net/ynl: validate config against schema
tools/net/ynl/cli.py | 135 +++++++++++++++++++++++++++-----
tools/net/ynl/ynl-config.schema | 72 +++++++++++++++++
2 files changed, 187 insertions(+), 20 deletions(-)
create mode 100644 tools/net/ynl/ynl-config.schema
--
2.39.2
next reply other threads:[~2023-07-27 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 8:55 mtahhan [this message]
2023-07-27 8:55 ` [net-next,v1 1/2] tools/net/ynl: configuration through json mtahhan
2023-07-27 8:55 ` [net-next,v1 2/2] tools/net/ynl: validate config against schema mtahhan
2023-07-27 9:38 ` [net-next,v1 0/2] tools/net/ynl: enable json configuration Maryam Tahhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1690447762.git.mtahhan@redhat.com \
--to=mtahhan@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.