Class: Chef::Knife::RuleCreate
- Inherits:
-
ChefAnalytics::Knife
- Object
- ChefAnalytics::Knife
- Chef::Knife::RuleCreate
- Defined in:
- lib/chef/knife/rule_create.rb
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/chef/knife/rule_create.rb', line 36 def run validate_and_set_params @rest = ChefAnalytics::ServerAPI.new(analytics_server_url, fetch_token) headers = {"Content-Type" => "application/json"} response = @rest.post("/rules", File.read(name_args[0]), headers) output(response) end |