Create TripleO section in tobiko.conf

Add parameters to be used to SSH to undercloud host and fetch
undercloud and overcloud RC files.

Change-Id: I93315da6eaab889331b2da1dc70c3fd30955d8e9
This commit is contained in:
pkomarov 2019-08-11 17:04:12 +03:00 committed by Federico Ressi
parent 809714571f
commit 1df1a307bd
3 changed files with 51 additions and 1 deletions

View File

@ -31,7 +31,8 @@ CONFIG_MODULES = ['tobiko.openstack.glance.config',
'tobiko.openstack.nova.config',
'tobiko.shell.ssh.config',
'tobiko.shell.ping.config',
'tobiko.shell.sh.config']
'tobiko.shell.sh.config',
'tobiko.tripleo.config']
def _iter_config_dirs():

View File

49
tobiko/tripleo/config.py Normal file
View File

@ -0,0 +1,49 @@
# Copyright 2019 Red Hat
#
# 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
import itertools
from oslo_config import cfg
GROUP_NAME = 'tripleo'
OPTIONS = [
cfg.StrOpt('undercloud_ssh_hostname',
default=None,
help="hostname or IP address to be used to connect to "
"undercloud host"),
cfg.IntOpt('undercloud_ssh_port',
default=22,
help="TCP port of undercloud port"),
cfg.StrOpt('undercloud_ssh_username',
default='stack',
help="Username with access to stackrc and overcloudrc files"),
cfg.StrOpt('ssh_key_filename',
default='~/.ssh/id_rsa',
help="SSH key filename used to login to TripleO nodes"),
cfg.StrOpt('undercloud_rcfile',
default='~/stackrc',
help="Undercloud RC filename"),
cfg.StrOpt('overcloud_rcfile',
default='~/overcloudrc',
help="Overcloud RC filename")]
def register_tobiko_options(conf):
conf.register_opts(group=cfg.OptGroup(GROUP_NAME), opts=OPTIONS)
def list_options():
return [(GROUP_NAME, itertools.chain(OPTIONS))]