From 847f7673f8ba68583c85eee5c30d7657f82ad50f Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Thu, 11 Jan 2018 10:41:29 -0500 Subject: Fixes including default SDN env file in deploy cmd The latest method to deploy opendaylight features upstream is to include the default SDN file and then add-on the feature env file which should override any default settings in the previous SDN env file. For example for bgpvpn: openstack overcloud deploy -e /neutron-opendaylight.yaml -e \ /neutron-bgpvpn-opendaylight.yaml This change documents the recursive function used to find the SDN env files and includes the default for the SDN controller. JIRA: APEX-555 Change-Id: I4270932ca4fbc21ea54e965d9d6491424f4463e2 Signed-off-by: Tim Rozet --- apex/tests/test_apex_overcloud_deploy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'apex/tests') diff --git a/apex/tests/test_apex_overcloud_deploy.py b/apex/tests/test_apex_overcloud_deploy.py index 59e9048f..8ff98a8d 100644 --- a/apex/tests/test_apex_overcloud_deploy.py +++ b/apex/tests/test_apex_overcloud_deploy.py @@ -7,6 +7,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import os import sys import unittest @@ -26,6 +27,7 @@ from apex.overcloud.deploy import generate_ceph_key from apex.overcloud.deploy import prep_storage_env from apex.overcloud.deploy import external_network_cmds from apex.overcloud.deploy import create_congress_cmds +from apex.overcloud.deploy import SDN_FILE_MAP from nose.tools import ( assert_regexp_matches, @@ -70,6 +72,14 @@ class TestOvercloudDeploy(unittest.TestCase): res = '/usr/share/openstack-tripleo-heat-templates/environments/test' assert_equal(build_sdn_env_list(ds, sdn_map), [res]) + def test_build_sdn_env_list_with_default(self): + ds = {'sdn_controller': 'opendaylight', + 'vpn': True} + prefix = '/usr/share/openstack-tripleo-heat-templates/environments' + res = [os.path.join(prefix, 'neutron-opendaylight.yaml'), + os.path.join(prefix, 'neutron-bgpvpn-opendaylight.yaml')] + assert_equal(build_sdn_env_list(ds, SDN_FILE_MAP), res) + @patch('apex.overcloud.deploy.prep_storage_env') @patch('apex.overcloud.deploy.build_sdn_env_list') @patch('builtins.open', mock_open()) -- cgit 1.2.3-korg