Class: Pangea::Kubernetes::Architecture::GcpNetworkResult

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

Overview

GCP-specific NetworkResult with firewall rules

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#firewall_externalObject

Returns the value of attribute firewall_external.



170
171
172
# File 'lib/pangea/kubernetes/architecture.rb', line 170

def firewall_external
  @firewall_external
end

#firewall_internalObject

Returns the value of attribute firewall_internal.



170
171
172
# File 'lib/pangea/kubernetes/architecture.rb', line 170

def firewall_internal
  @firewall_internal
end

Instance Method Details

#[](key) ⇒ Object



172
173
174
175
176
177
178
# File 'lib/pangea/kubernetes/architecture.rb', line 172

def [](key)
  case key.to_sym
  when :firewall_internal then firewall_internal
  when :firewall_external then firewall_external
  else super
  end
end

#to_hObject



180
181
182
183
184
185
# File 'lib/pangea/kubernetes/architecture.rb', line 180

def to_h
  hash = super
  hash[:firewall_internal] = firewall_internal if firewall_internal
  hash[:firewall_external] = firewall_external if firewall_external
  hash
end