summaryrefslogtreecommitdiffstats
path: root/apex/tests
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-01-11 10:41:29 -0500
committerTim Rozet <trozet@redhat.com>2018-01-11 10:41:29 -0500
commit847f7673f8ba68583c85eee5c30d7657f82ad50f (patch)
tree8e8629ef2a218d8c6333a70a3fa82d914d8e7389 /apex/tests
parent70fd8005504c6db51c7dfb1f9c52ef904ab3d181 (diff)
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 <tht_dir>/neutron-opendaylight.yaml -e \ <tht_dir>/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 <trozet@redhat.com>
Diffstat (limited to 'apex/tests')
-rw-r--r--apex/tests/test_apex_overcloud_deploy.py10
1 files changed, 10 insertions, 0 deletions
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())