summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunaid Ali <junaidali@plumgrid.com>2016-06-20 04:39:38 +0500
committerJunaid Ali <junaidali@plumgrid.com>2016-06-20 04:39:38 +0500
commit6033de46ac95e2ae09ad871e46c1ff10b99871de (patch)
tree61434d353f0e7e7de543a6cc1e95b0b5ae740f68
parent03c379164be1f8ab10512fccd734e63cda3a3de7 (diff)
parentcaacd59ab4df50d4cb39b99329cbed8919636288 (diff)
L3 fabric changes
-rw-r--r--config.yaml12
-rw-r--r--hooks/pg_gw_utils.py8
-rw-r--r--templates/kilo/ifcs.conf1
3 files changed, 2 insertions, 19 deletions
diff --git a/config.yaml b/config.yaml
index 07e7676..f961bb6 100644
--- a/config.yaml
+++ b/config.yaml
@@ -13,22 +13,12 @@ options:
13 type: string 13 type: string
14 default: 'juju-br0' 14 default: 'juju-br0'
15 description: The interface connected to PLUMgrid Managment network. 15 description: The interface connected to PLUMgrid Managment network.
16 os-data-network:
17 type: string
18 default:
19 description: |
20 The IP address and netmask of the OpenStack Data network (e.g.,
21 192.168.0.0/24)
22 .
23 This network will be used for tenant network traffic in overlay
24 networks.
25 fabric-interfaces: 16 fabric-interfaces:
26 default: 'MANAGEMENT' 17 default: 'MANAGEMENT'
27 type: string 18 type: string
28 description: | 19 description: |
29 Interfaces that will provide fabric connectivity on the gateway nodes. 20 Interfaces that will provide fabric connectivity on the gateway nodes.
30 Provided in form of json in a string. These interfaces have to be connected 21 Provided in form of json in a string. Default value is MANAGEMENT which
31 to the os-data-network specified in the config. Default value is MANAGEMENT which
32 will configure the management interface as the fabric interface on each 22 will configure the management interface as the fabric interface on each
33 director. 23 director.
34 network-device-mtu: 24 network-device-mtu:
diff --git a/hooks/pg_gw_utils.py b/hooks/pg_gw_utils.py
index cb9250e..73ae795 100644
--- a/hooks/pg_gw_utils.py
+++ b/hooks/pg_gw_utils.py
@@ -23,8 +23,6 @@ from charmhelpers.contrib.network.ip import (
23 get_iface_from_addr, 23 get_iface_from_addr,
24 get_bridges, 24 get_bridges,
25 get_bridge_nics, 25 get_bridge_nics,
26 is_address_in_network,
27 get_iface_addr
28) 26)
29from charmhelpers.core.host import ( 27from charmhelpers.core.host import (
30 write_file, 28 write_file,
@@ -268,11 +266,7 @@ def get_fabric_interface():
268 else: 266 else:
269 raise ValueError('No fabric interface provided for node') 267 raise ValueError('No fabric interface provided for node')
270 if interface_exists(node_fabric_interface): 268 if interface_exists(node_fabric_interface):
271 if is_address_in_network(config('os-data-network'), 269 return node_fabric_interface
272 get_iface_addr(node_fabric_interface)[0]):
273 return node_fabric_interface
274 else:
275 raise ValueError('Fabric interface not in fabric network')
276 else: 270 else:
277 log('Provided fabric interface %s does not exist' 271 log('Provided fabric interface %s does not exist'
278 % node_fabric_interface) 272 % node_fabric_interface)
diff --git a/templates/kilo/ifcs.conf b/templates/kilo/ifcs.conf
index e7535cb..88c7091 100644
--- a/templates/kilo/ifcs.conf
+++ b/templates/kilo/ifcs.conf
@@ -4,4 +4,3 @@
4{{ dev }} = access_phys 4{{ dev }} = access_phys
5{% endfor -%} 5{% endfor -%}
6{% endif -%} 6{% endif -%}
7