Class: Cumulus::ELB::AccessLogDiff

Inherits:
Common::Diff show all
Includes:
AccessLogChange
Defined in:
lib/elb/models/AccessLogDiff.rb

Overview

Public: Represents a single difference between local configuration and an AWS Load Balancer Access Log.

Constant Summary

Constants included from AccessLogChange

Cumulus::ELB::AccessLogChange::BUCKET, Cumulus::ELB::AccessLogChange::EMIT, Cumulus::ELB::AccessLogChange::ENABLED, Cumulus::ELB::AccessLogChange::PREFIX

Constants included from Common::DiffChange

Common::DiffChange::ADD, Common::DiffChange::MODIFIED, Common::DiffChange::UNMANAGED

Instance Attribute Summary

Attributes inherited from Common::Diff

#aws, #changes, #info_only, #local, #type

Instance Method Summary collapse

Methods included from Common::DiffChange

next_change_id

Methods inherited from Common::Diff

#add_string, added, #initialize, #local_name, modified, #to_s, unmanaged, #unmanaged_string

Constructor Details

This class inherits a constructor from Cumulus::Common::Diff

Instance Method Details

#asset_typeObject



21
22
23
# File 'lib/elb/models/AccessLogDiff.rb', line 21

def asset_type
  "Access Log Config"
end

#change_stringObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/elb/models/AccessLogDiff.rb', line 25

def change_string
  case @type
  when ENABLED
    "enabled:"
  when BUCKET
    "S3 bucket:"
  when EMIT
    "emit interval:"
  when PREFIX
    "bucket prefix:"
  end
end

#diff_stringObject



38
39
40
41
42
43
44
# File 'lib/elb/models/AccessLogDiff.rb', line 38

def diff_string
  [
    change_string,
    Colors.aws_changes("\tAWS - #{aws}"),
    Colors.local_changes("\tLocal - #{local}"),
  ].join("\n")
end