summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-05-01 21:30:00 -0700
committerJohn Keiser <john@johnkeiser.com>2015-05-13 13:43:13 -0700
commit6505a4204dde463c8dc4bce6b814b0a44805d5bc (patch)
tree2208223367c4befc061e1a9b05c61d6efe662022 /lib/chef/resource
parent3eebfe4b433761b079fad0c543c1a93b555f546b (diff)
downloadchef-6505a4204dde463c8dc4bce6b814b0a44805d5bc.tar.gz
Add "provides" to all resources
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/bash.rb1
-rw-r--r--lib/chef/resource/bff_package.rb3
-rw-r--r--lib/chef/resource/breakpoint.rb1
-rw-r--r--lib/chef/resource/csh.rb1
-rw-r--r--lib/chef/resource/deploy.rb1
-rw-r--r--lib/chef/resource/erl_call.rb1
-rw-r--r--lib/chef/resource/execute.rb1
-rw-r--r--lib/chef/resource/http_request.rb1
-rw-r--r--lib/chef/resource/ifconfig.rb3
-rw-r--r--lib/chef/resource/log.rb3
-rw-r--r--lib/chef/resource/ohai.rb1
-rw-r--r--lib/chef/resource/package.rb1
-rw-r--r--lib/chef/resource/perl.rb1
-rw-r--r--lib/chef/resource/portage_package.rb1
-rw-r--r--lib/chef/resource/python.rb1
-rw-r--r--lib/chef/resource/reboot.rb2
-rw-r--r--lib/chef/resource/registry_key.rb1
-rw-r--r--lib/chef/resource/route.rb3
-rw-r--r--lib/chef/resource/ruby.rb1
-rw-r--r--lib/chef/resource/ruby_block.rb1
-rw-r--r--lib/chef/resource/scm.rb1
-rw-r--r--lib/chef/resource/script.rb1
-rw-r--r--lib/chef/resource/service.rb1
-rw-r--r--lib/chef/resource/subversion.rb1
-rw-r--r--lib/chef/resource/whyrun_safe_ruby_block.rb1
-rw-r--r--lib/chef/resource/windows_script.rb1
26 files changed, 27 insertions, 8 deletions
diff --git a/lib/chef/resource/bash.rb b/lib/chef/resource/bash.rb
index 0add0ce501..366d8c7bd6 100644
--- a/lib/chef/resource/bash.rb
+++ b/lib/chef/resource/bash.rb
@@ -22,6 +22,7 @@ require 'chef/provider/script'
class Chef
class Resource
class Bash < Chef::Resource::Script
+ provides :bash
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/bff_package.rb b/lib/chef/resource/bff_package.rb
index 917f0d1d50..d4139e7ffe 100644
--- a/lib/chef/resource/bff_package.rb
+++ b/lib/chef/resource/bff_package.rb
@@ -22,6 +22,7 @@ require 'chef/provider/package/aix'
class Chef
class Resource
class BffPackage < Chef::Resource::Package
+ provides :bff_package
def initialize(name, run_context=nil)
super
@@ -31,5 +32,3 @@ class Chef
end
end
end
-
-
diff --git a/lib/chef/resource/breakpoint.rb b/lib/chef/resource/breakpoint.rb
index b2210262d2..5a55858f71 100644
--- a/lib/chef/resource/breakpoint.rb
+++ b/lib/chef/resource/breakpoint.rb
@@ -22,6 +22,7 @@ require 'chef/resource'
class Chef
class Resource
class Breakpoint < Chef::Resource
+ provides :breakpoint
def initialize(action="break", *args)
@name = caller.first
diff --git a/lib/chef/resource/csh.rb b/lib/chef/resource/csh.rb
index 36659c349b..d37f1a8e0c 100644
--- a/lib/chef/resource/csh.rb
+++ b/lib/chef/resource/csh.rb
@@ -22,6 +22,7 @@ require 'chef/provider/script'
class Chef
class Resource
class Csh < Chef::Resource::Script
+ provides :csh
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/deploy.rb b/lib/chef/resource/deploy.rb
index 4252aa230f..55e3547b25 100644
--- a/lib/chef/resource/deploy.rb
+++ b/lib/chef/resource/deploy.rb
@@ -50,6 +50,7 @@ class Chef
# release directory. Callback files can contain chef code (resources, etc.)
#
class Deploy < Chef::Resource
+ provides :deploy
provider_base Chef::Provider::Deploy
diff --git a/lib/chef/resource/erl_call.rb b/lib/chef/resource/erl_call.rb
index 24009d51c7..75422c55a1 100644
--- a/lib/chef/resource/erl_call.rb
+++ b/lib/chef/resource/erl_call.rb
@@ -23,6 +23,7 @@ require 'chef/provider/erl_call'
class Chef
class Resource
class ErlCall < Chef::Resource
+ provides :erl_call
# erl_call : http://erlang.org/doc/man/erl_call.html
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index 9f8b629fb8..8fc97d748f 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -23,6 +23,7 @@ require 'chef/provider/execute'
class Chef
class Resource
class Execute < Chef::Resource
+ provides :execute
identity_attr :command
diff --git a/lib/chef/resource/http_request.rb b/lib/chef/resource/http_request.rb
index ccb0a26629..5986ebd4a0 100644
--- a/lib/chef/resource/http_request.rb
+++ b/lib/chef/resource/http_request.rb
@@ -23,6 +23,7 @@ require 'chef/provider/http_request'
class Chef
class Resource
class HttpRequest < Chef::Resource
+ provides :http_request
identity_attr :url
diff --git a/lib/chef/resource/ifconfig.rb b/lib/chef/resource/ifconfig.rb
index c289ddadbe..60feba1704 100644
--- a/lib/chef/resource/ifconfig.rb
+++ b/lib/chef/resource/ifconfig.rb
@@ -22,6 +22,7 @@ require 'chef/resource'
class Chef
class Resource
class Ifconfig < Chef::Resource
+ provides :ifconfig
identity_attr :device
@@ -145,5 +146,3 @@ class Chef
end
end
-
-
diff --git a/lib/chef/resource/log.rb b/lib/chef/resource/log.rb
index 7f970a87a4..87be01aaa9 100644
--- a/lib/chef/resource/log.rb
+++ b/lib/chef/resource/log.rb
@@ -23,6 +23,7 @@ require 'chef/provider/log'
class Chef
class Resource
class Log < Chef::Resource
+ provides :log
identity_attr :message
@@ -75,5 +76,3 @@ class Chef
end
end
end
-
-
diff --git a/lib/chef/resource/ohai.rb b/lib/chef/resource/ohai.rb
index b567db40f9..e2d12ce395 100644
--- a/lib/chef/resource/ohai.rb
+++ b/lib/chef/resource/ohai.rb
@@ -20,6 +20,7 @@
class Chef
class Resource
class Ohai < Chef::Resource
+ provides :ohai
identity_attr :name
diff --git a/lib/chef/resource/package.rb b/lib/chef/resource/package.rb
index f4f49b543b..5bea894a02 100644
--- a/lib/chef/resource/package.rb
+++ b/lib/chef/resource/package.rb
@@ -22,6 +22,7 @@ require 'chef/resource'
class Chef
class Resource
class Package < Chef::Resource
+ provides :package
identity_attr :package_name
diff --git a/lib/chef/resource/perl.rb b/lib/chef/resource/perl.rb
index c4bdb6e130..cb741d145a 100644
--- a/lib/chef/resource/perl.rb
+++ b/lib/chef/resource/perl.rb
@@ -22,6 +22,7 @@ require 'chef/provider/script'
class Chef
class Resource
class Perl < Chef::Resource::Script
+ provides :perl
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/portage_package.rb b/lib/chef/resource/portage_package.rb
index 42c03560b6..b03b69796a 100644
--- a/lib/chef/resource/portage_package.rb
+++ b/lib/chef/resource/portage_package.rb
@@ -21,6 +21,7 @@ require 'chef/resource/package'
class Chef
class Resource
class PortagePackage < Chef::Resource::Package
+ provides :portage_package
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/python.rb b/lib/chef/resource/python.rb
index b1f23d13ce..fffd4d75f6 100644
--- a/lib/chef/resource/python.rb
+++ b/lib/chef/resource/python.rb
@@ -21,6 +21,7 @@ require 'chef/provider/script'
class Chef
class Resource
class Python < Chef::Resource::Script
+ provides :python
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/reboot.rb b/lib/chef/resource/reboot.rb
index c111b23d2e..7cd53450ed 100644
--- a/lib/chef/resource/reboot.rb
+++ b/lib/chef/resource/reboot.rb
@@ -24,6 +24,8 @@ require 'chef/resource'
class Chef
class Resource
class Reboot < Chef::Resource
+ provides :reboot
+
def initialize(name, run_context=nil)
super
@resource_name = :reboot
diff --git a/lib/chef/resource/registry_key.rb b/lib/chef/resource/registry_key.rb
index 8126ccf126..cc8d05dd53 100644
--- a/lib/chef/resource/registry_key.rb
+++ b/lib/chef/resource/registry_key.rb
@@ -22,6 +22,7 @@ require 'chef/digester'
class Chef
class Resource
class RegistryKey < Chef::Resource
+ provides :registry_key
identity_attr :key
state_attrs :values
diff --git a/lib/chef/resource/route.rb b/lib/chef/resource/route.rb
index 942905d138..8f9172060b 100644
--- a/lib/chef/resource/route.rb
+++ b/lib/chef/resource/route.rb
@@ -22,6 +22,7 @@ require 'chef/resource'
class Chef
class Resource
class Route < Chef::Resource
+ provides :route
identity_attr :target
@@ -136,5 +137,3 @@ class Chef
end
end
end
-
-
diff --git a/lib/chef/resource/ruby.rb b/lib/chef/resource/ruby.rb
index 2b2aa0249d..2b7644562a 100644
--- a/lib/chef/resource/ruby.rb
+++ b/lib/chef/resource/ruby.rb
@@ -22,6 +22,7 @@ require 'chef/provider/script'
class Chef
class Resource
class Ruby < Chef::Resource::Script
+ provides :ruby
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/ruby_block.rb b/lib/chef/resource/ruby_block.rb
index a9cbf234cf..07eec5599d 100644
--- a/lib/chef/resource/ruby_block.rb
+++ b/lib/chef/resource/ruby_block.rb
@@ -23,6 +23,7 @@ require 'chef/provider/ruby_block'
class Chef
class Resource
class RubyBlock < Chef::Resource
+ provides :ruby_block
identity_attr :block_name
diff --git a/lib/chef/resource/scm.rb b/lib/chef/resource/scm.rb
index 87c217b4cc..d41764d595 100644
--- a/lib/chef/resource/scm.rb
+++ b/lib/chef/resource/scm.rb
@@ -22,6 +22,7 @@ require 'chef/resource'
class Chef
class Resource
class Scm < Chef::Resource
+ provides :scm
identity_attr :destination
diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb
index fd0fd5a7fd..e2fbb29d0f 100644
--- a/lib/chef/resource/script.rb
+++ b/lib/chef/resource/script.rb
@@ -23,6 +23,7 @@ require 'chef/provider/script'
class Chef
class Resource
class Script < Chef::Resource::Execute
+ provides :script
# Chef-13: go back to using :name as the identity attr
identity_attr :command
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 36df7c859a..47d2ab9e12 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -22,6 +22,7 @@ require 'chef/resource'
class Chef
class Resource
class Service < Chef::Resource
+ provides :service
identity_attr :service_name
diff --git a/lib/chef/resource/subversion.rb b/lib/chef/resource/subversion.rb
index 3afbe0baaf..e5a2e9d1a5 100644
--- a/lib/chef/resource/subversion.rb
+++ b/lib/chef/resource/subversion.rb
@@ -22,6 +22,7 @@ require "chef/resource/scm"
class Chef
class Resource
class Subversion < Chef::Resource::Scm
+ provides :subversion
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/whyrun_safe_ruby_block.rb b/lib/chef/resource/whyrun_safe_ruby_block.rb
index 6fa5383f5d..f512dc67fc 100644
--- a/lib/chef/resource/whyrun_safe_ruby_block.rb
+++ b/lib/chef/resource/whyrun_safe_ruby_block.rb
@@ -19,6 +19,7 @@
class Chef
class Resource
class WhyrunSafeRubyBlock < Chef::Resource::RubyBlock
+ provides :whyrun_safe_ruby_block
def initialize(name, run_context=nil)
super
diff --git a/lib/chef/resource/windows_script.rb b/lib/chef/resource/windows_script.rb
index 6b0827b77c..1af7a48fe4 100644
--- a/lib/chef/resource/windows_script.rb
+++ b/lib/chef/resource/windows_script.rb
@@ -22,6 +22,7 @@ require 'chef/mixin/windows_architecture_helper'
class Chef
class Resource
class WindowsScript < Chef::Resource::Script
+ # This is an abstract resource meant to be subclasses; thus no 'provides'
set_guard_inherited_attributes(:architecture)