-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Short Description
The coresmd and bootloop plugins have a lot of positional arguments with some of them being optional and some of them being required. For example, coresmd supports optionally specifying a certificate path. If left unspecified, the user is required to put in '', which may be confusing if no comments are present.
Instead of having a fixed number of positional arguments, it would be useful to have a variable number of key-value arguments so that it is clear to a reader of the config file what value corresponds to which configuration key. Also, the position of the arguments wouldn't matter. The format of the Linux kernel command line is in mind.
For example, a CoreDHCP config containing:
---
server4:
plugins:
[...]
- coresmd: https://foobar.openchami.cluster http://172.16.0.253:8081 /root_ca/root_ca.crt 30s 1h false
- bootloop: /tmp/coredhcp.db default 5m 172.16.0.156 172.16.0.200could become:
---
server4:
plugins:
[...]
# Being verbose with the options:
- coresmd: svc_baseurl=https://foobar.openchami.cluster ipxe_baseurl=http://172.16.0.253:8081 cacert=/root_ca/root_ca.crt cache_validity=30s lease_time=1h single_port=false
# Being succinct with the options (notice no single_port, default can be false):
#- coresmd: svc_baseurl=https://foobar.openchami.cluster ipxe_baseurl=http://172.16.0.253:8081 cacert=/root_ca/root_ca.crt cache_validity=30s lease_time=1h
# Being verbose with the options:
- bootloop: db_path=/tmp/coredhcp.db ipxe=default lease_time=5m ip_start=172.16.0.156 ip_end=172.16.0.200
# Being succinct with the options (ipxe is default value, so unspecified):
# - bootloop: db_path=/tmp/coredhcp.db lease_time=5m ip_start=172.16.0.156 ip_end=172.16.0.200Definition of Done
User is able to specify key-value pairs for coresmd and bootloop CoreDHCP plugins instead of positional arguments.
Additional context
This syntax was suggested earlier, but never implemented.