Class: OpenStack::Volume::Snapshot

Inherits:
Object
  • Object
show all
Defined in:
lib/openstack/volume/snapshot.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(snap_info) ⇒ Snapshot

Returns a new instance of Snapshot.



13
14
15
16
17
18
19
20
21
# File 'lib/openstack/volume/snapshot.rb', line 13

def initialize(snap_info)
  @id = snap_info["id"]
  @display_name = snap_info["display_name"] || snap_info["displayName"]
  @display_description = snap_info["display_description"] || snap_info["displayDescription"]
  @volume_id = snap_info["volume_id"] || snap_info["volumeId"]
  @status = snap_info["status"]
  @size  = snap_info["size"]
  @created_at = snap_info["created_at"] || snap_info["createdAt"]
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



11
12
13
# File 'lib/openstack/volume/snapshot.rb', line 11

def created_at
  @created_at
end

#display_descriptionObject (readonly)

Returns the value of attribute display_description.



7
8
9
# File 'lib/openstack/volume/snapshot.rb', line 7

def display_description
  @display_description
end

#display_nameObject (readonly)

Returns the value of attribute display_name.



6
7
8
# File 'lib/openstack/volume/snapshot.rb', line 6

def display_name
  @display_name
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/openstack/volume/snapshot.rb', line 5

def id
  @id
end

#sizeObject (readonly)

Returns the value of attribute size.



10
11
12
# File 'lib/openstack/volume/snapshot.rb', line 10

def size
  @size
end

#statusObject (readonly)

Returns the value of attribute status.



9
10
11
# File 'lib/openstack/volume/snapshot.rb', line 9

def status
  @status
end

#volume_idObject (readonly)

Returns the value of attribute volume_id.



8
9
10
# File 'lib/openstack/volume/snapshot.rb', line 8

def volume_id
  @volume_id
end