Class: Aebus::VolumeStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/aebus/volume_status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(volume_id) ⇒ VolumeStatus

Returns a new instance of VolumeStatus.



7
8
9
# File 'lib/aebus/volume_status.rb', line 7

def initialize(volume_id)
   @id = volume_id
end

Instance Attribute Details

#delayObject

Returns the value of attribute delay.



5
6
7
# File 'lib/aebus/volume_status.rb', line 5

def delay
  @delay
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/aebus/volume_status.rb', line 5

def id
  @id
end

#last_backupObject

Returns the value of attribute last_backup.



5
6
7
# File 'lib/aebus/volume_status.rb', line 5

def last_backup
  @last_backup
end

#next_backupObject

Returns the value of attribute next_backup.



5
6
7
# File 'lib/aebus/volume_status.rb', line 5

def next_backup
  @next_backup
end

#purgeable_snapshot_idsObject

Returns the value of attribute purgeable_snapshot_ids.



5
6
7
# File 'lib/aebus/volume_status.rb', line 5

def purgeable_snapshot_ids
  @purgeable_snapshot_ids
end

#tagsObject

Returns the value of attribute tags.



5
6
7
# File 'lib/aebus/volume_status.rb', line 5

def tags
  @tags
end

Instance Method Details

#needs_backup?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/aebus/volume_status.rb', line 11

def needs_backup?
  (!@tags.nil? && (@tags.count > 0))
end

#to_sObject



15
16
17
18
19
# File 'lib/aebus/volume_status.rb', line 15

def to_s
  "Volume: id => #{id}, :last_backup => #{last_backup}, next_backup=> #{next_backup}, needs_backup? => #{needs_backup?}, delay => #{delay}, tags => #{tags}, purgeable_snapshot => #{purgeable_snapshots}"


end