Class: Fog::Network::AzureRM::NetworkInterface

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

Overview

NetworkInterface model class for Network Service

Instance Method Summary collapse

Instance Method Details

#destroyObject



28
29
30
# File 'lib/fog/azurerm/models/network/network_interface.rb', line 28

def destroy
  service.delete_network_interface(resource_group, name)
end

#saveObject



14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/fog/azurerm/models/network/network_interface.rb', line 14

def save
  requires :name
  requires :location
  requires :resource_group
  requires :subnet_id
  requires :ip_configuration_name
  requires :private_ip_allocation_method

  Fog::Logger.debug "Creating Network Interface Card: #{name}..."
  network_interface = service.create_network_interface(name, location, resource_group, subnet_id, ip_configuration_name, private_ip_allocation_method)
  Fog::Logger.debug "Network Interface #{name} created successfully."
  network_interface
end