-
Notifications
You must be signed in to change notification settings - Fork 3
feat(coredhcp/coresmd)!: introduce key value config #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
Author
|
Getting this out there, still adding unit tests. |
8e2117c to
b0743d2
Compare
Collaborator
Author
|
Unit tests added. This should be ready for review. |
13 tasks
b0743d2 to
eb315a7
Compare
Instead of relying on the position of arguments to determine which
values get assigned to which configuration keys for the coresmd CoreDHCP
plugin, parse using key=value. For example:
server4:
plugins:
- coresmd: svc_base_uri=https://foobar.openchami.cluster ipxe_base_uri=http://172.16.0.253:8081 ca_cert=/root_ca/root_ca.crt cache_valid=30s lease_time=1h single_port=false
or:
server4:
plugins:
- coresmd:
- svc_base_uri=https://foobar.openchami.cluster
- ipxe_base_uri=http://172.16.0.253:8081
- ca_cert=/root_ca/root_ca.crt
- cache_valid=30s
- lease_time=1h
- single_port=false
The benefits of this are:
- argument order does not matter
- optional arguments can be omitted entirely
New configuration options added:
- tftp_dir (default /tftpboot): choose TFTP server root directory
- tftp_port (default 69): TFTP server bind port
BREAKING-CHANGE: Old positional-argument-based format will not work
anymore.
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
eb315a7 to
3853e17
Compare
Collaborator
Author
|
Rebasing to allow new unit tests to run. |
Collaborator
Author
|
Checks are passing, received successful integration test feedback, and received out-of-band approval to merge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Thank you for your contribution! Please ensure the following before submitting:
Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryDescription
BREAKING CHANGE: The coresmd and bootloop CoreDHCP plugins have a switched config format that can be migrated to in a straightforward manner,
Switch to a key-value configuration format instead of a positional-based configuration format. This means CoreDHCP configurations such as:
Would become:
The configurations can still be on the same line instead of a YAML array, but the latter allows easier file reading and better tracking of what changed when using version control and so it is recommended.
Additional functionality that was added is the ability to specify the TFTP port (
tftp_port) and TFTP server root directory (tftp_dir), which default to69and/tftpboot, respectively, in alignment with the previous behavior.READMEs have been updated/added to document the new format.
Other than a change of config format (and therefore file parsing, as well as some initialization log messages), previous behavior has been preserved.
Fixes #19
Testing
Test log output:
Using the old format to generate errors:
Successful logs using new format:
Type of Change
For more info, see Contributing Guidelines.