diff options
author | Tim Smith <tsmith@chef.io> | 2018-10-26 14:07:01 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-10-29 11:58:07 -0700 |
commit | a71493d575cb24fce33faf26e2530cdc45bcafe2 (patch) | |
tree | 47295f944dfd75c63e6a9f355db4ecf379d66ef7 | |
parent | 86270ecae7658a42db36e5f8f548f8ef3b8a499d (diff) | |
download | chef-a71493d575cb24fce33faf26e2530cdc45bcafe2.tar.gz |
Remove unused route resource properties
These were added, but never actually implemented. In the world of auto generated docs this really breaks things.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/provider/route.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/route.rb | 38 |
2 files changed, 25 insertions, 15 deletions
diff --git a/lib/chef/provider/route.rb b/lib/chef/provider/route.rb index 58a65edb81..b8af9e55b8 100644 --- a/lib/chef/provider/route.rb +++ b/lib/chef/provider/route.rb @@ -158,9 +158,9 @@ class Chef end def generate_config - conf = {} case node[:platform_family] when "rhel", "amazon", "fedora" + conf = {} # walk the collection run_context.resource_collection.each do |resource| next unless resource.is_a? Chef::Resource::Route diff --git a/lib/chef/resource/route.rb b/lib/chef/resource/route.rb index 8c14394ace..ee91ee2bc7 100644 --- a/lib/chef/resource/route.rb +++ b/lib/chef/resource/route.rb @@ -27,20 +27,30 @@ class Chef description "Use the route resource to manage the system routing table in a Linux environment." - property :target, String, identity: true, name_property: true - property :comment, [String, nil], introduced: "14.0" - property :metric, [Integer, nil] - property :netmask, [String, nil] - property :gateway, [String, nil] - property :device, [String, nil], desired_state: false # Has a partial default in the provider of eth0. - property :route_type, [:host, :net], default: :host, coerce: proc { |x| x.to_sym }, desired_state: false - - # I can find no evidence of these properties actually being used by Chef. NK 2017-04-11 - property :networking, [String, nil], desired_state: false - property :networking_ipv6, [String, nil], desired_state: false - property :hostname, [String, nil], desired_state: false - property :domainname, [String, nil], desired_state: false - property :domain, [String, nil], desired_state: false + property :target, String, + description: "The IP address of the target route.", + identity: true, name_property: true + + property :comment, [String, nil], + description: "Add a comment for the route.", + introduced: "14.0" + + property :metric, [Integer, nil], + description: "The route metric value." + + property :netmask, [String, nil], + description: "The decimal representation of the network mask. For example: 255.255.255.0." + + property :gateway, [String, nil], + description: "The gateway for the route." + + property :device, [String, nil], + description: "The network interface to which the route applies.", + desired_state: false # Has a partial default in the provider of eth0. + + property :route_type, Symbol, + description: "", + equal_to: [:host, :net], default: :host, desired_state: false end end end |