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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f2643da5f5306d3ff7cc3d7f64ffd012fe8dd62bd3cf751d3b39efb984fab56
4
- data.tar.gz: 2698137885445fde6a1378e0e51d988ce735dca45bb78b5cbdc578c17a686831
3
+ metadata.gz: a9de926983a22144f9743089245c227abdf6e4b052036f4e90a0683e252695fa
4
+ data.tar.gz: 70951e0a5a6b35713e36918738a1c6023ed816dd7e87245d34a275f8e5c18d80
5
5
  SHA512:
6
- metadata.gz: e5dfd85ae82dab94a2ead2195c06776a80c74de916c480c46b88cb07dc5ff8e9ed4fba07f682c281106b59b5704b17bbf0baccc3d485791a1e5249dbc289669a
7
- data.tar.gz: 6e4de4154352a2fa6592ae9fdfa8a88ce5f322d4c6d8ef39c6f7cf942df3f85aedccbe00748af26346d0b9cc27f56cf12f25424870f4449c03653b34b42ce1ba
6
+ metadata.gz: c8ad7a53b6f0ae4a8370dc4bcf2023d4d0c32c23328aed73d38a841a4fac040d39f2a83a30ec2faece79c929f384e967c03e96d08895758391d2592ce69d95f8
7
+ data.tar.gz: 32456f0bfa1599938f7549bb4e572db4f39a0fc3493bd981d0c86340055eeb77132012e21127906b635255e9745bec7e7a2ad47332f6ddf385b33665315a9ff1
@@ -1,3 +1,8 @@
1
+ ## 0.4.8
2
+
3
+ **Added:**
4
+ - Added enable_accelerated_networking attribute for NIC
5
+
1
6
  ## 0.4.7
2
7
 
3
8
  **Added:**
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AzureRM
3
- VERSION = '0.4.7'.freeze
3
+ VERSION = '0.4.8'.freeze
4
4
  end
5
5
  end
@@ -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.7
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-03 00:00:00.000000000 Z
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.6
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.