Class: Umami::Client
- Inherits:
-
Object
- Object
- Umami::Client
- Defined in:
- lib/chef-umami/client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#compile ⇒ Object
Execute the compile phase of a Chef client run.
-
#initialize ⇒ Client
constructor
A new instance of Client.
-
#prep ⇒ Object
Perform the steps required prior to compiling resources, including running Ohai and building up the node object.
-
#resource_collection ⇒ Object
TODO: This can only be called after #prep completes successfully.
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
21 22 23 |
# File 'lib/chef-umami/client.rb', line 21 def initialize @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
20 21 22 |
# File 'lib/chef-umami/client.rb', line 20 def client @client end |
Instance Method Details
#compile ⇒ Object
Execute the compile phase of a Chef client run.
38 39 40 41 |
# File 'lib/chef-umami/client.rb', line 38 def compile prep client.setup_run_context end |
#prep ⇒ Object
Perform the steps required prior to compiling resources, including running Ohai and building up the node object.
31 32 33 34 35 |
# File 'lib/chef-umami/client.rb', line 31 def prep client.run_ohai client.load_node # from the server client.build_node end |
#resource_collection ⇒ Object
TODO: This can only be called after #prep completes successfully. Add some check to determine if the client is actually prepped.
45 46 47 |
# File 'lib/chef-umami/client.rb', line 45 def resource_collection client.run_status.run_context.resource_collection end |