class MMS::Resource::SnapshotSchedule
Attributes
cluster_checkpoint_interval_min[RW]
daily_snapshot_retention_days[RW]
monthly_snapshot_retention_months[RW]
name[RW]
snapshot_interval_hours[RW]
snapshot_retention_days[RW]
weekly_snapshot_retention_weeks[RW]
Public Class Methods
_find(client, group_id, cluster_id)
click to toggle source
# File lib/mms/resource/snapshot_schedule.rb, line 38 def self._find(client, group_id, cluster_id) client.get('/groups/' + group_id + '/backupConfigs/' + cluster_id + '/snapshotSchedule') end
table_header()
click to toggle source
# File lib/mms/resource/snapshot_schedule.rb, line 34 def self.table_header %w(Group Cluster IntervalHours RetentionDays CheckpointIntervalMin RetentionDays RetentionWeeks RetentionMonths) end
Public Instance Methods
cluster()
click to toggle source
@return [MMS::Resource::Cluster]
# File lib/mms/resource/snapshot_schedule.rb, line 13 def cluster MMS::Resource::Cluster.find(@client, @data['groupId'], @data['clusterId']) end
table_row()
click to toggle source
# File lib/mms/resource/snapshot_schedule.rb, line 17 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()
click to toggle source
# File lib/mms/resource/snapshot_schedule.rb, line 30 def table_section [table_row] end
Private Instance Methods
_from_hash(data)
click to toggle source
# File lib/mms/resource/snapshot_schedule.rb, line 44 def _from_hash(data) @snapshot_interval_hours = data['snapshotIntervalHours'] @snapshot_retention_days = data['snapshotRetentionDays'] @cluster_checkpoint_interval_min = data['clusterCheckpointIntervalMin'] @daily_snapshot_retention_days = data['dailySnapshotRetentionDays'] @weekly_snapshot_retention_weeks = data['weeklySnapshotRetentionWeeks'] @monthly_snapshot_retention_months = data['monthlySnapshotRetentionMonths'] end
_to_hash()
click to toggle source
# File lib/mms/resource/snapshot_schedule.rb, line 53 def _to_hash @data end