Class: Cobbler::System

Inherits:
Base
  • Object
show all
Defined in:
lib/cobbler/system.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #remove, #save

Methods included from Common::Finders

included

Methods included from Common::Lifecycle

#api_methods, #cobbler_collections_store_callbacks, #cobbler_record_fields, #definitions, included, #locked_fields, #user_definitions

Methods included from Connection::Common

included

Methods included from Connection::Handling

included

Methods included from Common::Debug

#debug, included

Constructor Details

This class inherits a constructor from Cobbler::Base

Instance Method Details

#store_interfaces(sysid, token) ⇒ Object



35
36
37
38
39
40
41
42
43
# File 'lib/cobbler/system.rb', line 35

def store_interfaces(sysid,token)
    interfaces.each do |interface,values|
        values2store = values.keys.inject({}) do |result,member|
            result["#{member.to_s.gsub(/_/,'')}-#{interface}"] = values[member] if values[member]
            result
        end
        self.class.make_call('modify_system',sysid,'modify_interface',values2store,token) unless values2store.empty?
    end
end