class Cumulus::Route53::RecordDiff
Public: Represents differences between local configuration and AWS configuration for records.
Attributes
changes[RW]
message[RW]
Public Class Methods
changed(changes, local)
click to toggle source
Public: Static method that will create a diff that contains a bunch of singular changes.
changes - the changes for the record local - the local configuration for the record
Returns the diff
# File lib/route53/models/RecordDiff.rb, line 61 def self.changed(changes, local) diff = RecordDiff.new(CHANGED, nil, local) diff.changes = changes diff end
default(message, aws)
click to toggle source
Public: Static method that will create a diff that contains a message but is ignored when syncing because it is a default record.
message - the message to display aws - the aws configuration for the record
Returns the diff
# File lib/route53/models/RecordDiff.rb, line 34 def self.default(message, aws) diff = RecordDiff.new(DEFAULT, aws) diff.message = message diff end
ignored(message, aws)
click to toggle source
Public: Static method that will create a diff that contains a message but is ignored when syncing.
message - the message to display aws - the aws configuration for the record
Returns the diff
# File lib/route53/models/RecordDiff.rb, line 47 def self.ignored(message, aws) diff = RecordDiff.new(IGNORED, aws) diff.message = message diff.info_only = true diff end
Public Instance Methods
asset_type()
click to toggle source
# File lib/route53/models/RecordDiff.rb, line 67 def asset_type "Record" end
aws_name()
click to toggle source
# File lib/route53/models/RecordDiff.rb, line 71 def aws_name "(#{@aws.type}) #{@aws.name}" end
diff_string()
click to toggle source
# File lib/route53/models/RecordDiff.rb, line 79 def diff_string case @type when IGNORED message when DEFAULT message when CHANGED [ "Record #{local_name}:", changes.map { |c| "\t\t#{c}" } ].flatten.join("\n") end end
local_name()
click to toggle source
# File lib/route53/models/RecordDiff.rb, line 75 def local_name @local.readable_name end