Class: Chef::Knife::WsmanEndpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/knife/helpers/wsman_endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, port, url) ⇒ WsmanEndpoint

Returns a new instance of WsmanEndpoint.



31
32
33
34
35
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 31

def initialize(name, port, url)
  @host = name
  @wsman_port = port
  @wsman_url = url
end

Instance Attribute Details

#error_messageObject

Returns the value of attribute error_message.



29
30
31
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 29

def error_message
  @error_message
end

#hostObject

Returns the value of attribute host.



22
23
24
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 22

def host
  @host
end

#product_vendorObject

Returns the value of attribute product_vendor.



27
28
29
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 27

def product_vendor
  @product_vendor
end

#product_versionObject

Returns the value of attribute product_version.



25
26
27
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 25

def product_version
  @product_version
end

#protocol_versionObject

Returns the value of attribute protocol_version.



26
27
28
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 26

def protocol_version
  @protocol_version
end

#response_status_codeObject

Returns the value of attribute response_status_code.



28
29
30
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 28

def response_status_code
  @response_status_code
end

#wsman_portObject

Returns the value of attribute wsman_port.



23
24
25
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 23

def wsman_port
  @wsman_port
end

#wsman_urlObject

Returns the value of attribute wsman_url.



24
25
26
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 24

def wsman_url
  @wsman_url
end

Instance Method Details

#to_hashObject



37
38
39
40
41
# File 'lib/chef/knife/helpers/wsman_endpoint.rb', line 37

def to_hash
  hash = {}
  instance_variables.each { |var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
  hash
end