summaryrefslogtreecommitdiffstats
path: root/lib/python/apex_python_utils.py
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-09-26 20:02:30 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-26 20:02:30 +0000
commit8d6e0e73023eeaeef681880bad87a5ea8044bc73 (patch)
tree040dabe09fc9ef5221cf8938e9ebf614d49656cc /lib/python/apex_python_utils.py
parentdd6bb69f77dda4d89876efd1524e907a1bf44748 (diff)
parent38de9ff18e44e5c3c1393c060481fbbb27543704 (diff)
Merge "migrating to proposed common network settings file"
Diffstat (limited to 'lib/python/apex_python_utils.py')
-rwxr-xr-xlib/python/apex_python_utils.py19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/python/apex_python_utils.py b/lib/python/apex_python_utils.py
index 9d6110bb..b67028ac 100755
--- a/lib/python/apex_python_utils.py
+++ b/lib/python/apex_python_utils.py
@@ -14,8 +14,6 @@ import logging
import os
import yaml
-from copy import copy
-
from jinja2 import Environment
from jinja2 import FileSystemLoader
@@ -113,20 +111,11 @@ def build_nic_template(args):
env = Environment(loader=FileSystemLoader(template_dir), autoescape=True)
template = env.get_template(template)
- # gather vlan values into a dict
- net_list = copy(netsets.enabled_network_list)
- net_list.remove(ADMIN_NETWORK)
- vlans_vals = map(lambda x: netsets[x]['vlan'], net_list)
- vlans = dict(zip(net_list, vlans_vals))
- nics = netsets.nics
-
- print(template.render(enabled_networks=netsets.enabled_network_list,
+ print(template.render(nets=netsets['networks'],
role=args.role,
- vlans=vlans,
+ external_net_af=netsets.get_ip_addr_family(),
external_net_type=args.ext_net_type,
- external_net_af=args.address_family,
- ovs_dpdk_bridge=args.ovs_dpdk_bridge,
- nics=nics))
+ ovs_dpdk_bridge=args.ovs_dpdk_bridge))
def get_parser():
@@ -196,8 +185,6 @@ def get_parser():
dest='ext_net_type',
choices=['interface', 'br-ex'],
help='External network type')
- nic_template.add_argument('-af', '--address-family', type=int, default=4,
- dest='address_family', help='IP address family')
nic_template.add_argument('-d', '--ovs-dpdk-bridge',
default=None, dest='ovs_dpdk_bridge',
help='OVS DPDK Bridge Name')