Revert "Make heat the default collection method"
This reverts commit 6b478e9d90
.
We will break anybody who is expecting CFN to be tried in all
circumstances with this. We probably just need to base which collectors
to try on what configuration we have, and not log warnings on
unconfigured collectors.
Change-Id: I4bf7d6f9af9487bf9d2c0942381c0ba68fc03ee9
This commit is contained in:
parent
6b478e9d90
commit
42efe2b969
|
@ -33,8 +33,7 @@ from os_collect_config import keystone
|
|||
from os_collect_config import version
|
||||
from oslo.config import cfg
|
||||
|
||||
ALL_COLLECTORS = ['heat_local', 'ec2', 'heat', 'cfn']
|
||||
DEFAULT_COLLECTORS = ['heat_local', 'ec2', 'heat']
|
||||
DEFAULT_COLLECTORS = ['heat_local', 'ec2', 'cfn', 'heat']
|
||||
opts = [
|
||||
cfg.StrOpt('command', short='c',
|
||||
help='Command to run on metadata changes. If specified,'
|
||||
|
@ -206,11 +205,11 @@ def __main__(args=sys.argv, collector_kwargs_map=None):
|
|||
print(CONF.cachedir)
|
||||
return
|
||||
|
||||
unknown_collectors = set(CONF.collectors) - set(ALL_COLLECTORS)
|
||||
unknown_collectors = set(CONF.collectors) - set(DEFAULT_COLLECTORS)
|
||||
if unknown_collectors:
|
||||
raise exc.InvalidArguments(
|
||||
'Unknown collectors %s. Valid collectors are: %s' %
|
||||
(list(unknown_collectors), ALL_COLLECTORS))
|
||||
(list(unknown_collectors), DEFAULT_COLLECTORS))
|
||||
|
||||
if CONF.force:
|
||||
CONF.set_override('one_time', True)
|
||||
|
|
|
@ -114,8 +114,7 @@ class TestCollect(testtools.TestCase):
|
|||
'--heat-stack-id',
|
||||
'a/c482680f-7238-403d-8f76-36acf0c8e0aa',
|
||||
'--heat-resource-name',
|
||||
'server',
|
||||
'heat_local', 'ec2', 'cfn', 'heat',
|
||||
'server'
|
||||
]
|
||||
calls = self._fake_popen_call_main(occ_args)
|
||||
proc_args = calls[0]
|
||||
|
@ -204,7 +203,6 @@ class TestCollect(testtools.TestCase):
|
|||
'0123456789ABCDEF',
|
||||
'--cfn-secret-access-key',
|
||||
'FEDCBA9876543210',
|
||||
'heat_local', 'ec2', 'cfn', 'heat',
|
||||
]
|
||||
fake_metadata = _setup_local_metadata(self)
|
||||
fake_args.append('--heat_local-path')
|
||||
|
@ -256,7 +254,6 @@ class TestCollect(testtools.TestCase):
|
|||
'--cfn-secret-access-key',
|
||||
'FEDCBA9876543210',
|
||||
'--heat_local-path', fake_metadata,
|
||||
'heat_local', 'ec2', 'cfn', 'heat',
|
||||
]
|
||||
|
||||
def fake_popen(args):
|
||||
|
@ -341,8 +338,6 @@ class TestCollectAll(testtools.TestCase):
|
|||
}
|
||||
if collectors is None:
|
||||
collectors = cfg.CONF.collectors
|
||||
if 'cfn' not in collectors:
|
||||
collectors.append('cfn')
|
||||
return collect.collect_all(
|
||||
collectors,
|
||||
store=store,
|
||||
|
|
Loading…
Reference in New Issue