Method: OpenNebula::Hook#info

Defined in:
lib/opennebula/hook.rb

#infoObject Also known as: info!

Retrieves the information of the given Hook.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/opennebula/hook.rb', line 70

def info
    return Error.new('ID not defined') unless @pe_id

    rc = @client.call(HOOK_METHODS[:info], @pe_id, false)

    if !OpenNebula.is_error?(rc)
        initialize_xml(rc, 'HOOK')
        rc = nil

        @pe_id = self['ID'].to_i if self['ID']
        @name  = self['NAME'] if self['NAME']
    end

    rc
end