Standardize DB Product Name
Change-Id: I05b6e4ec3d206db6e88a5ee5cbe4b08bc9255e05 Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
This commit is contained in:
parent
3ebcee4b2e
commit
c8de4c0c1c
@ -16,8 +16,8 @@ def filtered_hosts(config, exclude=True, dbhost=True):
|
|||||||
dbinst = config.get('CONFIG_MARIADB_INSTALL') == 'y'
|
dbinst = config.get('CONFIG_MARIADB_INSTALL') == 'y'
|
||||||
vcenter = config.get('CONFIG_VMWARE_BACKEND') == 'y'
|
vcenter = config.get('CONFIG_VMWARE_BACKEND') == 'y'
|
||||||
for hosttype, hostname in utils.host_iter(config):
|
for hosttype, hostname in utils.host_iter(config):
|
||||||
# if dbhost is being taken into account and we are not installing MySQL
|
# if dbhost is being taken into account and we are not installing
|
||||||
# then we should omit the MySQL host
|
# MariaDB then we should omit the MariaDB host
|
||||||
if dbhost and not dbinst and hosttype == 'CONFIG_MARIADB_HOST':
|
if dbhost and not dbinst and hosttype == 'CONFIG_MARIADB_HOST':
|
||||||
continue
|
continue
|
||||||
if vcenter and hosttype == 'CONFIG_VCENTER_HOST':
|
if vcenter and hosttype == 'CONFIG_VCENTER_HOST':
|
||||||
@ -34,6 +34,6 @@ def is_all_in_one(config):
|
|||||||
returns False.
|
returns False.
|
||||||
"""
|
"""
|
||||||
# Even if some host have been excluded from installation, we must count
|
# Even if some host have been excluded from installation, we must count
|
||||||
# with them when checking all-in-one. MySQL host should however be omitted
|
# with them when checking all-in-one. MariaDB host should however be
|
||||||
# if we are not installing MySQL
|
# omitted if we are not installing MariaDB.
|
||||||
return len(filtered_hosts(config, exclude=False, dbhost=True)) == 1
|
return len(filtered_hosts(config, exclude=False, dbhost=True)) == 1
|
||||||
|
@ -26,8 +26,8 @@ def initConfig(controller):
|
|||||||
parameters = [
|
parameters = [
|
||||||
{"CMD_OPTION": "os-heat-mysql-password",
|
{"CMD_OPTION": "os-heat-mysql-password",
|
||||||
"USAGE": ('The password used by Heat user to authenticate against '
|
"USAGE": ('The password used by Heat user to authenticate against '
|
||||||
'MySQL'),
|
'DB'),
|
||||||
"PROMPT": "Enter the password for the Heat MySQL user",
|
"PROMPT": "Enter the password for the Heat DB user",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_not_empty],
|
"VALIDATORS": [validators.validate_not_empty],
|
||||||
"DEFAULT_VALUE": "PW_PLACEHOLDER",
|
"DEFAULT_VALUE": "PW_PLACEHOLDER",
|
||||||
|
@ -21,7 +21,7 @@ def initConfig(controller):
|
|||||||
ironic_params = [
|
ironic_params = [
|
||||||
{"CONF_NAME": "CONFIG_IRONIC_DB_PW",
|
{"CONF_NAME": "CONFIG_IRONIC_DB_PW",
|
||||||
"CMD_OPTION": "os-ironic-db-passwd",
|
"CMD_OPTION": "os-ironic-db-passwd",
|
||||||
"PROMPT": "Enter the password for the Ironic MySQL user",
|
"PROMPT": "Enter the password for the Ironic DB user",
|
||||||
"USAGE": "The password to use for the Ironic DB access",
|
"USAGE": "The password to use for the Ironic DB access",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [validators.validate_not_empty],
|
"VALIDATORS": [validators.validate_not_empty],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Puppet::Type.type(:remote_database).provide(:mysql) do
|
Puppet::Type.type(:remote_database).provide(:mysql) do
|
||||||
|
|
||||||
desc "Manages remote MySQL database."
|
desc "Manages remote MariaDB database."
|
||||||
|
|
||||||
defaultfor :kernel => 'Linux'
|
defaultfor :kernel => 'Linux'
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Puppet::Type.newtype(:remote_database_user) do
|
|||||||
raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/
|
raise(ArgumentError, "Invalid database user #{value}") unless value =~ /[\w-]*@[\w%\.:]+/
|
||||||
username = value.split('@')[0]
|
username = value.split('@')[0]
|
||||||
if username.size > 16
|
if username.size > 16
|
||||||
raise ArgumentError, "MySQL usernames are limited to a maximum of 16 characters"
|
raise ArgumentError, "MariaDB usernames are limited to a maximum of 16 characters"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -29,10 +29,10 @@ class ParameterTestCase(PackstackTestCaseMixin, TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ParameterTestCase, self).setUp()
|
super(ParameterTestCase, self).setUp()
|
||||||
self.data = {
|
self.data = {
|
||||||
"CMD_OPTION": "mysql-host",
|
"CMD_OPTION": "mariadb-host",
|
||||||
"USAGE": ("The IP address of the server on which to "
|
"USAGE": ("The IP address of the server on which to "
|
||||||
"install MySQL"),
|
"install MariaDB"),
|
||||||
"PROMPT": "Enter the IP address of the MySQL server",
|
"PROMPT": "Enter the IP address of the MariaDB server",
|
||||||
"OPTION_LIST": [],
|
"OPTION_LIST": [],
|
||||||
"VALIDATORS": [],
|
"VALIDATORS": [],
|
||||||
"DEFAULT_VALUE": "127.0.0.1",
|
"DEFAULT_VALUE": "127.0.0.1",
|
||||||
@ -64,8 +64,8 @@ class GroupTestCase(PackstackTestCaseMixin, TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(GroupTestCase, self).setUp()
|
super(GroupTestCase, self).setUp()
|
||||||
self.attrs = {
|
self.attrs = {
|
||||||
"GROUP_NAME": "MYSQL",
|
"GROUP_NAME": "MARIADB",
|
||||||
"DESCRIPTION": "MySQL Config parameters",
|
"DESCRIPTION": "MariaDB Config parameters",
|
||||||
"PRE_CONDITION": "y",
|
"PRE_CONDITION": "y",
|
||||||
"PRE_CONDITION_MATCH": "y",
|
"PRE_CONDITION_MATCH": "y",
|
||||||
"POST_CONDITION": False,
|
"POST_CONDITION": False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user