diff options
author | Tim Smith <tsmith@chef.io> | 2020-03-09 16:07:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 16:07:36 -0700 |
commit | dcbc8289d06c36bc2b545618fb9cf8fc2e95a5d7 (patch) | |
tree | 684e63956621d685b7cd39c97d594804a8b4941b | |
parent | d38e9393026d2dfdfd35a3e7d319ce735ebc9162 (diff) | |
parent | 80a6ae159623c2b32855eb603cc826c04a4ec7aa (diff) | |
download | chef-dcbc8289d06c36bc2b545618fb9cf8fc2e95a5d7.tar.gz |
Merge pull request #9444 from chef/equal_to
Expose equal_to values in property / chef-resource-inspector
-rw-r--r-- | lib/chef/property.rb | 12 | ||||
-rw-r--r-- | lib/chef/resource_inspector.rb | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb index 34fde05020..336331b59f 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -1,6 +1,7 @@ # # Author:: John Keiser <jkeiser@chef.io> -# Copyright:: Copyright 2015-2016, John Keiser. +# Copyright:: Copyright 2015-2016, John Keiser +# Copyright:: Copyright 2015-2020, Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -245,6 +246,15 @@ class Chef end # + # The equal_to field of this property. + # + # @return [Array, NilClass] + # + def equal_to + options[:equal_to] + end + + # # Whether this is part of the resource's natural identity or not. # # @return [Boolean] diff --git a/lib/chef/resource_inspector.rb b/lib/chef/resource_inspector.rb index 187bd6338b..b3c2f4d1e0 100644 --- a/lib/chef/resource_inspector.rb +++ b/lib/chef/resource_inspector.rb @@ -1,4 +1,4 @@ -# Copyright:: Copyright 2018, Chef Software, Inc +# Copyright:: Copyright 2018-2020, Chef Software, Inc # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -58,7 +58,8 @@ module ResourceInspector deprecated: opts[:deprecated] || false, required: opts[:required] || false, default: opts[:default_description] || get_default(opts[:default]), - name_property: opts[:name_property] || false } + name_property: opts[:name_property] || false, + equal_to: opts[:equal_to] || [] } end data end |