Adding gluon to the Build and Deploysystem
[apex.git] / lib / python / apex / deploy_settings.py
index 24287b8..2a9d5a6 100644 (file)
@@ -22,7 +22,8 @@ REQ_DEPLOY_SETTINGS = ['sdn_controller',
                        'sfc',
                        'vpn',
                        'vpp',
-                       'ceph']
+                       'ceph',
+                       'gluon']
 
 OPT_DEPLOY_SETTINGS = ['performance', 'vsperf', 'ceph_device', 'yardstick']
 
@@ -69,6 +70,15 @@ class DeploySettings(dict):
         if not isinstance(deploy_options, dict):
             raise DeploySettingsException("deploy_options should be a list")
 
+        if ('gluon' in self['deploy_options'] and
+           'vpn' in self['deploy_options']):
+                if (self['deploy_options']['gluon'] is True and
+                   self['deploy_options']['vpn'] is False):
+                        raise DeploySettingsException(
+                            "Invalid deployment configuration: "
+                            "If gluon is enabled, "
+                            "vpn also needs to be enabled")
+
         for setting, value in deploy_options.items():
             if setting not in REQ_DEPLOY_SETTINGS + OPT_DEPLOY_SETTINGS:
                 raise DeploySettingsException("Invalid deploy_option {} "