Class: Pangea::Kubernetes::Architecture::AzureNetworkResult

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

Overview

Azure-specific NetworkResult with resource group, vnet, and NSG

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nsgObject

Returns the value of attribute nsg.



190
191
192
# File 'lib/pangea/kubernetes/architecture.rb', line 190

def nsg
  @nsg
end

#resource_groupObject

Returns the value of attribute resource_group.



190
191
192
# File 'lib/pangea/kubernetes/architecture.rb', line 190

def resource_group
  @resource_group
end

#vnetObject

Returns the value of attribute vnet.



190
191
192
# File 'lib/pangea/kubernetes/architecture.rb', line 190

def vnet
  @vnet
end

Instance Method Details

#[](key) ⇒ Object



192
193
194
195
196
197
198
199
# File 'lib/pangea/kubernetes/architecture.rb', line 192

def [](key)
  case key.to_sym
  when :resource_group then resource_group
  when :vnet then vnet
  when :nsg then nsg
  else super
  end
end

#to_hObject



201
202
203
204
205
206
207
# File 'lib/pangea/kubernetes/architecture.rb', line 201

def to_h
  hash = super
  hash[:resource_group] = resource_group if resource_group
  hash[:vnet] = vnet if vnet
  hash[:nsg] = nsg if nsg
  hash
end