Class: MMS::Resource::SnapshotSchedule
- Inherits:
-
MMS::Resource
- Object
- MMS::Resource
- MMS::Resource::SnapshotSchedule
- Defined in:
- lib/mms/resource/snapshot_schedule.rb
Instance Attribute Summary collapse
-
#cluster_checkpoint_interval_min ⇒ Object
Returns the value of attribute cluster_checkpoint_interval_min.
-
#daily_snapshot_retention_days ⇒ Object
Returns the value of attribute daily_snapshot_retention_days.
-
#monthly_snapshot_retention_months ⇒ Object
Returns the value of attribute monthly_snapshot_retention_months.
-
#name ⇒ Object
Returns the value of attribute name.
-
#snapshot_interval_hours ⇒ Object
Returns the value of attribute snapshot_interval_hours.
-
#snapshot_retention_days ⇒ Object
Returns the value of attribute snapshot_retention_days.
-
#weekly_snapshot_retention_weeks ⇒ Object
Returns the value of attribute weekly_snapshot_retention_weeks.
Attributes inherited from MMS::Resource
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from MMS::Resource
#_load, find, #from_hash, #invalidate_cache, #set_client, #set_data, #to_hash
Instance Attribute Details
#cluster_checkpoint_interval_min ⇒ Object
Returns the value of attribute cluster_checkpoint_interval_min.
9 10 11 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 9 def cluster_checkpoint_interval_min @cluster_checkpoint_interval_min end |
#daily_snapshot_retention_days ⇒ Object
Returns the value of attribute daily_snapshot_retention_days.
10 11 12 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 10 def daily_snapshot_retention_days @daily_snapshot_retention_days end |
#monthly_snapshot_retention_months ⇒ Object
Returns the value of attribute monthly_snapshot_retention_months.
12 13 14 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 12 def monthly_snapshot_retention_months @monthly_snapshot_retention_months end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 5 def name @name end |
#snapshot_interval_hours ⇒ Object
Returns the value of attribute snapshot_interval_hours.
7 8 9 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 7 def snapshot_interval_hours @snapshot_interval_hours end |
#snapshot_retention_days ⇒ Object
Returns the value of attribute snapshot_retention_days.
8 9 10 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 8 def snapshot_retention_days @snapshot_retention_days end |
#weekly_snapshot_retention_weeks ⇒ Object
Returns the value of attribute weekly_snapshot_retention_weeks.
11 12 13 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 11 def weekly_snapshot_retention_weeks @weekly_snapshot_retention_weeks end |
Class Method Details
._find(client, group_id, cluster_id) ⇒ Object
40 41 42 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 40 def self._find(client, group_id, cluster_id) client.get('/groups/' + group_id + '/backupConfigs/' + cluster_id + '/snapshotSchedule') end |
.table_header ⇒ Object
36 37 38 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 36 def self.table_header ['Group', 'Cluster', 'IntervalHours', 'RetentionDays', 'CheckpointIntervalMin', 'RetentionDays', 'RetentionWeeks', 'RetentionMonths'] end |
Instance Method Details
#cluster ⇒ MMS::Resource::Cluster
15 16 17 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 15 def cluster MMS::Resource::Cluster.find(@client, @data['groupId'], @data['clusterId']) end |
#table_row ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 19 def table_row [ cluster.group.name, cluster.name, @snapshot_interval_hours, @snapshot_retention_days, @cluster_checkpoint_interval_min, @daily_snapshot_retention_days, @weekly_snapshot_retention_weeks, @monthly_snapshot_retention_months, ] end |
#table_section ⇒ Object
32 33 34 |
# File 'lib/mms/resource/snapshot_schedule.rb', line 32 def table_section [table_row] end |