Sha256: d6f374b55ef5d89ce88c4318523164c114bfa82f511b5d0693f5a34f13ba317b
Contents?: true
Size: 1.26 KB
Versions: 46
Compression:
Stored size: 1.26 KB
Contents
module Fog module Network class AzureRM # This class is giving implementation of all/list, get and # check name availability for virtual network. class VirtualNetworks < Fog::Collection model Fog::Network::AzureRM::VirtualNetwork attribute :resource_group def all virtual_networks = [] if !resource_group.nil? requires :resource_group vnets = service.list_virtual_networks(resource_group) else vnets = service.list_virtual_networks_in_subscription end vnets.each do |vnet| virtual_networks << Fog::Network::AzureRM::VirtualNetwork.parse(vnet) end load(virtual_networks) end def get(resource_group_name, virtual_network_name) virtual_network = service.get_virtual_network(resource_group_name, virtual_network_name) virtual_network_fog = Fog::Network::AzureRM::VirtualNetwork.new(service: service) virtual_network_fog.merge_attributes(Fog::Network::AzureRM::VirtualNetwork.parse(virtual_network)) end def check_virtual_network_exists(resource_group, name) service.check_virtual_network_exists(resource_group, name) end end end end end
Version data entries
46 entries across 46 versions & 4 rubygems