| 1 |
# Copyright(c) 2016 Nippon Telegraph and Telephone Corporation |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
import socket |
| 16 |
|
| 17 |
from oslo_config import cfg |
| 18 |
|
| 19 |
service_opts = [ |
| 20 |
cfg.StrOpt('hostname', |
| 21 |
default=socket.gethostname(), |
| 22 |
deprecated_name="host", |
| 23 |
help=''' |
| 24 |
Hostname, FQDN or IP address of this host. Must be valid within AMQP key. |
| 25 |
|
| 26 |
Possible values: |
| 27 |
|
| 28 |
* String with hostname, FQDN or IP address. Default is hostname of this host. |
| 29 |
'''), |
| 30 |
cfg.StrOpt('instancemonitor_manager', |
| 31 |
default='masakarimonitors.instancemonitor.instance' |
| 32 |
'.InstancemonitorManager', |
| 33 |
help='Full class name for the Manager for instancemonitor.'), |
| 34 |
cfg.StrOpt('introspectiveinstancemonitor_manager', |
| 35 |
default='masakarimonitors.introspectiveinstancemonitor.instance' |
| 36 |
'.IntrospectiveInstanceMonitorManager', |
| 37 |
help='Full class name for introspectiveinstancemonitor.'), |
| 38 |
cfg.StrOpt('processmonitor_manager', |
| 39 |
default='masakarimonitors.processmonitor.process' |
| 40 |
'.ProcessmonitorManager', |
| 41 |
help='Full class name for the Manager for processmonitor.'), |
| 42 |
cfg.StrOpt('hostmonitor_manager', |
| 43 |
default='masakarimonitors.hostmonitor.host' |
| 44 |
'.HostmonitorManager', |
| 45 |
help='Full class name for the Manager for hostmonitor.'), |
| 46 |
] |
| 47 |
|
| 48 |
|
| 49 |
def register_opts(conf): |
| 50 |
conf.register_opts(service_opts) |
| 51 |
|
| 52 |
|
| 53 |
def list_opts(): |
| 54 |
return {'DEFAULT': service_opts} |