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:



6
7
8
9
10
# File 'service/objects/records.rb', line 6

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id



3
4
5
# File 'service/objects/records.rb', line 3

def id
  @id
end

#recordsObject (readonly)

Returns the value of attribute records



3
4
5
# File 'service/objects/records.rb', line 3

def records
  @records
end