Add floating_ip_enabled option
Change-Id: Ia5d062e895d320aabbf3feb0f81b03189ea071ac
This commit is contained in:
parent
7762c6e801
commit
4ade6d4006
|
@ -95,6 +95,10 @@ class Config(object):
|
|||
raise Exception('config missing image_id key')
|
||||
cls.image_id = CONF.magnum.image_id
|
||||
|
||||
@classmethod
|
||||
def set_floating_ip_enabled(cls, config):
|
||||
cls.floating_ip_enabled = CONF.magnum.floating_ip_enabled
|
||||
|
||||
@classmethod
|
||||
def set_nic_id(cls, config):
|
||||
if 'nic_id' not in CONF.magnum:
|
||||
|
@ -180,3 +184,4 @@ class Config(object):
|
|||
cls.set_network_driver(config)
|
||||
cls.set_cluster_template_id(config)
|
||||
cls.set_cluster_creation_timeout(config)
|
||||
cls.set_floating_ip_enabled(config)
|
||||
|
|
|
@ -357,7 +357,8 @@ def cluster_template_data(**kwargs):
|
|||
"master_flavor_id": data_utils.rand_name('cluster'),
|
||||
"external_network_id": config.Config.nic_id,
|
||||
"keypair_id": data_utils.rand_name('cluster'),
|
||||
"image_id": data_utils.rand_name('cluster')
|
||||
"image_id": data_utils.rand_name('cluster'),
|
||||
"floating_ip_enabled": True
|
||||
}
|
||||
|
||||
data.update(kwargs)
|
||||
|
@ -507,6 +508,7 @@ def valid_cluster_template(is_public=False):
|
|||
no_proxy=None, network_driver=config.Config.network_driver,
|
||||
volume_driver=None, labels={},
|
||||
docker_storage_driver=config.Config.docker_storage_driver,
|
||||
floating_ip_enabled=config.Config.floating_ip_enabled,
|
||||
tls_disabled=False)
|
||||
|
||||
|
||||
|
|
|
@ -68,4 +68,7 @@ MagnumGroup = [
|
|||
default=30,
|
||||
help="Timeout(in minutes) to wait for the cluster creation "
|
||||
"finished."),
|
||||
cfg.BoolOpt("floating_ip_enabled",
|
||||
help="Indicates whether created Clusters should have a "
|
||||
"floating ip"),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue