Class: Fog::Network::AzureRM::VirtualNetworkGateways

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/network/virtual_network_gateways.rb

Overview

VirtualNetworkGateways collection class for Network Service

Instance Method Summary collapse

Instance Method Details

#allObject



9
10
11
12
13
14
15
16
# File 'lib/fog/azurerm/models/network/virtual_network_gateways.rb', line 9

def all
  requires :resource_group
  network_gateways = []
  service.list_virtual_network_gateways(resource_group).each do |gateway|
    network_gateways << Fog::Network::AzureRM::VirtualNetworkGateway.parse(gateway)
  end
  load(network_gateways)
end

#check_vnet_gateway_exists(resource_group_name, name) ⇒ Object



24
25
26
# File 'lib/fog/azurerm/models/network/virtual_network_gateways.rb', line 24

def check_vnet_gateway_exists(resource_group_name, name)
  service.check_vnet_gateway_exists(resource_group_name, name)
end

#get(resource_group_name, name) ⇒ Object



18
19
20
21
22
# File 'lib/fog/azurerm/models/network/virtual_network_gateways.rb', line 18

def get(resource_group_name, name)
  network_gateway = service.get_virtual_network_gateway(resource_group_name, name)
  virtual_network_gateway = Fog::Network::AzureRM::VirtualNetworkGateway.new(service: service)
  virtual_network_gateway.merge_attributes(Fog::Network::AzureRM::VirtualNetworkGateway.parse(network_gateway))
end