Class: Cumulus::S3::DefaultEncryptionDiff

Inherits:
Common::Diff show all
Includes:
DefaultEncryptionChange
Defined in:
lib/s3/models/DefaultEncryptionDiff.rb

Constant Summary

Constants included from DefaultEncryptionChange

Cumulus::S3::DefaultEncryptionChange::ALGORITHM, Cumulus::S3::DefaultEncryptionChange::KMS_KEY

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, modified, #to_s, unmanaged, #unmanaged_string

Constructor Details

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

Instance Method Details

#asset_typeObject



16
17
18
# File 'lib/s3/models/DefaultEncryptionDiff.rb', line 16

def asset_type
  "S3 Default Encryption"
end

#aws_nameObject



20
21
22
# File 'lib/s3/models/DefaultEncryptionDiff.rb', line 20

def aws_name
  "Configuration"
end

#diff_stringObject



28
29
30
31
32
33
34
35
# File 'lib/s3/models/DefaultEncryptionDiff.rb', line 28

def diff_string
  case @type
  when ALGORITHM
    "Algorithm: AWS - #{Colors.aws_changes(@aws.algorithm)}, Local - #{Colors.local_changes(@local.algorithm)}"
  when KMS_KEY
    "KMS key id: AWS -#{Colors.aws_changes(@aws.kms_master_key_id)}, Local - #{Colors.local_changes(@local.kms_master_key_id)}"
  end
end

#local_nameObject



24
25
26
# File 'lib/s3/models/DefaultEncryptionDiff.rb', line 24

def local_name
  "Configuration"
end