-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
init: change refclocks
data type to Hash
#190
base: master
Are you sure you want to change the base?
Conversation
d2613f5
to
9922326
Compare
need guidance on how to regenerate ereference.md |
So I'm not a maintainer, but I believe the right thing to use is puppet strings. Specifically |
Update REFERENCE.md with $ bundle exec rake strings:generate:reference Add it to the PR and CI should continue. Can you also update the test suite (in |
This updates the refclock parameter data types to be a hash which matches the examples and updates the template to properly generate multiple refclock entries. This looks to have broken via a combination of voxpupuli#141 and voxpupuli#79. Rather than restore the full variations that were supported prior to voxpupuli#79 a simplified hash structure was chosen. Fixes voxpupuli#189 Signed-off-by: Ben Magistro <koncept1@gmail.com>
9922326
to
ac8ed0f
Compare
I wonder if this is the change we should make. The Here is how I am configuring refclocks, for example: |
refclocks
data typerefclocks
data type to Hash
Following on @kenyon notes, and as someone who never used this module, the parameter looks a bit scary. My guess is that a proper usage of Puppet's Switching to Struct is necessarily a breaking change, but with a Variant of String and Tuple, I think we can have a backwards-compatible way of making the data validated (untested): Array[
Variant[
String[1], # for backwards compatibility
Tuple[
Enum['PHC', 'PPS', 'SOCK'],
Stdlib::Absolutepath,
Pattern['\A[^ ]+ [^ ]+\z'],
2,
default,
],
Tuple[
Enum['SHM'],
Integer[0],
Pattern['\A[^ ]+ [^ ]+\z'],
2,
default,
],
],
] No strong opinion regarding the above, but it feels cheaper to fix the doc so that it match the code than adjusting the code so that it match the doc. |
I can try reverting my changes and see if it generates correctly. I vaguely remember trying an array at one point and not being able to get the multiple entries I needed. |
This updates the refclock parameter data types to be a hash which matches the examples and updates the template to properly generate multiple refclock entries.
This looks to have broken via a combination of #141 and #79. Rather than restore the full variations that were supported prior to #79 a simplified hash structure was chosen.
Fixes #189