far-gem 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcecddee6c2360a57c402ccf6a5c5fbe9c3c7abe4eb5bb3163ebe3f5dff5fbd5
4
- data.tar.gz: d66b438123d797a6110a6a8d1d054c566b55f1c7b3ea7f49a5ff49a74890ce2d
3
+ metadata.gz: 17f784b16f9ed9c03cec95fac5a2726bd46bb58877e7b99cf04e19d8cfd46fcf
4
+ data.tar.gz: 7921dc1bcc1616b740c5988add42b4aea67cbbe65a058aec8571148d856c465b
5
5
  SHA512:
6
- metadata.gz: 58f2a4d87c61db6eda608184932db4d4e71f2d027e710c2b24dc738ec700fde1c585f41ee322446622ab03ffadf4de234345085d8ae54c5eff34b62fcf83882b
7
- data.tar.gz: 43632992ea303726e1b6c2b9482f6a9b2b8150390db9f8b1dc4d7d31c796277cd5e3485f53fc98c77a682c206233212aa25b340674cf2639c7ba3e0f4a74f380
6
+ metadata.gz: f47f07de67a282fab3a0277db3ae6f58163c482765f9e35959478c9dfd35f745182fbfa4d2559e40368339f5ff98d4639f75d9061f8fc9b8d1fe4368956ebbcd
7
+ data.tar.gz: 4e4ffdab1f239e69161bd3b4a431d2c858c6ac2a347ef1c8af076ae7af26769acf742747afdca03c902e1db1d9dd5798956996562152292c46225e5e876b09a6
@@ -261,6 +261,24 @@ nic = fog_network_service.network_interfaces.create(
261
261
  )
262
262
  ```
263
263
 
264
+ ## Create Network Interface Card Asynchronously
265
+
266
+ Create a new network interface asynchronously. Skip public_ip_address_id parameter to create network interface without PublicIP. The parameter, private_ip_allocation_method can be Dynamic or Static.
267
+
268
+ ```ruby
269
+ nic = fog_network_service.network_interfaces.create_async(
270
+ name: '<Network Interface Name>',
271
+ resource_group: '<Resource Group Name>',
272
+ location: '<Location>',
273
+ subnet_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/virtualNetworks/<Virtual Network Name>/subnets/<Subnet Name>',
274
+ public_ip_address_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Name>',
275
+ ip_configuration_name: '<IP Configuration Name>',
276
+ private_ip_allocation_method: '<IP Allocation Method Name>',
277
+ tags: { key: 'value' } # [Optional],
278
+ enable_accelerated_networking: true # [Optional] false by default
279
+ )
280
+ ```
281
+
264
282
  ## List Network Interface Cards
265
283
 
266
284
  List network interfaces in a resource group
@@ -67,11 +67,12 @@ module Fog
67
67
  requires :ip_configuration_name
68
68
  requires :private_ip_allocation_method
69
69
 
70
+ nic_response = 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, async)
71
+
70
72
  if async
71
- 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)
73
+ nic_response
72
74
  else
73
- 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)
74
- merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic))
75
+ merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic_response))
75
76
  end
76
77
  end
77
78
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AzureRM
3
- VERSION = '0.5.3'.freeze
3
+ VERSION = '0.5.4'.freeze
4
4
  end
5
5
  end
@@ -185,7 +185,7 @@ begin
185
185
  puts "Deleted network interface: #{nic.destroy}"
186
186
 
187
187
  nic_async = network.network_interfaces.get('TestRG-NI', 'NetInt_Async')
188
- puts "Deleted network interface: #{nic_async.destroy}"
188
+ puts "Deleted network interface #{nic_async.name}: #{nic_async.destroy}"
189
189
 
190
190
  pubip = network.public_ips.get('TestRG-NI', 'mypubip')
191
191
  pubip.destroy
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: far-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaffan Chaudhry
@@ -18,7 +18,7 @@ authors:
18
18
  autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
- date: 2019-02-25 00:00:00.000000000 Z
21
+ date: 2019-02-26 00:00:00.000000000 Z
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
24
24
  name: rake