From 5220d2bc9252fc29c00efc24d400296139186b4d Mon Sep 17 00:00:00 2001 From: Dimitri Mazmanov Date: Thu, 21 Jul 2016 14:04:08 +0200 Subject: [PATCH] Remove unused configuration options Updated setup.cfg by removing unavailable configuration options. Change-Id: I0621bad3fb8b382117752e3c6b32ceb2cb60e129 Fixes-Bug: #1605208 --- config-generator.conf | 22 ---------- kingbird/common/baserpc.py | 81 ------------------------------------- kingbird/engine/README.rst | 7 ---- setup.cfg | 6 +-- tools/config-generator.conf | 13 ++++-- 5 files changed, 10 insertions(+), 119 deletions(-) delete mode 100644 config-generator.conf delete mode 100644 kingbird/common/baserpc.py diff --git a/config-generator.conf b/config-generator.conf deleted file mode 100644 index 676b258..0000000 --- a/config-generator.conf +++ /dev/null @@ -1,22 +0,0 @@ -[DEFAULT] -output_file = etc/kingbird/kingbird.conf.sample -wrap_width = 79 -namespace = kingbird.common.config -namespace = kingbird.common.manager -namespace = kingbird.common.baserpc -namespace = kingbird.engine.engine_config -namespace = kingbird.engine.kingbird_lock -namespace = kingbird.engine.quota_manager -namespace = kingbird.engine.service -namespace = kingbird.engine.listener -namespace = kingbird.api.api_config -namespace = kingbird.api.controllers.quota_manager -namespace = keystonemiddleware.auth_token -namespace = oslo.messaging -namespace = oslo.middleware -namespace = oslo.db -namespace = oslo.log -namespace = oslo.policy -namespace = oslo.service.service -namespace = oslo.service.periodic_task -namespace = oslo.service.sslutils diff --git a/kingbird/common/baserpc.py b/kingbird/common/baserpc.py deleted file mode 100644 index 217bf04..0000000 --- a/kingbird/common/baserpc.py +++ /dev/null @@ -1,81 +0,0 @@ -# -# Copyright 2013 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# copy and modify from OpenStack Nova - -"""Base RPC client and server common to all services.""" - -from oslo_config import cfg -import oslo_messaging as messaging -from oslo_serialization import jsonutils - -from kingbird.common import rpc - -CONF = cfg.CONF -rpc_api_cap_opt = [ - cfg.StrOpt('base_client_api', - help='Set a version cap for messages sent to the' - 'base api in any service') -] - -rpc_api_group = cfg.OptGroup('rpc_api_options') -cfg.CONF.register_group(rpc_api_group) -cfg.CONF.register_opts(rpc_api_cap_opt, group=rpc_api_group) - -_NAMESPACE = 'base_client_api' - - -class BaseClientAPI(object): - """Client side of the base rpc API. - - API version history: - 1.0 - Initial version. - """ - - VERSION_ALIASES = { - # baseapi was added in the first version of Kingbird - } - - def __init__(self, topic): - """Init method for BaseClientApi Class.""" - super(BaseClientAPI, self).__init__() - target = messaging.Target(topic=topic, - namespace=_NAMESPACE, - version='1.0') - version_cap = self.VERSION_ALIASES.get(CONF.rpc_api_options.baseapi, - CONF.rpc_api_options.baseapi) - self.client = rpc.get_client(target, version_cap=version_cap) - - def ping(self, context, arg, timeout=None): - arg_p = jsonutils.to_primitive(arg) - cctxt = self.client.prepare(timeout=timeout) - return cctxt.call(context, 'ping', arg=arg_p) - - -class BaseServerRPCAPI(object): - """Server side of the base RPC API.""" - - target = messaging.Target(namespace=_NAMESPACE, version='1.0') - - def __init__(self, service_name): - self.service_name = service_name - - def ping(self, context, arg): - resp = {'service': self.service_name, 'arg': arg} - return jsonutils.to_primitive(resp) - - -def list_opts(): - yield rpc_api_group.name, rpc_api_cap_opt diff --git a/kingbird/engine/README.rst b/kingbird/engine/README.rst index 770cb91..53d4798 100755 --- a/kingbird/engine/README.rst +++ b/kingbird/engine/README.rst @@ -3,8 +3,6 @@ Service =============================== Kingbird Service has responsibility for: - Delegate the task to concerned engine component managed by a EngineManager - in listener.py Monitoring the job/smaller jobs status, and return the result to Kingbird API if needed. @@ -21,11 +19,6 @@ Kingbird Service has responsibility for: service.py: run KB service in multi-worker mode, and establish RPC server -listener.py - Manages all engine side activities such as Quota Enforcement, - synchronisation of ssh keys, images, flavors, security groups, - etc. across regions - engine_cfg.py: configuration and initialization for Engine service diff --git a/setup.cfg b/setup.cfg index 97efe46..49aef82 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,13 +34,9 @@ tempest.test_plugins = oslo.config.opts = kingbird.common.config = kingbird.common.config:list_opts - kingbird.common.manager = kingbird.common.manager:list_opts - kingbird.engine.engine_config = kingbird.engine.engine_config:list_opts - kingbird.engine.listener = kingbird.engine.listener:list_opts kingbird.engine.quota_manager = kingbird.engine.quota_manager:list_opts + kingbird.engine.kingbird_lock = kingbird.engine.kingbird_lock:list_opts kingbird.common.api.api_config = kingbird.api.api_config:list_opts - kingbird.common.baserpc= kingbird.common.baserpc:list_opts - kingbird.api.controllers.quota_manage= kingbird.api.controllers.quota_manage:list_opts [build_sphinx] source-dir = doc/source diff --git a/tools/config-generator.conf b/tools/config-generator.conf index 701f590..42c93e2 100644 --- a/tools/config-generator.conf +++ b/tools/config-generator.conf @@ -1,11 +1,16 @@ [DEFAULT] output_file = etc/kingbird/kingbird.conf.sample -wrap_width = 119 +wrap_width = 79 namespace = kingbird.common.config -namespace = kingbird.common.wsgi -namespace = kingbird.openstack.common.eventlet_backdoor +namespace = kingbird.engine.kingbird_lock +namespace = kingbird.engine.quota_manager +namespace = kingbird.api.api_config namespace = keystonemiddleware.auth_token +namespace = oslo.messaging +namespace = oslo.middleware namespace = oslo.db namespace = oslo.log -namespace = oslo.messaging namespace = oslo.policy +namespace = oslo.service.service +namespace = oslo.service.periodic_task +namespace = oslo.service.sslutils