Merge "Backport Mitaka option to disable auto added resources. The default value for the new configuration option preserves the original behavior at the time of Liberty release." into stable/liberty
This commit is contained in:
commit
ddbf246531
|
@ -44,7 +44,12 @@ akanda_opts = [
|
|||
cfg.ListOpt(
|
||||
'akanda_allowed_cidr_ranges',
|
||||
default=['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'],
|
||||
help='List of allowed subnet cidrs for non-admin users')
|
||||
help='List of allowed subnet cidrs for non-admin users'),
|
||||
cfg.BoolOpt(
|
||||
'astara_auto_add_resources',
|
||||
default=True,
|
||||
help='Attempt to auto add resources to speed up network construction'
|
||||
)
|
||||
]
|
||||
|
||||
cfg.CONF.register_opts(akanda_opts)
|
||||
|
@ -59,7 +64,8 @@ def auto_add_ipv6_subnet(f):
|
|||
def wrapper(self, context, network):
|
||||
LOG.debug('auto_add_ipv6_subnet')
|
||||
net = f(self, context, network)
|
||||
_add_ipv6_subnet(context, net)
|
||||
if cfg.CONF.astara_auto_add_resources:
|
||||
_add_ipv6_subnet(context, net)
|
||||
return net
|
||||
return wrapper
|
||||
|
||||
|
@ -70,7 +76,8 @@ def auto_add_subnet_to_router(f):
|
|||
LOG.debug('auto_add_subnet_to_router')
|
||||
check_subnet_cidr_meets_policy(context, subnet)
|
||||
subnet = f(self, context, subnet)
|
||||
_add_subnet_to_router(context, subnet)
|
||||
if cfg.CONF.astara_auto_add_resources:
|
||||
_add_subnet_to_router(context, subnet)
|
||||
return subnet
|
||||
return wrapper
|
||||
|
||||
|
|
Loading…
Reference in New Issue