L3 fabric changes

This commit is contained in:
Junaid Ali 2016-06-20 04:39:38 +05:00
commit 6033de46ac
3 changed files with 2 additions and 19 deletions

View File

@ -13,22 +13,12 @@ options:
type: string type: string
default: 'juju-br0' default: 'juju-br0'
description: The interface connected to PLUMgrid Managment network. description: The interface connected to PLUMgrid Managment network.
os-data-network:
type: string
default:
description: |
The IP address and netmask of the OpenStack Data network (e.g.,
192.168.0.0/24)
.
This network will be used for tenant network traffic in overlay
networks.
fabric-interfaces: fabric-interfaces:
default: 'MANAGEMENT' default: 'MANAGEMENT'
type: string type: string
description: | description: |
Interfaces that will provide fabric connectivity on the gateway nodes. Interfaces that will provide fabric connectivity on the gateway nodes.
Provided in form of json in a string. These interfaces have to be connected Provided in form of json in a string. Default value is MANAGEMENT which
to the os-data-network specified in the config. Default value is MANAGEMENT which
will configure the management interface as the fabric interface on each will configure the management interface as the fabric interface on each
director. director.
network-device-mtu: network-device-mtu:

View File

@ -23,8 +23,6 @@ from charmhelpers.contrib.network.ip import (
get_iface_from_addr, get_iface_from_addr,
get_bridges, get_bridges,
get_bridge_nics, get_bridge_nics,
is_address_in_network,
get_iface_addr
) )
from charmhelpers.core.host import ( from charmhelpers.core.host import (
write_file, write_file,
@ -268,11 +266,7 @@ def get_fabric_interface():
else: else:
raise ValueError('No fabric interface provided for node') raise ValueError('No fabric interface provided for node')
if interface_exists(node_fabric_interface): if interface_exists(node_fabric_interface):
if is_address_in_network(config('os-data-network'),
get_iface_addr(node_fabric_interface)[0]):
return node_fabric_interface return node_fabric_interface
else:
raise ValueError('Fabric interface not in fabric network')
else: else:
log('Provided fabric interface %s does not exist' log('Provided fabric interface %s does not exist'
% node_fabric_interface) % node_fabric_interface)

View File

@ -4,4 +4,3 @@
{{ dev }} = access_phys {{ dev }} = access_phys
{% endfor -%} {% endfor -%}
{% endif -%} {% endif -%}