Class: Shell::ShellSession
- Inherits:
-
Object
- Object
- Shell::ShellSession
show all
- Includes:
- Singleton
- Defined in:
- lib/chef/shell/shell_session.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ShellSession.
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
42
43
44
|
# File 'lib/chef/shell/shell_session.rb', line 42
def client
@client
end
|
#compile ⇒ Object
Returns the value of attribute compile.
41
42
43
|
# File 'lib/chef/shell/shell_session.rb', line 41
def compile
@compile
end
|
#json_configuration ⇒ Object
Returns the value of attribute json_configuration.
41
42
43
|
# File 'lib/chef/shell/shell_session.rb', line 41
def json_configuration
@json_configuration
end
|
#node ⇒ Object
Returns the value of attribute node.
41
42
43
|
# File 'lib/chef/shell/shell_session.rb', line 41
def node
@node
end
|
#node_attributes ⇒ Object
Returns the value of attribute node_attributes.
42
43
44
|
# File 'lib/chef/shell/shell_session.rb', line 42
def node_attributes
@node_attributes
end
|
#recipe ⇒ Object
Returns the value of attribute recipe.
41
42
43
|
# File 'lib/chef/shell/shell_session.rb', line 41
def recipe
@recipe
end
|
#run_context ⇒ Object
77
78
79
|
# File 'lib/chef/shell/shell_session.rb', line 77
def run_context
@run_context ||= rebuild_context
end
|
Class Method Details
.inspect ⇒ Object
rubocop:disable Lint/NestedMethodDefinition
130
131
132
|
# File 'lib/chef/shell/shell_session.rb', line 130
def @node.inspect "<Chef::Node:0x#{object_id.to_s(16)} @name=\"#{name}\">"
end
|
.session_type(type = nil) ⇒ Object
36
37
38
39
|
# File 'lib/chef/shell/shell_session.rb', line 36
def self.session_type(type = nil)
@session_type = type if type
@session_type
end
|
Instance Method Details
#cookbook_loader ⇒ Object
85
86
87
|
# File 'lib/chef/shell/shell_session.rb', line 85
def cookbook_loader
nil
end
|
#definitions ⇒ Object
81
82
83
|
# File 'lib/chef/shell/shell_session.rb', line 81
def definitions
nil
end
|
#node_built? ⇒ Boolean
49
50
51
|
# File 'lib/chef/shell/shell_session.rb', line 49
def node_built?
!!@node_built
end
|
#rebuild_context ⇒ Object
93
94
95
|
# File 'lib/chef/shell/shell_session.rb', line 93
def rebuild_context
raise "Not Implemented! :rebuild_collection should be implemented by subclasses"
end
|
#resource_collection ⇒ Object
72
73
74
|
# File 'lib/chef/shell/shell_session.rb', line 72
def resource_collection
run_context.resource_collection
end
|
#save_node ⇒ Object
89
90
91
|
# File 'lib/chef/shell/shell_session.rb', line 89
def save_node
raise "Not Supported! #{self.class.name} doesn't support #save_node, maybe you need to run chef-shell in client mode?"
end
|