Skip to content

Commit

Permalink
extend comment about backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Mar 23, 2017
1 parent 93aa67d commit 9c36419
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/lib/cfa/ntp_conf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,37 @@ def options
res = augeas_options.map { |option| option[:value] }
# backward compatibility with old lense that set value ip restriction
# instead of address
# for old lenses data can look like:
# line in configuration file:
# restrict -4 default nofail
# augeas tree:
# key: restrict
# value: -4
# action[1]: default
# action[2]: nofail
#
# line in configuration file:
# restrict default nofail
# augeas tree:
# key: restrict
# value: default
# action[1]: nofail
#
# with new lense value is always address like:
# line in configuration file:
# restrict -4 default nofail
# augeas tree:
# key: restrict
# value: default
# action[1]: nofail
# ipv4: nil
#
# line in configuration file:
# restrict default nofail
# augeas tree:
# key: restrict
# value: default
# action[1]: default
res.shift if ["-6", "-4"].include?(value)

res
Expand Down

0 comments on commit 9c36419

Please sign in to comment.