Add ability to set default restart value; add schedule and default schedule
add schedule and default schedule options to enable network restarts during change windows
I did not add any spec tests so far, because 1) I wasn't sure how to test getting a class variable specifically (the restart functionality is already spec tested), and 2) I wasn't sure how to test schedules. Please let me know what sort of testing is needed (and point me in the right direction if possible).
In case it's useful, this is the functional testing I completed:
Functional testing: DONE - restart false global (hiera global yaml)
- updates file, does not refresh DONE - restart true global (hiera node yaml override)
- updates file, refreshes DONE - schedule with global (restart true) -- does not update file DONE - schedule with global with override (restart true) -- updates file, refreshes DONE - schedule with global (restart false) -- updates file, does not refresh DONE - default restart true (unspecified in Hiera) -- updates file, refreshes DONE - default restart false (hiera global yaml) -- updates file, does not refresh DONE - default restart false with true override (hiera node yaml override; alias) -- updates file, refreshes DONE - default restart false with static interface change with schedule [assume without sched is the same] -- updates file, does not refresh DONE - default restart true with static interface change with schedule -- does not update file DONE - default restart true with static interface change without schedule -- updates file, refreshes DONE - default restart false with true override and schedule -- does not update file DONE - schedule with alias, schedule not on default interface -- updates default interface and not alias DONE - default schedule set in global.yaml -- does not update file DONE - default schedule set in global overridden in node file -- updates file, refreshes
I know my tests are failing - I figured out how to run them locally and have fixed most of the issues. I'll update as soon as I'm done (lots of files).
Rspec is updated. I also had to do a couple of rspec fixes for network_alias_spec.rb and network_if_static_spec.rb.
I also ran into a runtime error when trying to run spec tests against all the defines at once: RuntimeError: fact "hostname" already has the maximum number of resolutions allowed (100).
It looks like it's related to this ticket - but I wasn't sure when I might need to call Facter.clear - every spec test that uses facts? Just specific ones using facts in a certain way?
https://tickets.puppetlabs.com/browse/FACT-1016
FYI - if you're at PuppetConf, let me know if you want to discuss the module there.