Merge "Fix generation of watcher config file"
This commit is contained in:
@@ -157,13 +157,17 @@
|
|||||||
# timeout exception when timeout expired. (integer value)
|
# timeout exception when timeout expired. (integer value)
|
||||||
#rpc_poll_timeout = 1
|
#rpc_poll_timeout = 1
|
||||||
|
|
||||||
# Shows whether zmq-messaging uses broker or not. (boolean value)
|
# Configures zmq-messaging to use broker or not. (boolean value)
|
||||||
#zmq_use_broker = true
|
#zmq_use_broker = false
|
||||||
|
|
||||||
# Minimal port number for random ports range. (integer value)
|
# Minimal port number for random ports range. (port value)
|
||||||
|
# Minimum value: 1
|
||||||
|
# Maximum value: 65535
|
||||||
#rpc_zmq_min_port = 49152
|
#rpc_zmq_min_port = 49152
|
||||||
|
|
||||||
# Maximal port number for random ports range. (integer value)
|
# Maximal port number for random ports range. (integer value)
|
||||||
|
# Minimum value: 1
|
||||||
|
# Maximum value: 65536
|
||||||
#rpc_zmq_max_port = 65536
|
#rpc_zmq_max_port = 65536
|
||||||
|
|
||||||
# Number of retries to find free port number before fail with
|
# Number of retries to find free port number before fail with
|
||||||
@@ -173,7 +177,9 @@
|
|||||||
# Host to locate redis. (string value)
|
# Host to locate redis. (string value)
|
||||||
#host = 127.0.0.1
|
#host = 127.0.0.1
|
||||||
|
|
||||||
# Use this port to connect to redis host. (integer value)
|
# Use this port to connect to redis host. (port value)
|
||||||
|
# Minimum value: 1
|
||||||
|
# Maximum value: 65535
|
||||||
#port = 6379
|
#port = 6379
|
||||||
|
|
||||||
# Password for Redis server (optional). (string value)
|
# Password for Redis server (optional). (string value)
|
||||||
@@ -185,16 +191,19 @@
|
|||||||
|
|
||||||
# The Drivers(s) to handle sending notifications. Possible values are
|
# The Drivers(s) to handle sending notifications. Possible values are
|
||||||
# messaging, messagingv2, routing, log, test, noop (multi valued)
|
# messaging, messagingv2, routing, log, test, noop (multi valued)
|
||||||
#notification_driver =
|
# Deprecated group/name - [DEFAULT]/notification_driver
|
||||||
|
#driver =
|
||||||
|
|
||||||
# A URL representing the messaging driver to use for notifications. If
|
# A URL representing the messaging driver to use for notifications. If
|
||||||
# not set, we fall back to the same configuration used for RPC.
|
# not set, we fall back to the same configuration used for RPC.
|
||||||
# (string value)
|
# (string value)
|
||||||
#notification_transport_url = <None>
|
# Deprecated group/name - [DEFAULT]/notification_transport_url
|
||||||
|
#transport_url = <None>
|
||||||
|
|
||||||
# AMQP topic used for OpenStack notifications. (list value)
|
# AMQP topic used for OpenStack notifications. (list value)
|
||||||
# Deprecated group/name - [rpc_notifier2]/topics
|
# Deprecated group/name - [rpc_notifier2]/topics
|
||||||
#notification_topics = notifications
|
# Deprecated group/name - [DEFAULT]/notification_topics
|
||||||
|
#topics = notifications
|
||||||
|
|
||||||
# Seconds to wait for a response from a call. (integer value)
|
# Seconds to wait for a response from a call. (integer value)
|
||||||
#rpc_response_timeout = 60
|
#rpc_response_timeout = 60
|
||||||
@@ -205,7 +214,7 @@
|
|||||||
#transport_url = <None>
|
#transport_url = <None>
|
||||||
|
|
||||||
# The messaging driver to use, defaults to rabbit. Other drivers
|
# The messaging driver to use, defaults to rabbit. Other drivers
|
||||||
# include qpid and zmq. (string value)
|
# include amqp and zmq. (string value)
|
||||||
#rpc_backend = rabbit
|
#rpc_backend = rabbit
|
||||||
|
|
||||||
# The default exchange under which topics are scoped. May be
|
# The default exchange under which topics are scoped. May be
|
||||||
@@ -508,6 +517,14 @@
|
|||||||
# Service tenant name. (string value)
|
# Service tenant name. (string value)
|
||||||
#admin_tenant_name = admin
|
#admin_tenant_name = admin
|
||||||
|
|
||||||
|
# Authentication type to load (unknown value)
|
||||||
|
# Deprecated group/name - [DEFAULT]/auth_plugin
|
||||||
|
#auth_type = <None>
|
||||||
|
|
||||||
|
# Config Section from which to load plugin specific options (unknown
|
||||||
|
# value)
|
||||||
|
#auth_section = <None>
|
||||||
|
|
||||||
|
|
||||||
[matchmaker_redis]
|
[matchmaker_redis]
|
||||||
|
|
||||||
@@ -518,7 +535,9 @@
|
|||||||
# Host to locate redis. (string value)
|
# Host to locate redis. (string value)
|
||||||
#host = 127.0.0.1
|
#host = 127.0.0.1
|
||||||
|
|
||||||
# Use this port to connect to redis host. (integer value)
|
# Use this port to connect to redis host. (port value)
|
||||||
|
# Minimum value: 1
|
||||||
|
# Maximum value: 65535
|
||||||
#port = 6379
|
#port = 6379
|
||||||
|
|
||||||
# Password for Redis server (optional). (string value)
|
# Password for Redis server (optional). (string value)
|
||||||
@@ -599,82 +618,6 @@
|
|||||||
#password =
|
#password =
|
||||||
|
|
||||||
|
|
||||||
[oslo_messaging_qpid]
|
|
||||||
|
|
||||||
#
|
|
||||||
# From oslo.messaging
|
|
||||||
#
|
|
||||||
|
|
||||||
# Use durable queues in AMQP. (boolean value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/amqp_durable_queues
|
|
||||||
# Deprecated group/name - [DEFAULT]/rabbit_durable_queues
|
|
||||||
#amqp_durable_queues = false
|
|
||||||
|
|
||||||
# Auto-delete queues in AMQP. (boolean value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/amqp_auto_delete
|
|
||||||
#amqp_auto_delete = false
|
|
||||||
|
|
||||||
# Send a single AMQP reply to call message. The current behaviour
|
|
||||||
# since oslo-incubator is to send two AMQP replies - first one with
|
|
||||||
# the payload, a second one to ensure the other have finish to send
|
|
||||||
# the payload. We are going to remove it in the N release, but we must
|
|
||||||
# keep backward compatible at the same time. This option provides such
|
|
||||||
# compatibility - it defaults to False in Liberty and can be turned on
|
|
||||||
# for early adopters with a new installations or for testing. Please
|
|
||||||
# note, that this option will be removed in the Mitaka release.
|
|
||||||
# (boolean value)
|
|
||||||
#send_single_reply = false
|
|
||||||
|
|
||||||
# Qpid broker hostname. (string value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_hostname
|
|
||||||
#qpid_hostname = localhost
|
|
||||||
|
|
||||||
# Qpid broker port. (integer value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_port
|
|
||||||
#qpid_port = 5672
|
|
||||||
|
|
||||||
# Qpid HA cluster host:port pairs. (list value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_hosts
|
|
||||||
#qpid_hosts = $qpid_hostname:$qpid_port
|
|
||||||
|
|
||||||
# Username for Qpid connection. (string value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_username
|
|
||||||
#qpid_username =
|
|
||||||
|
|
||||||
# Password for Qpid connection. (string value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_password
|
|
||||||
#qpid_password =
|
|
||||||
|
|
||||||
# Space separated list of SASL mechanisms to use for auth. (string
|
|
||||||
# value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_sasl_mechanisms
|
|
||||||
#qpid_sasl_mechanisms =
|
|
||||||
|
|
||||||
# Seconds between connection keepalive heartbeats. (integer value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_heartbeat
|
|
||||||
#qpid_heartbeat = 60
|
|
||||||
|
|
||||||
# Transport to use, either 'tcp' or 'ssl'. (string value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_protocol
|
|
||||||
#qpid_protocol = tcp
|
|
||||||
|
|
||||||
# Whether to disable the Nagle algorithm. (boolean value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_tcp_nodelay
|
|
||||||
#qpid_tcp_nodelay = true
|
|
||||||
|
|
||||||
# The number of prefetched messages held by receiver. (integer value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_receiver_capacity
|
|
||||||
#qpid_receiver_capacity = 1
|
|
||||||
|
|
||||||
# The qpid topology version to use. Version 1 is what was originally
|
|
||||||
# used by impl_qpid. Version 2 includes some backwards-incompatible
|
|
||||||
# changes that allow broker federation to work. Users should update
|
|
||||||
# to version 2 when they are able to take everything down, as it
|
|
||||||
# requires a clean break. (integer value)
|
|
||||||
# Deprecated group/name - [DEFAULT]/qpid_topology_version
|
|
||||||
#qpid_topology_version = 1
|
|
||||||
|
|
||||||
|
|
||||||
[oslo_messaging_rabbit]
|
[oslo_messaging_rabbit]
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -725,18 +668,26 @@
|
|||||||
# Deprecated group/name - [DEFAULT]/kombu_reconnect_delay
|
# Deprecated group/name - [DEFAULT]/kombu_reconnect_delay
|
||||||
#kombu_reconnect_delay = 1.0
|
#kombu_reconnect_delay = 1.0
|
||||||
|
|
||||||
# How long to wait before considering a reconnect attempt to have
|
# How long to wait a missing client beforce abandoning to send it its
|
||||||
# failed. This value should not be longer than rpc_response_timeout.
|
# replies. This value should not be longer than rpc_response_timeout.
|
||||||
# (integer value)
|
# (integer value)
|
||||||
#kombu_reconnect_timeout = 60
|
# Deprecated group/name - [DEFAULT]/kombu_reconnect_timeout
|
||||||
|
#kombu_missing_consumer_retry_timeout = 5
|
||||||
|
|
||||||
|
# Determines how the next RabbitMQ node is chosen in case the one we
|
||||||
|
# are currently connected to becomes unavailable. Takes effect only if
|
||||||
|
# more than one RabbitMQ node is provided in config. (string value)
|
||||||
|
# Allowed values: round-robin, shuffle
|
||||||
|
#kombu_failover_strategy = round-robin
|
||||||
|
|
||||||
# The RabbitMQ broker address where a single node is used. (string
|
# The RabbitMQ broker address where a single node is used. (string
|
||||||
# value)
|
# value)
|
||||||
# Deprecated group/name - [DEFAULT]/rabbit_host
|
# Deprecated group/name - [DEFAULT]/rabbit_host
|
||||||
#rabbit_host = localhost
|
#rabbit_host = localhost
|
||||||
|
|
||||||
# The RabbitMQ broker port where a single node is used. (integer
|
# The RabbitMQ broker port where a single node is used. (port value)
|
||||||
# value)
|
# Minimum value: 1
|
||||||
|
# Maximum value: 65535
|
||||||
# Deprecated group/name - [DEFAULT]/rabbit_port
|
# Deprecated group/name - [DEFAULT]/rabbit_port
|
||||||
#rabbit_port = 5672
|
#rabbit_port = 5672
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import watcher.api.app
|
import watcher.api.app
|
||||||
from watcher.applier import manager_applier
|
from watcher.applier import manager as applier_manager
|
||||||
from watcher.decision_engine import manager
|
from watcher.decision_engine import manager as decision_engine_manger
|
||||||
from watcher.decision_engine.strategy.selection import default \
|
from watcher.decision_engine.strategy.selection import default \
|
||||||
as strategy_selector
|
as strategy_selector
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ def list_opts():
|
|||||||
('api', watcher.api.app.API_SERVICE_OPTS),
|
('api', watcher.api.app.API_SERVICE_OPTS),
|
||||||
('watcher_goals', strategy_selector.WATCHER_GOALS_OPTS),
|
('watcher_goals', strategy_selector.WATCHER_GOALS_OPTS),
|
||||||
('watcher_decision_engine',
|
('watcher_decision_engine',
|
||||||
manager.WATCHER_DECISION_ENGINE_OPTS),
|
decision_engine_manger.WATCHER_DECISION_ENGINE_OPTS),
|
||||||
('watcher_applier',
|
('watcher_applier',
|
||||||
manager_applier.APPLIER_MANAGER_OPTS)
|
applier_manager.APPLIER_MANAGER_OPTS)
|
||||||
]
|
]
|
||||||
|
|||||||
31
watcher/tests/test_list_opts.py
Normal file
31
watcher/tests/test_list_opts.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# -*- encoding: utf-8 -*-
|
||||||
|
# Copyright (c) 2015 b<>com
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import watcher.opts as opt
|
||||||
|
|
||||||
|
from watcher.tests.base import BaseTestCase
|
||||||
|
|
||||||
|
|
||||||
|
class TestListOpts(BaseTestCase):
|
||||||
|
def setUp(self):
|
||||||
|
super(TestListOpts, self).setUp()
|
||||||
|
|
||||||
|
def test_run_list_opts(self):
|
||||||
|
result = opt.list_opts()
|
||||||
|
self.assertIsNotNone(result)
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# 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.
|
|
||||||
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
|
|
||||||
class TestUnits(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_units(self):
|
|
||||||
assert 5 * 5 == 25
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
"""
|
|
||||||
test_watcher
|
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
Tests for `watcher` module.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from watcher.tests import base
|
|
||||||
|
|
||||||
|
|
||||||
class TestWatcher(base.TestCase):
|
|
||||||
|
|
||||||
def test_something(self):
|
|
||||||
pass
|
|
||||||
Reference in New Issue
Block a user