fog-azure-rm 0.2.1 → 0.2.2
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/fog/azurerm/models/network/frontend_ip_configuration.rb +2 -1
- data/lib/fog/azurerm/models/network/network_interface.rb +1 -1
- data/lib/fog/azurerm/requests/network/create_or_update_network_interface.rb +22 -3
- data/lib/fog/azurerm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9275b47abecd0b5e94d23d9d6bfe5da9e72a71d8
|
4
|
+
data.tar.gz: b5ac707f57edfdfdb065923d33cbfd9ee25a1893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d72f363cbe6f539b24421ef506116364530b5a5b37fc5b02b2beda1b10f9f68aea41949af8c228c6d7404aa64863975c6eb64365fb0509eea8263bed74edb961
|
7
|
+
data.tar.gz: 06d603908a26eae9ac058f4d8630cc05e223a878c4be04ade2f7a784912846378f232d6fca3c001c4759b0e967f521896d59af51d2057f2a650decff30197661
|
data/CHANGELOG.md
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['
|
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
|
data/lib/fog/azurerm/version.rb
CHANGED
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.
|
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-
|
17
|
+
date: 2017-01-18 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rake
|