Class: Azure::VirtualNetworkManagement::VirtualNetworkManagementService
- Inherits:
-
BaseManagement::BaseManagementService
- Object
- BaseManagement::BaseManagementService
- Azure::VirtualNetworkManagement::VirtualNetworkManagementService
- Defined in:
- lib/azure/virtual_network_management/virtual_network_management_service.rb
Overview
VirtualNetworkManagementService
Instance Attribute Summary
Attributes inherited from BaseManagement::BaseManagementService
Instance Method Summary collapse
-
#list_virtual_networks ⇒ Object
Public: Gets a list of virtual network services available under the current subscription.
- #set_network_configuration(*args) ⇒ Object
Methods inherited from BaseManagement::BaseManagementService
#create_affinity_group, #delete_affinity_group, #get_affinity_group, #initialize, #list_affinity_groups, #list_locations, #list_role_sizes, #update_affinity_group, #validate_configuration!
Constructor Details
This class inherits a constructor from Azure::BaseManagement::BaseManagementService
Instance Method Details
#list_virtual_networks ⇒ Object
Public: Gets a list of virtual network services available under the current subscription.
See msdn.microsoft.com/en-us/library/azure/jj157185.aspx
Returns an array of Azure::VirtualNetworkServiceManagement::VirtualNetwork objects
29 30 31 32 33 34 |
# File 'lib/azure/virtual_network_management/virtual_network_management_service.rb', line 29 def list_virtual_networks request_path = '/services/networking/virtualnetwork' request = client.management_request(:get, request_path, nil) response = request.call Serialization.virtual_network_from_xml(response) end |
#set_network_configuration(*args) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/azure/virtual_network_management/virtual_network_management_service.rb', line 36 def set_network_configuration(*args) if args.length == 1 set_virtual_network_using_xml(args[0]) elsif args.length == 4 || args.length == 3 args[3] ||= { subnet: [], dns: [] } set_virtual_network(args[0], args[1], args[2], args[3]) else raise 'Wrong number of arguments' end end |