Update tripleo configuration
Change-Id: Ia29124017160d9f61c4dd42cfe25275c10ca996d
This commit is contained in:
@@ -20,35 +20,50 @@ from tobiko.tests import unit
|
|||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
TIPLEO_CONF = CONF.tobiko.tripleo
|
||||||
|
|
||||||
|
|
||||||
|
class TripleoConfigTest(unit.TobikoUnitTest):
|
||||||
|
|
||||||
|
def test_ssh_key_filename(self):
|
||||||
|
self.assertIsInstance(TIPLEO_CONF.ssh_key_filename,
|
||||||
|
six.string_types)
|
||||||
|
|
||||||
|
|
||||||
class UndercloudConfigTest(unit.TobikoUnitTest):
|
class UndercloudConfigTest(unit.TobikoUnitTest):
|
||||||
|
|
||||||
conf = CONF.tobiko.tripleo
|
|
||||||
|
|
||||||
def test_undercloud_ssh_hostname(self):
|
def test_undercloud_ssh_hostname(self):
|
||||||
value = self.conf.undercloud_ssh_hostname
|
value = TIPLEO_CONF.undercloud_ssh_hostname
|
||||||
if value is not None:
|
if value is not None:
|
||||||
self.assertIsInstance(value, six.string_types)
|
self.assertIsInstance(value, six.string_types)
|
||||||
|
|
||||||
def test_undercloud_ssh_port(self):
|
def test_undercloud_ssh_port(self):
|
||||||
value = self.conf.undercloud_ssh_port
|
value = TIPLEO_CONF.undercloud_ssh_port
|
||||||
if value is not None:
|
if value is not None:
|
||||||
self.assertIsInstance(value, int)
|
self.assertIsInstance(value, int)
|
||||||
self.assertIn(value, six.moves.range(1, 2 ** 16))
|
self.assertIn(value, six.moves.range(1, 2 ** 16))
|
||||||
|
|
||||||
def test_undercloud_ssh_username(self):
|
def test_undercloud_ssh_username(self):
|
||||||
self.assertIsInstance(self.conf.undercloud_ssh_username,
|
self.assertIsInstance(TIPLEO_CONF.undercloud_ssh_username,
|
||||||
six.string_types)
|
|
||||||
|
|
||||||
def test_ssh_key_filename(self):
|
|
||||||
self.assertIsInstance(self.conf.ssh_key_filename,
|
|
||||||
six.string_types)
|
six.string_types)
|
||||||
|
|
||||||
def test_undercloud_rcfile(self):
|
def test_undercloud_rcfile(self):
|
||||||
self.assertIsInstance(self.conf.undercloud_rcfile,
|
self.assertIsInstance(TIPLEO_CONF.undercloud_rcfile,
|
||||||
|
six.string_types)
|
||||||
|
|
||||||
|
|
||||||
|
class OvercloudConfigTest(unit.TobikoUnitTest):
|
||||||
|
|
||||||
|
def test_overcloud_ssh_port(self):
|
||||||
|
value = TIPLEO_CONF.overcloud_ssh_port
|
||||||
|
if value is not None:
|
||||||
|
self.assertIsInstance(value, int)
|
||||||
|
self.assertIn(value, six.moves.range(1, 2 ** 16))
|
||||||
|
|
||||||
|
def test_overcloud_ssh_username(self):
|
||||||
|
self.assertIsInstance(TIPLEO_CONF.overcloud_ssh_username,
|
||||||
six.string_types)
|
six.string_types)
|
||||||
|
|
||||||
def test_overcloud_rcfile(self):
|
def test_overcloud_rcfile(self):
|
||||||
self.assertIsInstance(self.conf.overcloud_rcfile,
|
self.assertIsInstance(TIPLEO_CONF.overcloud_rcfile,
|
||||||
six.string_types)
|
six.string_types)
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ from oslo_config import cfg
|
|||||||
|
|
||||||
GROUP_NAME = 'tripleo'
|
GROUP_NAME = 'tripleo'
|
||||||
OPTIONS = [
|
OPTIONS = [
|
||||||
|
# TripleO options
|
||||||
|
cfg.StrOpt('ssh_key_filename',
|
||||||
|
default='~/.ssh/id_rsa',
|
||||||
|
help="SSH key filename used to login to TripleO nodes"),
|
||||||
|
|
||||||
|
# Undercloud options
|
||||||
cfg.StrOpt('undercloud_ssh_hostname',
|
cfg.StrOpt('undercloud_ssh_hostname',
|
||||||
default=None,
|
default=None,
|
||||||
help="hostname or IP address to be used to connect to "
|
help="hostname or IP address to be used to connect to "
|
||||||
@@ -29,12 +35,17 @@ OPTIONS = [
|
|||||||
cfg.StrOpt('undercloud_ssh_username',
|
cfg.StrOpt('undercloud_ssh_username',
|
||||||
default='stack',
|
default='stack',
|
||||||
help="Username with access to stackrc and overcloudrc files"),
|
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',
|
cfg.StrOpt('undercloud_rcfile',
|
||||||
default='~/stackrc',
|
default='~/stackrc',
|
||||||
help="Undercloud RC filename"),
|
help="Undercloud RC filename"),
|
||||||
|
|
||||||
|
# Overcloud options
|
||||||
|
cfg.IntOpt('overcloud_ssh_port',
|
||||||
|
default=None,
|
||||||
|
help="TCP port of SSH server on overcloud hosts"),
|
||||||
|
cfg.StrOpt('overcloud_ssh_username',
|
||||||
|
default='heat-admin',
|
||||||
|
help="Default username used to connect to overcloud nodes"),
|
||||||
cfg.StrOpt('overcloud_rcfile',
|
cfg.StrOpt('overcloud_rcfile',
|
||||||
default='~/overcloudrc',
|
default='~/overcloudrc',
|
||||||
help="Overcloud RC filename")]
|
help="Overcloud RC filename")]
|
||||||
|
|||||||
Reference in New Issue
Block a user