Only register dynamic pool options when running designate-manage
We only need to load this code path when converting an old designate configuration (pre-mitaka) into a pools.yaml file. Change-Id: Ia9587880ca2428c0b3af074f0cb2a873859685ec
This commit is contained in:
@@ -66,6 +66,11 @@ class PoolCommands(base.Commands):
|
||||
default='/etc/designate/pools.yaml')
|
||||
def export_from_config(self, file):
|
||||
self._startup()
|
||||
|
||||
# Avoid circular dependency imports
|
||||
from designate import pool_manager
|
||||
pool_manager.register_dynamic_pool_options()
|
||||
|
||||
try:
|
||||
pools = self.central_api.find_pools(self.context)
|
||||
except messaging.exceptions.MessagingTimeout:
|
||||
|
||||
@@ -82,10 +82,6 @@ def read_config(prog, argv):
|
||||
default_config_files=config_files)
|
||||
config.set_defaults()
|
||||
|
||||
# Avoid circular dependency imports
|
||||
from designate import pool_manager
|
||||
pool_manager.register_dynamic_pool_options()
|
||||
|
||||
|
||||
def resource_string(*args):
|
||||
if len(args) == 0:
|
||||
|
||||
Reference in New Issue
Block a user