fog-azure-rm 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/fog/azurerm/docs/network.md +2 -1
- data/lib/fog/azurerm/models/network/network_interface.rb +3 -1
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +4 -3
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/integration/network_interface.rb +2 -1
- data/test/models/network/test_network_interface.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9de926983a22144f9743089245c227abdf6e4b052036f4e90a0683e252695fa
|
4
|
+
data.tar.gz: 70951e0a5a6b35713e36918738a1c6023ed816dd7e87245d34a275f8e5c18d80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ad7a53b6f0ae4a8370dc4bcf2023d4d0c32c23328aed73d38a841a4fac040d39f2a83a30ec2faece79c929f384e967c03e96d08895758391d2592ce69d95f8
|
7
|
+
data.tar.gz: 32456f0bfa1599938f7549bb4e572db4f39a0fc3493bd981d0c86340055eeb77132012e21127906b635255e9745bec7e7a2ad47332f6ddf385b33665315a9ff1
|
data/CHANGELOG.md
CHANGED
@@ -256,7 +256,8 @@ nic = fog_network_service.network_interfaces.create(
|
|
256
256
|
public_ip_address_id: '/subscriptions/<Subscription Id>/resourceGroups/<Resource Group Name>/providers/Microsoft.Network/publicIPAddresses/<Public IP Name>',
|
257
257
|
ip_configuration_name: '<IP Configuration Name>',
|
258
258
|
private_ip_allocation_method: '<IP Allocation Method Name>',
|
259
|
-
tags: { key: 'value' } # [Optional]
|
259
|
+
tags: { key: 'value' } # [Optional],
|
260
|
+
enable_accelerated_networking: true # [Optional] false by default
|
260
261
|
)
|
261
262
|
```
|
262
263
|
|
@@ -23,6 +23,7 @@ module Fog
|
|
23
23
|
attribute :internal_dns_name_label
|
24
24
|
attribute :internal_fqd
|
25
25
|
attribute :tags
|
26
|
+
attribute :enable_accelerated_networking
|
26
27
|
|
27
28
|
def self.parse(nic)
|
28
29
|
hash = {}
|
@@ -54,6 +55,7 @@ module Fog
|
|
54
55
|
hash['internal_dns_name_label'] = nic_dns_settings.internal_dns_name_label
|
55
56
|
hash['internal_fqd'] = nic_dns_settings.internal_fqdn
|
56
57
|
end
|
58
|
+
hash['enable_accelerated_networking'] = nic.enable_accelerated_networking
|
57
59
|
hash
|
58
60
|
end
|
59
61
|
|
@@ -64,7 +66,7 @@ module Fog
|
|
64
66
|
requires :subnet_id
|
65
67
|
requires :ip_configuration_name
|
66
68
|
requires :private_ip_allocation_method
|
67
|
-
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)
|
69
|
+
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)
|
68
70
|
merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic))
|
69
71
|
end
|
70
72
|
|
@@ -4,10 +4,10 @@ module Fog
|
|
4
4
|
class AzureRM
|
5
5
|
# Real class for Network Request
|
6
6
|
class Real
|
7
|
-
def create_or_update_network_interface(resource_group_name, name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags)
|
7
|
+
def create_or_update_network_interface(resource_group_name, name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_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)
|
8
8
|
msg = "Creating/Updating Network Interface Card: #{name}"
|
9
9
|
Fog::Logger.debug msg
|
10
|
-
network_interface = get_network_interface_object(name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags)
|
10
|
+
network_interface = get_network_interface_object(name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking)
|
11
11
|
begin
|
12
12
|
network_interface_obj = @network_client.network_interfaces.create_or_update(resource_group_name, name, network_interface)
|
13
13
|
rescue MsRestAzure::AzureOperationError => e
|
@@ -19,7 +19,7 @@ module Fog
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
-
def get_network_interface_object(name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags)
|
22
|
+
def get_network_interface_object(name, location, subnet_id, public_ip_address_id, network_security_group_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids, tags, enable_accelerated_networking)
|
23
23
|
if public_ip_address_id
|
24
24
|
public_ipaddress = Azure::ARM::Network::Models::PublicIPAddress.new
|
25
25
|
public_ipaddress.id = public_ip_address_id
|
@@ -60,6 +60,7 @@ module Fog
|
|
60
60
|
network_interface.location = location
|
61
61
|
network_interface.ip_configurations = [ip_configs]
|
62
62
|
network_interface.tags = tags
|
63
|
+
network_interface.enable_accelerated_networking = enable_accelerated_networking
|
63
64
|
|
64
65
|
if network_security_group_id
|
65
66
|
network_security_group = Azure::ARM::Network::Models::NetworkSecurityGroup.new
|
data/lib/fog/azurerm/version.rb
CHANGED
@@ -107,7 +107,8 @@ begin
|
|
107
107
|
public_ip_address_id: "/subscriptions/#{azure_credentials['subscription_id']}/resourceGroups/TestRG-NI/providers/Microsoft.Network/publicIPAddresses/mypubip",
|
108
108
|
ip_configuration_name: 'testIpConfiguration',
|
109
109
|
private_ip_allocation_method: 'Dynamic',
|
110
|
-
tags: { key: 'value' }
|
110
|
+
tags: { key: 'value' },
|
111
|
+
enable_accelerated_networking: true
|
111
112
|
)
|
112
113
|
puts "Created network interface: #{network_interface.name}"
|
113
114
|
|
@@ -45,7 +45,8 @@ class TestNetworkInterface < Minitest::Test
|
|
45
45
|
:applied_dns_servers,
|
46
46
|
:internal_dns_name_label,
|
47
47
|
:internal_fqd,
|
48
|
-
:tags
|
48
|
+
:tags,
|
49
|
+
:enable_accelerated_networking
|
49
50
|
]
|
50
51
|
attributes.each do |attribute|
|
51
52
|
assert_respond_to @network_interface, attribute
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-azure-rm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
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: 2018-05-
|
21
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: rake
|
@@ -1060,7 +1060,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1060
1060
|
version: '0'
|
1061
1061
|
requirements: []
|
1062
1062
|
rubyforge_project:
|
1063
|
-
rubygems_version: 2.7.
|
1063
|
+
rubygems_version: 2.7.7
|
1064
1064
|
signing_key:
|
1065
1065
|
specification_version: 4
|
1066
1066
|
summary: Module for the 'fog' gem to support Azure Resource Manager cloud services.
|