Class: OpenNebula::Records

Inherits:
Object
  • Object
show all
Defined in:
service/objects/records.rb,
service/records.rb

Overview

States and Notifications records object(linked to VM)

Defined Under Namespace

Classes: NoRecordsError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Records

Returns a new instance of Records.

Parameters:

  • id (Fixnum)
    • VM ID

Raises:



21
22
23
24
25
# File 'service/objects/records.rb', line 21

def initialize id
    @id = id
    @records = Record.where(id:id).all # Getting records from DB[table :settings]
    raise NoRecordsError if @records.empty?
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



18
19
20
# File 'service/objects/records.rb', line 18

def id
  @id
end

#recordsObject (readonly)

Returns the value of attribute records.



18
19
20
# File 'service/objects/records.rb', line 18

def records
  @records
end