Move policy.json out of etc
Change-Id: I94c5b0f21e28eeaf8d87d33fa59e1e3a26c32a51
This commit is contained in:
parent
7b0435a706
commit
b0c91f9267
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2013 Red Hat, Inc
|
||||
# Copyright 2013-2017 Red Hat, Inc
|
||||
# Copyright 2012-2015 eNovance <licensing@enovance.com>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
@ -14,6 +14,8 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import os
|
||||
|
||||
from keystoneauth1 import loading as ka_loading
|
||||
from oslo_config import cfg
|
||||
from oslo_db import options as db_options
|
||||
@ -72,7 +74,8 @@ def prepare_service(argv=None, config_files=None):
|
||||
log.set_defaults(default_log_levels=log_levels)
|
||||
defaults.set_cors_middleware_defaults()
|
||||
db_options.set_defaults(conf)
|
||||
policy_opts.set_defaults(conf)
|
||||
policy_opts.set_defaults(conf, policy_file=os.path.abspath(
|
||||
os.path.join(os.path.dirname(__file__), "api", "policy.json")))
|
||||
from aodh import opts
|
||||
# Register our own Aodh options
|
||||
for group, options in opts.list_opts():
|
||||
|
@ -16,8 +16,6 @@
|
||||
"""Base classes for API tests.
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from oslo_config import fixture as fixture_config
|
||||
import webtest
|
||||
|
||||
@ -41,9 +39,6 @@ class FunctionalTest(db_test_base.TestBase):
|
||||
self.CONF = self.useFixture(fixture_config.Config(conf)).conf
|
||||
self.setup_messaging(self.CONF)
|
||||
|
||||
self.CONF.set_override('policy_file',
|
||||
os.path.abspath('etc/aodh/policy.json'),
|
||||
group='oslo_policy', enforce_type=True)
|
||||
self.CONF.set_override('auth_mode', None, group='api')
|
||||
self.app = webtest.TestApp(app.load_app(self.CONF))
|
||||
|
||||
|
@ -169,10 +169,6 @@ function configure_aodh {
|
||||
setup_colorized_logging $AODH_CONF DEFAULT
|
||||
fi
|
||||
|
||||
# Install the policy file for the API server
|
||||
cp $AODH_DIR/etc/aodh/policy.json $AODH_CONF_DIR
|
||||
iniset $AODH_CONF oslo_policy policy_file $AODH_CONF_DIR/policy.json
|
||||
|
||||
cp $AODH_DIR/etc/aodh/aodh-config-generator.conf $AODH_CONF_DIR
|
||||
|
||||
# The alarm evaluator needs these options to call gnocchi/ceilometer APIs
|
||||
|
Loading…
Reference in New Issue
Block a user