Class: Spacewalk::SystemId

Inherits:
Object
  • Object
show all
Defined in:
lib/spacewalk/system_id.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, config) ⇒ SystemId

Returns a new instance of SystemId.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/spacewalk/system_id.rb', line 4

def initialize client, config
  raise "Expecting a Spacewalk::Config parameter to #{self.class}.new" unless config.is_a?(Spacewalk::Config)
  @path = config["systemIdPath"]
  raise "systemIdPath is empty !" unless @path
  # <params>
  #   <param>
  #     <value>
  #       <struct>
  #         <member>
  #           <name>username</name>
  #           <value><string>admin</string></value>
  #         </member>
  File.open(@path) do |f|
	@raw = f.read
	@members = client.get_parser.parseMethodResponse(@raw)
  end
  puts "SystemId => #{@members.inspect}"
end

Instance Method Details

#to_xmlObject



22
23
24
# File 'lib/spacewalk/system_id.rb', line 22

def to_xml
  @raw
end