class Cumulus::CloudFront::CustomOriginDiff
Public: Represents a single difference between local configuration and AWS configuration of zones.
Attributes
ssl_protocol_changes[RW]
Public Class Methods
ssl_protocols(changes, aws, local)
click to toggle source
Public: Static method that produces a diff representing changes in ssl protocols
changes - the OriginSslProtocolsDiffs aws - the aws configuration for the custom origin local - the local configuration for the custom origin
Returns the diff containing those changes
# File lib/cloudfront/models/CustomOriginDiff.rb, line 31 def self.ssl_protocols(changes, aws, local) diff = CustomOriginDiff.new(SSL_PROTOCOLS, aws, local) diff.ssl_protocol_changes = changes diff end
Public Instance Methods
aws_name()
click to toggle source
# File lib/cloudfront/models/CustomOriginDiff.rb, line 67 def aws_name @aws.id end
diff_string()
click to toggle source
# File lib/cloudfront/models/CustomOriginDiff.rb, line 37 def diff_string case @type when HTTP [ "http port:", Colors.aws_changes("\tAWS - #{@aws}"), Colors.local_changes("\tLocal - #{@local}"), ].join("\n") when HTTPS [ "https port:", Colors.aws_changes("\tAWS - #{@aws}"), Colors.local_changes("\tLocal - #{@local}"), ].join("\n") when POLICY [ "protocol policy:", Colors.aws_changes("\tAWS - #{@aws}"), Colors.local_changes("\tLocal - #{@local}"), ].join("\n") when SSL_PROTOCOLS [ "origin ssl protocols:", (@ssl_protocol_changes.flat_map do |c| c.to_s.lines.map { |l| "\t#{l.chomp}" } end).join("\n"), ].join("\n") end end