summaryrefslogtreecommitdiffstats
path: root/lib/python
diff options
context:
space:
mode:
authorMichael Chapman <woppin@gmail.com>2016-06-01 15:10:05 +1000
committerMichael Chapman <woppin@gmail.com>2016-06-09 01:27:39 +1000
commit8f72afed8531337a02c43835693a0caa2c977753 (patch)
treed415b8dac18f5927109f4c78706ad5229ecac83b /lib/python
parent5c9c130fb9d6609ac1f0ebbf6945e63667c6b168 (diff)
Add dataplane deploy setting
Adds the dataplane deploy option, which can have values of ovs, ovs_dpdk, or fdio. Currently does nothing JIRA: APEX-119 Change-Id: I6c14a9c9d6887a325525d634052ea8300b30ee57 Signed-off-by: Michael Chapman <woppin@gmail.com>
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/apex/deploy_env.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/python/apex/deploy_env.py b/lib/python/apex/deploy_env.py
index bfb94f50..25e2d0a7 100644
--- a/lib/python/apex/deploy_env.py
+++ b/lib/python/apex/deploy_env.py
@@ -15,6 +15,7 @@ REQ_DEPLOY_SETTINGS = ['sdn_controller',
'sdn_l3',
'tacker',
'congress',
+ 'dataplane',
'sfc',
'vpn']
@@ -22,6 +23,7 @@ OPT_DEPLOY_SETTINGS = ['performance']
VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage']
VALID_PERF_OPTS = ['kernel','nova']
+VALID_DATAPLANES = ['ovs','ovs_dpdk','fdio']
class DeploySettings:
"""
@@ -54,14 +56,24 @@ class DeploySettings:
if not isinstance(deploy_options, dict):
raise DeploySettingsException("deploy_options should be a list")
- for option in deploy_options:
- if option not in REQ_DEPLOY_SETTINGS + OPT_DEPLOY_SETTINGS:
+ for setting, value in deploy_options.items():
+ if setting not in REQ_DEPLOY_SETTINGS + OPT_DEPLOY_SETTINGS:
raise DeploySettingsException("Invalid deploy_option {} "
- "specified".format(option))
-
- for required_setting in REQ_DEPLOY_SETTINGS:
- if required_setting not in deploy_options:
- self.deploy_settings['deploy_options']['required'] = False
+ "specified".format(setting))
+ if setting == 'dataplane':
+ if value not in VALID_DATAPLANES:
+ planes = ' '.join(VALID_DATAPLANES)
+ raise DeploySettingsException("Invalid dataplane {} "
+ "specified. Valid dataplanes:"
+ " {}".format(value,planes))
+
+
+ for req_set in REQ_DEPLOY_SETTINGS:
+ if req_set not in deploy_options:
+ if req_set == 'dataplane':
+ self.deploy_settings['deploy_options'][req_set] = 'ovs'
+ else:
+ self.deploy_settings['deploy_options'][req_set] = False
if 'performance' in deploy_options:
if not isinstance(deploy_options['performance'], dict):