fog-azure-rm 0.2.1 → 0.2.2

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
  SHA1:
3
- metadata.gz: 3506ec3296726b6937f5a7dcb37cd44d1de99be9
4
- data.tar.gz: 247976bb6378c17700f6090a81e0a1bdab573533
3
+ metadata.gz: 9275b47abecd0b5e94d23d9d6bfe5da9e72a71d8
4
+ data.tar.gz: b5ac707f57edfdfdb065923d33cbfd9ee25a1893
5
5
  SHA512:
6
- metadata.gz: 44c94ae25c0c8388b0e431f542062e896ff9e326e86fcc1e1bf941162437b484149bed747d085856d5f5cbf98e29e5c5fec41a4b5567abb2fb19ef2dc0552a48
7
- data.tar.gz: 08d076b807216e3a731840fef407773fec62787daf9792555f9c399fccfefb138e4b635c416d675d82511bf802e937009d1e61ff759e336396161f515a36a0ad
6
+ metadata.gz: d72f363cbe6f539b24421ef506116364530b5a5b37fc5b02b2beda1b10f9f68aea41949af8c228c6d7404aa64863975c6eb64365fb0509eea8263bed74edb961
7
+ data.tar.gz: 06d603908a26eae9ac058f4d8630cc05e223a878c4be04ade2f7a784912846378f232d6fca3c001c4759b0e967f521896d59af51d2057f2a650decff30197661
@@ -1,3 +1,8 @@
1
+ ## 0.2.2
2
+
3
+ **Changed:**
4
+ - Network Service - Updated NIC for load balancer attributes
5
+
1
6
  ## 0.2.1
2
7
 
3
8
  **Changed:**
@@ -13,11 +13,12 @@ module Fog
13
13
 
14
14
  def self.parse(frontend_ip_configuration)
15
15
  hash = {}
16
+ hash['id'] = frontend_ip_configuration.id
16
17
  hash['name'] = frontend_ip_configuration.name
17
18
  hash['subnet_id'] = frontend_ip_configuration.subnet.id unless frontend_ip_configuration.subnet.nil?
18
19
  hash['private_ipaddress'] = frontend_ip_configuration.private_ipaddress if frontend_ip_configuration.respond_to?(:private_ipaddress)
19
20
  hash['private_ipallocation_method'] = frontend_ip_configuration.private_ipallocation_method unless frontend_ip_configuration.private_ipallocation_method.nil?
20
- hash['public_ip_address_id'] = frontend_ip_configuration.public_ipaddress unless frontend_ip_configuration.public_ipaddress.nil?
21
+ hash['public_ipaddress_id'] = frontend_ip_configuration.public_ipaddress.id unless frontend_ip_configuration.public_ipaddress.nil?
21
22
  hash
22
23
  end
23
24
  end
@@ -62,7 +62,7 @@ module Fog
62
62
  requires :subnet_id
63
63
  requires :ip_configuration_name
64
64
  requires :private_ip_allocation_method
65
- nic = service.create_or_update_network_interface(resource_group, name, location, subnet_id, public_ip_address_id, ip_configuration_name, private_ip_allocation_method, private_ip_address)
65
+ nic = service.create_or_update_network_interface(resource_group, name, location, subnet_id, public_ip_address_id, ip_configuration_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids)
66
66
  merge_attributes(Fog::Network::AzureRM::NetworkInterface.parse(nic))
67
67
  end
68
68
 
@@ -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, ip_config_name, private_ip_allocation_method, private_ip_address)
7
+ def create_or_update_network_interface(resource_group_name, name, location, subnet_id, public_ip_address_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids)
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, ip_config_name, private_ip_allocation_method, private_ip_address)
10
+ network_interface = get_network_interface_object(name, location, subnet_id, public_ip_address_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids)
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, ip_config_name, private_ip_allocation_method, private_ip_address)
22
+ def get_network_interface_object(name, location, subnet_id, public_ip_address_id, ip_config_name, private_ip_allocation_method, private_ip_address, load_balancer_backend_address_pools_ids, load_balancer_inbound_nat_rules_ids)
23
23
  subnet = Azure::ARM::Network::Models::Subnet.new
24
24
  subnet.id = subnet_id
25
25
 
@@ -35,6 +35,25 @@ module Fog
35
35
  ip_configs.public_ipaddress = public_ipaddress unless public_ip_address_id.nil?
36
36
  ip_configs.subnet = subnet
37
37
 
38
+
39
+ if load_balancer_backend_address_pools_ids
40
+ ip_configs.load_balancer_backend_address_pools = []
41
+ load_balancer_backend_address_pools_ids.each do |load_balancer_backend_address_pools_id|
42
+ backend_pool = Azure::ARM::Network::Models::BackendAddressPool.new
43
+ backend_pool.id = load_balancer_backend_address_pools_id
44
+ ip_configs.load_balancer_backend_address_pools.push(backend_pool)
45
+ end
46
+ end
47
+
48
+ if load_balancer_inbound_nat_rules_ids
49
+ ip_configs.load_balancer_inbound_nat_rules = []
50
+ load_balancer_inbound_nat_rules_ids.each do |load_balancer_inbound_nat_rules_id|
51
+ inbound_nat_rule = Azure::ARM::Network::Models::InboundNatRule.new
52
+ inbound_nat_rule.id = load_balancer_inbound_nat_rules_id
53
+ ip_configs.load_balancer_inbound_nat_rules.push(inbound_nat_rule)
54
+ end
55
+ end
56
+
38
57
  network_interface = Azure::ARM::Network::Models::NetworkInterface.new
39
58
  network_interface.name = name
40
59
  network_interface.location = location
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module AzureRM
3
- VERSION = '0.2.1'.freeze
3
+ VERSION = '0.2.2'.freeze
4
4
  end
5
5
  end
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaffan Chaudhry
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-01-13 00:00:00.000000000 Z
17
+ date: 2017-01-18 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rake