Add ironicclient

This patch set adds ironicclient.

Change-Id: I122a26465d339ee6e36c0f234d3fd6c57cee2afa
Partially-Implements: blueprint build-baremetal-data-model-in-watcher
This commit is contained in:
licanwei
2017-04-15 17:03:18 +08:00
parent 2e8fb5a821
commit f637a368d7
6 changed files with 99 additions and 1 deletions

2
watcher/conf/__init__.py Normal file → Executable file
View File

@@ -29,6 +29,7 @@ from watcher.conf import decision_engine
from watcher.conf import exception
from watcher.conf import glance_client
from watcher.conf import gnocchi_client
from watcher.conf import ironic_client
from watcher.conf import monasca_client
from watcher.conf import neutron_client
from watcher.conf import nova_client
@@ -56,3 +57,4 @@ cinder_client.register_opts(CONF)
ceilometer_client.register_opts(CONF)
neutron_client.register_opts(CONF)
clients_auth.register_opts(CONF)
ironic_client.register_opts(CONF)

41
watcher/conf/ironic_client.py Executable file
View File

@@ -0,0 +1,41 @@
# -*- encoding: utf-8 -*-
# Copyright (c) 2017 ZTE Corp
#
# Authors: Prudhvi Rao Shedimbi <prudhvi.rao.shedimbi@intel.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 oslo_config import cfg
ironic_client = cfg.OptGroup(name='ironic_client',
title='Configuration Options for Ironic')
IRONIC_CLIENT_OPTS = [
cfg.StrOpt('api_version',
default=1,
help='Version of Ironic API to use in ironicclient.'),
cfg.StrOpt('endpoint_type',
default='internalURL',
help='Type of endpoint to use in ironicclient.'
'Supported values: internalURL, publicURL, adminURL'
'The default is internalURL.')]
def register_opts(conf):
conf.register_group(ironic_client)
conf.register_opts(IRONIC_CLIENT_OPTS, group=ironic_client)
def list_opts():
return [('ironic_client', IRONIC_CLIENT_OPTS)]