-
Notifications
You must be signed in to change notification settings - Fork 985
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
Fixes #2089 - Add network configuration to ENC #1862
Conversation
1454ffe
to
1d24b1a
Compare
"subnets"=> | ||
[{"network"=>"2.3.4.0", | ||
"name"=>"one", | ||
"gateway"=>nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how well YAML (or at least the Puppet ENC) handles nil values for keys - should we consider not including nils in the ENC YAML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow. nil
should never become key, subnets is always array of hashes and some values may be nil
which becomes undef
(well I tested only on one puppet version)
I'd say that it would be more convenient to always have gateway
key which sometimes has address as a value and sometimes is undef
. Some subnets does not have gateway which is valid value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To quote myself: "nil values for keys" - it's the values that are nil, not the keys. If they get correctly converted to undef then thats fine - we've strugged to pass undef in various places in the past, which is why I'm raising it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's "for keys" part that I didn't understand. Anyway if you get to same results I think undef is the best fit here.
Do we want to convert |
a002c4a
to
66bed40
Compare
@GregSutcliffe your comment was removed (EDIT: and is back again), but here's my answer - it works in development which tends to be issue with STI but since we have require_dependency for children in all NIC classes it should work fine |
66bed40
to
8e5f029
Compare
@ares I don't think this loading @host.subnet correctly for the built-in interface:
The host definitely has a subnet:
|
fd5eff2
to
f61a165
Compare
f61a165
to
568ba10
Compare
Reviewed, tested, looks great for my various networking test hosts. Merged as a1b2ee5, thanks! |
No description provided.