summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2017-02-22 14:44:39 -0500
committerFeng Pan <fpan@redhat.com>2017-03-10 16:20:18 -0500
commit7d994a3c3e18227c26bf58049e4d5780144ecf98 (patch)
treec2840bb6fa451ef63ca22a47031c60a12f786aed /lib
parent05954847525a0eab9db88ab6f327fb960e1fbd03 (diff)
Add support for odl_l3-fdio
This patch adds support for ODL L3 FDIO scenario. Introduces a new deploy settings parameter, odl_routing_node, to indicate the routing node's hostname. This parameter will only be used for this scenario. Change-Id: I8df3eb701299007761c6cec42c4ca318b124a0b8 opnfv-tht-pr: 108 os-net-config-pr: 4 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/overcloud-deploy-functions.sh20
-rw-r--r--lib/python/apex/deploy_settings.py3
-rwxr-xr-xlib/python/apex_python_utils.py22
-rwxr-xr-xlib/undercloud-functions.sh10
4 files changed, 41 insertions, 14 deletions
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index a46c6c6b..4d4b7647 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -28,7 +28,11 @@ function overcloud_deploy {
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/services/gluon.yaml"
fi
elif [ "${deploy_options_array['vpp']}" == 'True' ]; then
- DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml"
+ if [ "${deploy_options_array['sdn_l3']}" == "True" ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb.yaml"
+ else
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-honeycomb-l2.yaml"
+ fi
else
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-l3.yaml"
fi
@@ -145,6 +149,13 @@ EOI
EOI
fi
+ #Configure routing node for odl_l3-fdio
+ if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['dataplane']}" == 'fdio' && "${deploy_options_array['sdn_l3']}" == 'True' ]]; then
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+ sed -i "/opendaylight::vpp_routing_node:/c\ opendaylight::vpp_routing_node: ${deploy_options_array['odl_vpp_routing_node']}.${domain_name}" ${ENV_FILE}
+EOI
+ fi
+
if [ -n "${deploy_options_array['performance']}" ]; then
for option in "${performance_options[@]}" ; do
arr=($option)
@@ -161,13 +172,6 @@ EOI
EOI
fi
- if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "${deploy_options_array['dataplane']}" == 'fdio' ]]; then
- ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
- sed -i "/neutron::agents::dhcp::interface_driver:/c\ neutron::agents::dhcp::interface_driver: neutron.agent.linux.interface.NSDriver" ${ENV_FILE}
- sed -i "/neutron::agents::l3::interface_driver:/c\ neutron::agents::l3::interface_driver: neutron.agent.linux.interface.NSDriver" ${ENV_FILE}
-EOI
- fi
-
# Set ODL version accordingly
if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && -n "${deploy_options_array['odl_version']}" ]]; then
case "${deploy_options_array['odl_version']}" in
diff --git a/lib/python/apex/deploy_settings.py b/lib/python/apex/deploy_settings.py
index 566e8bea..9fb4c6f7 100644
--- a/lib/python/apex/deploy_settings.py
+++ b/lib/python/apex/deploy_settings.py
@@ -30,7 +30,8 @@ OPT_DEPLOY_SETTINGS = ['performance',
'vsperf',
'ceph_device',
'yardstick',
- 'dovetail']
+ 'dovetail',
+ 'odl_vpp_routing_node']
VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage']
VALID_PERF_OPTS = ['kernel', 'nova', 'vpp']
diff --git a/lib/python/apex_python_utils.py b/lib/python/apex_python_utils.py
index e21d0464..830af360 100755
--- a/lib/python/apex_python_utils.py
+++ b/lib/python/apex_python_utils.py
@@ -106,10 +106,25 @@ def build_nic_template(args):
template_dir, template = args.template.rsplit('/', 1)
netsets = NetworkSettings(args.net_settings_file)
+ nets = netsets.get('networks')
+ ds = DeploySettings(args.deploy_settings_file).get('deploy_options')
env = Environment(loader=FileSystemLoader(template_dir), autoescape=True)
template = env.get_template(template)
- print(template.render(nets=netsets['networks'],
+ if ds['dataplane'] == 'fdio':
+ nets['tenant']['nic_mapping'][args.role]['phys_type'] = 'vpp_interface'
+ if ds['sdn_l3']:
+ nets['external'][0]['nic_mapping'][args.role]['phys_type'] =\
+ 'vpp_interface'
+ if ds.get('performance', {}).get(args.role.title(), {}).get('vpp', {})\
+ .get('uio-driver'):
+ nets['tenant']['nic_mapping'][args.role]['uio-driver'] =\
+ ds['performance'][args.role.title()]['vpp']['uio-driver']
+ if ds['sdn_l3']:
+ nets['external'][0]['nic_mapping'][args.role]['uio-driver'] =\
+ ds['performance'][args.role.title()]['vpp']['uio-driver']
+
+ print(template.render(nets=nets,
role=args.role,
external_net_af=netsets.get_ip_addr_family(),
external_net_type=args.ext_net_type,
@@ -175,11 +190,14 @@ def get_parser():
help='path to network settings file')
nic_template.add_argument('-e', '--ext-net-type', default='interface',
dest='ext_net_type',
- choices=['interface', 'br-ex'],
+ choices=['interface', 'vpp_interface', 'br-ex'],
help='External network type')
nic_template.add_argument('-d', '--ovs-dpdk-bridge',
default=None, dest='ovs_dpdk_bridge',
help='OVS DPDK Bridge Name')
+ nic_template.add_argument('--deploy-settings-file',
+ help='path to deploy settings file')
+
nic_template.set_defaults(func=build_nic_template)
# parse-deploy-settings
deploy_settings = subparsers.add_parser('parse-deploy-settings',
diff --git a/lib/undercloud-functions.sh b/lib/undercloud-functions.sh
index 080fcbbd..2a370bff 100755
--- a/lib/undercloud-functions.sh
+++ b/lib/undercloud-functions.sh
@@ -127,7 +127,11 @@ function configure_undercloud {
# check for ODL L3/ONOS
if [ "${deploy_options_array['sdn_l3']}" == 'True' ]; then
- ext_net_type=br-ex
+ if [ "${deploy_options_array['dataplane']}" == 'fdio' ]; then
+ ext_net_type=vpp_interface
+ else
+ ext_net_type=br-ex
+ fi
fi
if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
@@ -136,12 +140,12 @@ function configure_undercloud {
ovs_dpdk_bridge=''
fi
- if ! controller_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e "br-ex"); then
+ if ! controller_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r controller -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e "br-ex" --deploy-settings-file $DEPLOY_SETTINGS_FILE); then
echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}"
exit 1
fi
- if ! compute_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r compute -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e $ext_net_type -d "$ovs_dpdk_bridge"); then
+ if ! compute_nic_template=$(python3 -B $LIB/python/apex_python_utils.py nic-template -r compute -s $NETSETS -t $BASE/nics-template.yaml.jinja2 -e $ext_net_type -d "$ovs_dpdk_bridge" --deploy-settings-file $DEPLOY_SETTINGS_FILE); then
echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}"
exit 1
fi