Class: Cumulus::VPC::RouteDiff
- Inherits:
-
Common::Diff
- Object
- Common::Diff
- Cumulus::VPC::RouteDiff
- Includes:
- RouteChange
- Defined in:
- lib/vpc/models/RouteDiff.rb
Overview
Public: Represents a single difference between local configuration AWS configuration
Constant Summary
Constants included from RouteChange
Cumulus::VPC::RouteChange::GATEWAY, Cumulus::VPC::RouteChange::NAT_GATEWAY, Cumulus::VPC::RouteChange::NETWORK, Cumulus::VPC::RouteChange::VPC_PEERING
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
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
21 22 23 |
# File 'lib/vpc/models/RouteDiff.rb', line 21 def asset_type "Route" end |
#aws_name ⇒ Object
25 26 27 |
# File 'lib/vpc/models/RouteDiff.rb', line 25 def aws_name @aws.destination_cidr_block end |
#diff_string ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/vpc/models/RouteDiff.rb', line 29 def diff_string resource = case @type when GATEWAY "Gateway" when NETWORK "Network Interface" when VPC_PEERING "VPC Peering Connection" when NAT_GATEWAY "NAT Gateway" end [ "#{resource}:", Colors.aws_changes("\tAWS - #{aws}"), Colors.local_changes("\tLocal - #{local}"), ].join("\n") end |