staypuft 0.5.24 → 0.5.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/lib/staypuft/network_query.rb +25 -1
- data/lib/staypuft/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: ffd1b0e75ea93be655e5a9ed78dc1d92835a2558
|
4
|
+
data.tar.gz: 3e1a331af324795f224fc3f9d8508b02eb37e9e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 924657d23f3137033ad7e9786a3c701cf4a78cc0e6e704d2918ff9efa4033ab1a6d6a356ba896bf5168eb1afdba9d9461a450c5e2d4e3d429b5e46b78312f396
|
7
|
+
data.tar.gz: ccc4eab8e7d0a9225bc4bb69c30097f58608cb4af21494e39aa69ac4d65e10f4c4297aed9dcb1fc3e45a9c8ad6f4eb0d129da0da2b726f47070621d445b319c2
|
@@ -59,6 +59,29 @@ module Staypuft
|
|
59
59
|
interface_hash_for_host(subnet_type_name, host)[:subnet]
|
60
60
|
end
|
61
61
|
|
62
|
+
def interfaces_for_tenant_subnet(host=@host)
|
63
|
+
interface_hash = interface_hash_for_host(
|
64
|
+
Staypuft::SubnetType::TENANT, host)
|
65
|
+
return [] if interface_hash.empty?
|
66
|
+
subnet = interface_hash[:subnet]
|
67
|
+
top_level_interface = host.interfaces.where(
|
68
|
+
identifier: interface_hash[:interface]).first
|
69
|
+
interfaces = [top_level_interface.identifier]
|
70
|
+
if subnet && subnet.has_vlanid?
|
71
|
+
next_interface = host.interfaces.where(identifier:
|
72
|
+
top_level_interface.attached_to).first
|
73
|
+
interfaces << next_interface.identifier
|
74
|
+
if next_interface.is_a? Nic::Bond
|
75
|
+
interfaces << next_interface.attached_devices_identifiers
|
76
|
+
end
|
77
|
+
end
|
78
|
+
interfaces.flatten
|
79
|
+
end
|
80
|
+
|
81
|
+
def tenant_interface?(interface, host=@host)
|
82
|
+
interfaces_for_tenant_subnet(host).include?(interface)
|
83
|
+
end
|
84
|
+
|
62
85
|
def mtu_for_tenant_subnet
|
63
86
|
mtu = @deployment.neutron_networking? ? @deployment.neutron.network_device_mtu : @deployment.nova.network_device_mtu
|
64
87
|
end
|
@@ -118,7 +141,8 @@ module Staypuft
|
|
118
141
|
allow :ip_for_host, :interface_for_host, :network_address_for_host,
|
119
142
|
:controller_ip, :controller_ips, :controller_fqdns, :get_vip, :controller_pcmk_shortnames,
|
120
143
|
:subnet_for_host, :gateway_subnet, :gateway_interface, :gateway_interface_mac,
|
121
|
-
:tenant_subnet?, :mtu_for_tenant_subnet, :controller_lb_backend_shortnames
|
144
|
+
:tenant_subnet?, :mtu_for_tenant_subnet, :controller_lb_backend_shortnames,
|
145
|
+
:interfaces_for_tenant_subnet, :tenant_interface?
|
122
146
|
end
|
123
147
|
|
124
148
|
private
|
data/lib/staypuft/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: staypuft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Staypuft team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks
|