far-gem 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f784b16f9ed9c03cec95fac5a2726bd46bb58877e7b99cf04e19d8cfd46fcf
|
4
|
+
data.tar.gz: 7921dc1bcc1616b740c5988add42b4aea67cbbe65a058aec8571148d856c465b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
73
|
+
nic_response
|
72
74
|
else
|
73
|
-
|
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
|
|
data/lib/fog/azurerm/version.rb
CHANGED
@@ -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.
|
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-
|
21
|
+
date: 2019-02-26 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: rake
|