Add Magnum config for default network driver per COE

Problem description:
Magnum should provide support for configuration of default network drivers per
COE. An example use case could be a cloud operator who would like to have
control of what default container network driver should be used on a per-COE
basis. The cloud operator in this case should be able to set the default
network driver per COE in /etc/magnum/magnum.conf.

Proposed fix:
Add 3 configuration list options to the config in /etc/magnum/magnum.conf:
- kubernetes_default_network_driver
  (default='flannel')
- swarm_default_network_driver
  (default='docker')
- mesos_default_network_driver
  (default='docker')
When a baymodel is created and the --network-driver attribute is not supplied,
then the configured default network driver for the selected COE will first be
checked against the list of allowed network drivers for that COE, and if
allowed, the configured default network driver will be used for the new
baymodel.

Change-Id: I1e1d68c3348f609975b914926994bd79c1ef6d28
Closes-Bug: #1504664
This commit is contained in:
Dane LeBlanc 2015-11-05 12:39:07 -05:00 committed by Daneyon Hansen
parent c457a95cf2
commit 431cb51911
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ def generate_random_coe():
def generate_random_coe_dep_network_driver(coe):
allowed_driver_types = {
'kubernetes': ['flannel', None],
'swarm': [None],
'mesos': [None],
'swarm': ['docker', None],
'mesos': ['docker', None],
}
driver_types = allowed_driver_types[coe]
return driver_types[random.randrange(0, len(driver_types))]