diff options
author | Dan Radez <dradez@redhat.com> | 2016-08-23 02:40:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-08-23 02:40:11 +0000 |
commit | 234ed195befdea6a18c875c3ff7d7565aa0ee978 (patch) | |
tree | 5a83885bc9497abb2c143355c97ea121b6009d06 /lib | |
parent | ea1ad48ca5f4ec391b4232fa92ba027119ad2ca7 (diff) | |
parent | b55e605853d91e6c7078101238dd52c3904e83eb (diff) |
Merge "removing enabled_network_list as an argument to network env"
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/python/apex_python_utils.py | 15 | ||||
-rwxr-xr-x | lib/undercloud-functions.sh | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/lib/python/apex_python_utils.py b/lib/python/apex_python_utils.py index 829b3a0f..b6aaafaa 100755 --- a/lib/python/apex_python_utils.py +++ b/lib/python/apex_python_utils.py @@ -95,19 +95,19 @@ def build_nic_template(args): """ template_dir, template = args.template.rsplit('/', 1) - network_settings = NetworkSettings(args.net_settings_file, - args.network_isolation) + netsets = NetworkSettings(args.net_settings_file, + args.network_isolation) env = Environment(loader=FileSystemLoader(template_dir)) template = env.get_template(template) # gather vlan values into a dict - net_list = copy(args.enabled_networks).split(' ') + net_list = copy(netsets.enabled_network_list) net_list.remove(ADMIN_NETWORK) - vlans_vals = map(lambda x: network_settings[x]['vlan'], net_list) + vlans_vals = map(lambda x: netsets[x]['vlan'], net_list) vlans = dict(zip(net_list, vlans_vals)) - nics = network_settings.nics + nics = netsets.nics - print(template.render(enabled_networks=args.enabled_networks, + print(template.render(enabled_networks=netsets.enabled_network_list, role=args.role, vlans=vlans, external_net_type=args.ext_net_type, @@ -174,9 +174,6 @@ def get_parser(): nic_template.add_argument('--flat', action='store_false', default=True, dest='network_isolation', help='disable network isolation') - nic_template.add_argument('-n', '--enabled-networks', required=True, - dest='enabled_networks', - help='enabled network list') nic_template.add_argument('-e', '--ext-net-type', default='interface', dest='ext_net_type', choices=['interface', 'br-ex'], diff --git a/lib/undercloud-functions.sh b/lib/undercloud-functions.sh index f5b53ee7..5e9a5caa 100755 --- a/lib/undercloud-functions.sh +++ b/lib/undercloud-functions.sh @@ -136,12 +136,12 @@ function configure_undercloud { ovs_dpdk_bridge='' fi - if ! controller_nic_template=$(python3.4 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS $net_isolation_arg -t $CONFIG/nics-template.yaml.jinja2 -n "$enabled_network_list" -e "br-ex" -af $ip_addr_family); then + if ! controller_nic_template=$(python3.4 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS $net_isolation_arg -t $CONFIG/nics-template.yaml.jinja2 -e "br-ex" -af $ip_addr_family); then echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}" exit 1 fi - if ! compute_nic_template=$(python3.4 -B $LIB/python/apex_python_utils.py nic-template -r compute -s $NETSETS $net_isolation_arg -t $CONFIG/nics-template.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then + if ! compute_nic_template=$(python3.4 -B $LIB/python/apex_python_utils.py nic-template -r compute -s $NETSETS $net_isolation_arg -t $CONFIG/nics-template.yaml.jinja2 -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}" exit 1 fi |