Class: Cumulus::VPC::SubnetDiff
- Inherits:
-
Common::Diff
- Object
- Common::Diff
- Cumulus::VPC::SubnetDiff
- Includes:
- Common::TagsDiff, SubnetChange
- Defined in:
- lib/vpc/models/SubnetDiff.rb
Overview
Public: Represents a single difference between local configuration and AWS configuration
Constant Summary
Constants included from SubnetChange
Cumulus::VPC::SubnetChange::AZ, Cumulus::VPC::SubnetChange::CIDR, Cumulus::VPC::SubnetChange::NETWORK_ACL, Cumulus::VPC::SubnetChange::PUBLIC, Cumulus::VPC::SubnetChange::ROUTE_TABLE, Cumulus::VPC::SubnetChange::TAGS
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
- #asset_type ⇒ Object
- #aws_name ⇒ Object
- #aws_tags ⇒ Object
- #diff_string ⇒ Object
- #local_tags ⇒ Object
Methods included from Common::TagsDiff
#tags_diff_string, #tags_to_add, #tags_to_remove
Methods included from Common::DiffChange
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_type ⇒ Object
32 33 34 |
# File 'lib/vpc/models/SubnetDiff.rb', line 32 def asset_type "Subnet" end |
#aws_name ⇒ Object
36 37 38 |
# File 'lib/vpc/models/SubnetDiff.rb', line 36 def aws_name @aws.name end |
#aws_tags ⇒ Object
28 29 30 |
# File 'lib/vpc/models/SubnetDiff.rb', line 28 def @aws end |
#diff_string ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vpc/models/SubnetDiff.rb', line 40 def diff_string case @type when CIDR [ "CIDR Block:", Colors.aws_changes("\tAWS - #{aws}"), Colors.local_changes("\tLocal - #{local}"), ].join("\n") when PUBLIC [ "Map Public Ip:", Colors.aws_changes("\tAWS - #{aws}"), Colors.local_changes("\tLocal - #{local}"), ].join("\n") when ROUTE_TABLE [ "Route Table:", Colors.aws_changes("\tAWS - #{aws}"), Colors.local_changes("\tLocal - #{local}"), ].join("\n") when NETWORK_ACL [ "Network ACL:", Colors.aws_changes("\tAWS - #{aws}"), Colors.local_changes("\tLocal - #{local}"), ].join("\n") when AZ [ "Availability Zone:", Colors.aws_changes("\tAWS - #{aws}"), Colors.local_changes("\tLocal - #{local}"), ].join("\n") when TAGS end end |
#local_tags ⇒ Object
24 25 26 |
# File 'lib/vpc/models/SubnetDiff.rb', line 24 def @local end |