summaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-11-01 15:09:00 -0400
committerTim Rozet <trozet@redhat.com>2018-11-01 15:09:00 -0400
commitbe1a60fcde0c122266e8c074df729a1be75f5607 (patch)
tree9ce5c2838a95a93a0b6c0e9171cc32f7cbfbefb9 /apex
parent03ad54f56a111dc15a834ae28cbef03da0ad68af (diff)
Fix neutron_driver for odl
The neutron_driver for opendaylight needs to be set to 'odl' instead of 'opendaylight' Change-Id: Ib9345d8b9fc8be5b7a49ac961a2499220c1c1bd6 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex')
-rw-r--r--apex/builders/common_builder.py13
-rw-r--r--apex/tests/test_apex_common_builder.py6
2 files changed, 10 insertions, 9 deletions
diff --git a/apex/builders/common_builder.py b/apex/builders/common_builder.py
index e0e7303..2934a1d 100644
--- a/apex/builders/common_builder.py
+++ b/apex/builders/common_builder.py
@@ -265,14 +265,15 @@ def create_git_archive(repo_url, repo_name, tmp_dir,
def get_neutron_driver(ds_opts):
sdn = ds_opts.get('sdn_controller', None)
- for controllers in 'opendaylight', 'ovn':
- if sdn == controllers:
- return sdn
- if ds_opts.get('vpp', False):
+ if sdn == 'opendaylight':
+ return 'odl'
+ elif sdn == 'ovn':
+ return sdn
+ elif ds_opts.get('vpp', False):
return 'vpp'
-
- return None
+ else:
+ return None
def prepare_container_images(prep_file, branch='master', neutron_driver=None):
diff --git a/apex/tests/test_apex_common_builder.py b/apex/tests/test_apex_common_builder.py
index dede55a..dc4383b 100644
--- a/apex/tests/test_apex_common_builder.py
+++ b/apex/tests/test_apex_common_builder.py
@@ -259,7 +259,7 @@ class TestCommonBuilder(unittest.TestCase):
'vpn': False,
'sriov': False}
self.assertEquals(c_builder.get_neutron_driver(ds_opts),
- 'opendaylight')
+ 'odl')
ds_opts['sdn_controller'] = None
ds_opts['vpp'] = True
self.assertEquals(c_builder.get_neutron_driver(ds_opts),
@@ -288,7 +288,7 @@ class TestCommonBuilder(unittest.TestCase):
'ContainerImagePrepare': [
{'set':
{'namespace': 'docker.io/tripleoqueens',
- 'neutron_driver': 'opendaylight',
+ 'neutron_driver': 'odl',
}
}
]
@@ -296,7 +296,7 @@ class TestCommonBuilder(unittest.TestCase):
}
c_builder.prepare_container_images('dummy.yaml', 'queens',
- 'opendaylight')
+ 'odl')
mock_yaml.safe_dump.assert_called_with(
expected_output,
a_mock_open.return_value,