Class: Pangea::Kubernetes::Architecture::NetworkResult

Inherits:
Contracts::NetworkResult
  • Object
show all
Defined in:
lib/pangea/kubernetes/architecture.rb

Overview

AWS-specific NetworkResult — extends the base contract with AWS fields. is_a?(Pangea::Contracts::NetworkResult) returns true.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNetworkResult

Returns a new instance of NetworkResult.



128
129
130
131
132
133
134
135
136
137
138
# File 'lib/pangea/kubernetes/architecture.rb', line 128

def initialize
  super
  @igw = nil
  @route_table = nil
  @etcd_bucket = nil
  @flow_log = nil
  @flow_log_role = nil
  @ssm_logs_bucket = nil
  @kms_key = nil
  @persistent_state_volume = nil
end

Instance Attribute Details

#etcd_bucketObject

Returns the value of attribute etcd_bucket.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def etcd_bucket
  @etcd_bucket
end

#flow_logObject

Returns the value of attribute flow_log.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def flow_log
  @flow_log
end

#flow_log_roleObject

Returns the value of attribute flow_log_role.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def flow_log_role
  @flow_log_role
end

#igwObject

Returns the value of attribute igw.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def igw
  @igw
end

#kms_keyObject

Returns the value of attribute kms_key.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def kms_key
  @kms_key
end

#persistent_state_volumeObject

Returns the value of attribute persistent_state_volume.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def persistent_state_volume
  @persistent_state_volume
end

#route_tableObject

Returns the value of attribute route_table.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def route_table
  @route_table
end

#ssm_logs_bucketObject

Returns the value of attribute ssm_logs_bucket.



122
123
124
# File 'lib/pangea/kubernetes/architecture.rb', line 122

def ssm_logs_bucket
  @ssm_logs_bucket
end

Instance Method Details

#[](key) ⇒ Object



140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/pangea/kubernetes/architecture.rb', line 140

def [](key)
  case key.to_sym
  when :igw then igw
  when :route_table then route_table
  when :etcd_bucket then etcd_bucket
  when :flow_log then flow_log
  when :flow_log_role then flow_log_role
  when :ssm_logs_bucket then ssm_logs_bucket
  when :kms_key then kms_key
  when :persistent_state_volume then persistent_state_volume
  else super
  end
end

#to_hObject



154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/pangea/kubernetes/architecture.rb', line 154

def to_h
  hash = super
  hash[:igw] = igw if igw
  hash[:route_table] = route_table if route_table
  hash[:etcd_bucket] = etcd_bucket if etcd_bucket
  hash[:flow_log] = flow_log if flow_log
  hash[:flow_log_role] = flow_log_role if flow_log_role
  hash[:ssm_logs_bucket] = ssm_logs_bucket if ssm_logs_bucket
  hash[:kms_key] = kms_key if kms_key
  hash[:persistent_state_volume] = persistent_state_volume if persistent_state_volume
  hash
end