lib/fog/azurerm/models/network/virtual_networks.rb in fog-azure-rm-0.0.3 vs lib/fog/azurerm/models/network/virtual_networks.rb in fog-azure-rm-0.0.4
- old
+ new
@@ -17,11 +17,13 @@
virtual_networks << Fog::Network::AzureRM::VirtualNetwork.parse(vnet)
end
load(virtual_networks)
end
- def get(identity)
- all.find { |f| f.name == identity }
+ def get(resource_group_name, virtual_network_name)
+ virtual_network = service.get_virtual_network(resource_group_name, virtual_network_name)
+ virtual_network_object = Fog::Network::AzureRM::VirtualNetwork.new(service: service)
+ virtual_network_object.merge_attributes(Fog::Network::AzureRM::VirtualNetwork.parse(virtual_network))
end
def check_if_exists(resource_group, name)
Fog::Logger.debug "Checkng if Virtual Network #{name} exists."
if service.check_for_virtual_network(name, resource_group)