WIP - Replace non-inclusive language

Removing White and Black lists and replacing
with Include and Exclude instead

Depends-on: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/819889
Change-Id: I9f44d65c5493ab70842dc97a0e813c83fe777ab9
This commit is contained in:
Brendan Shephard 2021-12-01 22:41:53 +00:00
parent 1e10cb230f
commit 303d29fe90
7 changed files with 19 additions and 14 deletions

View File

@ -0,0 +1,5 @@
---
other:
- |
Replace non-inclusive blacklist and whitelist with
exclude and include.

View File

@ -85,9 +85,9 @@ PUPPET_MODULES = "/etc/puppet/modules/"
PUPPET_BASE = "/etc/puppet/"
STACK_TIMEOUT = 240
STACK_OUTPUTS = ['BlacklistedHostnames',
STACK_OUTPUTS = ['ExcludedHostnames',
'RoleNetIpMap',
'BlacklistedIpAddresses',
'ExcludedIpAddresses',
'RoleNetHostnameMap',
'KeystoneURL',
'EndpointMap',

View File

@ -1718,7 +1718,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_warning = mock.MagicMock()
mock_log = mock.MagicMock()
mock_log.warning = mock_warning
env = {'parameter_defaults': {'DeploymentServerBlacklist': []}}
env = {'parameter_defaults': {'DeploymentServerExcludelist': []}}
old_logger = self.cmd.log
self.cmd.log = mock_log
@ -1730,13 +1730,13 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
mock_warning = mock.MagicMock()
mock_log = mock.MagicMock()
mock_log.warning = mock_warning
env = {'parameter_defaults': {'DeploymentServerBlacklist': ['a']}}
env = {'parameter_defaults': {'DeploymentServerExcludelist': ['a']}}
old_logger = self.cmd.log
self.cmd.log = mock_log
self.cmd._check_limit_skiplist_warning(env)
self.cmd.log = old_logger
expected_message = ('[WARNING] DeploymentServerBlacklist is defined '
expected_message = ('[WARNING] DeploymentServerExcludelist is defined '
'and will be ignored because --limit has been '
'specified.')
mock_warning.assert_called_once_with(expected_message)

View File

@ -349,7 +349,7 @@ class TestDeleteNode(fakes.TestDeleteNode):
mock_warning = mock.MagicMock()
mock_log = mock.MagicMock()
mock_log.warning = mock_warning
env = {'parameter_defaults': {'DeploymentServerBlacklist': []}}
env = {'parameter_defaults': {'DeploymentServerExcludelist': []}}
old_logger = self.cmd.log
self.cmd.log = mock_log
@ -361,13 +361,13 @@ class TestDeleteNode(fakes.TestDeleteNode):
mock_warning = mock.MagicMock()
mock_log = mock.MagicMock()
mock_log.warning = mock_warning
env = {'parameter_defaults': {'DeploymentServerBlacklist': ['a']}}
env = {'parameter_defaults': {'DeploymentServerExcludelist': ['a']}}
old_logger = self.cmd.log
self.cmd.log = mock_log
self.cmd._check_skiplist_exists(env)
self.cmd.log = old_logger
expected_message = ('[WARNING] DeploymentServerBlacklist is ignored '
expected_message = ('[WARNING] DeploymentServerExcludelist is ignored '
'when executing scale down actions. If the '
'node(s) being removed should *NOT* have any '
'actions executed on them, please shut them off '

View File

@ -1013,7 +1013,7 @@ def get_endpoint_map(stack):
def get_blacklisted_ip_addresses(working_dir):
return get_stack_saved_output_item(
'BlacklistedIpAddresses', working_dir)
'ExcludedIpAddresses', working_dir)
def get_role_net_ip_map(working_dir):

View File

@ -203,8 +203,8 @@ class DeployOvercloud(command.Command):
return parameters
def _check_limit_skiplist_warning(self, env):
if env.get('parameter_defaults').get('DeploymentServerBlacklist'):
msg = _('[WARNING] DeploymentServerBlacklist is defined and will '
if env.get('parameter_defaults').get('DeploymentServerExcludelist'):
msg = _('[WARNING] DeploymentServerExcludelist is defined and will '
'be ignored because --limit has been specified.')
self.log.warning(msg)
@ -1295,7 +1295,7 @@ class DeployOvercloud(command.Command):
),
forks=parsed_args.ansible_forks,
denyed_hostnames=utils.get_stack_saved_output_item(
'BlacklistedHostnames', self.working_dir))
'ExcludedHostnames', self.working_dir))
deployment.set_deployment_status(
parsed_args.stack,
status=deploy_status,

View File

@ -121,9 +121,9 @@ class DeleteNode(command.Command):
def _check_skiplist_exists(self, env):
skiplist = env.get('parameter_defaults',
{}).get('DeploymentServerBlacklist')
{}).get('DeploymentServerExcludelist')
if skiplist:
self.log.warning(_('[WARNING] DeploymentServerBlacklist is '
self.log.warning(_('[WARNING] DeploymentServerExcludelist is '
'ignored when executing scale down actions. If '
'the node(s) being removed should *NOT* have '
'any actions executed on them, please shut '