summaryrefslogtreecommitdiff
path: root/lib/chef/resource/service.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-05-27 16:06:53 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-01 13:21:21 -0700
commit236570dc9605ac312b44508b1c3a6a0e7c19b4dc (patch)
tree966a79db0d03021e2ed0e5a9ba2bf5073fff153c /lib/chef/resource/service.rb
parent02e8874637dd661b5aaf656a5c2d6fbbb5795619 (diff)
downloadchef-236570dc9605ac312b44508b1c3a6a0e7c19b4dc.tar.gz
Add default_action and allowed_actions to Resource class, remove from LWRP
Diffstat (limited to 'lib/chef/resource/service.rb')
-rw-r--r--lib/chef/resource/service.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 6ef203db3b..9995eccb3f 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -28,6 +28,9 @@ class Chef
state_attrs :enabled, :running
+ default_action :nothing
+ allowed_actions :enable, :disable, :start, :stop, :restart, :reload
+
def initialize(name, run_context=nil)
super
@service_name = name
@@ -43,9 +46,7 @@ class Chef
@init_command = nil
@priority = nil
@timeout = nil
- @action = "nothing"
@supports = { :restart => false, :reload => false, :status => false }
- @allowed_actions.push(:enable, :disable, :start, :stop, :restart, :reload)
end
def service_name(arg=nil)