lib/fog/azurerm/models/network/network_interface.rb in far-gem-0.5.2 vs lib/fog/azurerm/models/network/network_interface.rb in far-gem-0.5.3
- old
+ new
@@ -57,18 +57,23 @@
end
hash['enable_accelerated_networking'] = nic.enable_accelerated_networking
hash
end
- def save
+ def save(async = false)
requires :name
requires :location
requires :resource_group
requires :subnet_id
requires :ip_configuration_name
requires :private_ip_allocation_method
- nic = service.create_or_update_network_interface(resource_group, name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_configuration_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking)
- merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic))
+
+ if async
+ service.create_or_update_network_interface(resource_group, name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_configuration_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking, true)
+ else
+ nic = service.create_or_update_network_interface(resource_group, name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_configuration_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking, false)
+ merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic))
+ end
end
def update(updated_attributes = {})
validate_update_attributes!(updated_attributes)
merge_attributes(updated_attributes)