Add Placement helper
This patch added Placement to Watcher We plan to improve the data model and strategies in the future specs. Change-Id: I7141459eef66557cd5d525b5887bd2a381cdac3f Implements: blueprint support-placement-api
This commit is contained in:
@@ -37,6 +37,7 @@ from watcher.conf import monasca_client
|
||||
from watcher.conf import neutron_client
|
||||
from watcher.conf import nova_client
|
||||
from watcher.conf import paths
|
||||
from watcher.conf import placement_client
|
||||
from watcher.conf import planner
|
||||
from watcher.conf import service
|
||||
|
||||
@@ -62,3 +63,4 @@ neutron_client.register_opts(CONF)
|
||||
clients_auth.register_opts(CONF)
|
||||
ironic_client.register_opts(CONF)
|
||||
collector.register_opts(CONF)
|
||||
placement_client.register_opts(CONF)
|
||||
|
||||
41
watcher/conf/placement_client.py
Normal file
41
watcher/conf/placement_client.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# 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 oslo_config import cfg
|
||||
|
||||
|
||||
placement_group = cfg.OptGroup(
|
||||
'placement_client',
|
||||
title='Placement Service Options',
|
||||
help="Configuration options for connecting to the placement API service")
|
||||
|
||||
placement_opts = [
|
||||
cfg.StrOpt('api_version',
|
||||
default='1.29',
|
||||
help='microversion of placement API when using '
|
||||
'placement service.'),
|
||||
cfg.StrOpt('interface',
|
||||
default='public',
|
||||
choices=['internal', 'public', 'admin'],
|
||||
help='Type of endpoint when using placement service.'),
|
||||
cfg.StrOpt('region_name',
|
||||
help='Region in Identity service catalog to use for '
|
||||
'communication with the OpenStack service.')]
|
||||
|
||||
|
||||
def register_opts(conf):
|
||||
conf.register_group(placement_group)
|
||||
conf.register_opts(placement_opts, group=placement_group)
|
||||
|
||||
|
||||
def list_opts():
|
||||
return [(placement_group.name, placement_opts)]
|
||||
Reference in New Issue
Block a user