Class: ProxyAPI::ForemanChef::ChefProxy
- Inherits:
-
Object
- Object
- ProxyAPI::ForemanChef::ChefProxy
- Defined in:
- app/lib/proxy_api/foreman_chef/chef_proxy.rb
Defined Under Namespace
Constant Summary collapse
- PREFIX =
'chef'
Instance Method Summary collapse
-
#delete_client(key) ⇒ Object
Deletes a Chef Client entry [
key
] : String containing the hostname Returns : Boolean status. -
#delete_node(key) ⇒ Object
Deletes a Chef Node entry [
key
] : String containing the hostname Returns : Boolean status. -
#initialize(args) ⇒ ChefProxy
constructor
A new instance of ChefProxy.
-
#show_client(key) ⇒ Object
Shows a Chef Client entry [
key
] : String containing the hostname Returns : Hash representation of host on chef server. -
#show_node(key) ⇒ Object
Shows a Chef Node entry [
key
] : String containing the hostname Returns : Hash representation of host on chef server.
Constructor Details
#initialize(args) ⇒ ChefProxy
Returns a new instance of ChefProxy.
20 21 22 |
# File 'app/lib/proxy_api/foreman_chef/chef_proxy.rb', line 20 def initialize(args) @args = args end |
Instance Method Details
#delete_client(key) ⇒ Object
Deletes a Chef Client entry
key
-
: String containing the hostname
Returns : Boolean status
48 49 50 |
# File 'app/lib/proxy_api/foreman_chef/chef_proxy.rb', line 48 def delete_client(key) Client.new(@args).send(:delete, key) end |
#delete_node(key) ⇒ Object
Deletes a Chef Node entry
key
-
: String containing the hostname
Returns : Boolean status
34 35 36 |
# File 'app/lib/proxy_api/foreman_chef/chef_proxy.rb', line 34 def delete_node(key) Node.new(@args).send(:delete, key) end |