Skip to content

Commit

Permalink
Replace 'hostname(s)' with 'host name(s)'
Browse files Browse the repository at this point in the history
CMK-16121

Change-Id: I4e31149878839114278958de5b647e842d0c5413
  • Loading branch information
loocars committed May 13, 2024
1 parent 2dfbc1e commit 6669b53
Show file tree
Hide file tree
Showing 57 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion cmk/active_checks/check_traceroute.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _parse_arguments(argv: Sequence[str]) -> argparse.Namespace:
parser.add_argument(
"--use_dns",
action="store_true",
help="Use DNS to convert hostnames to IP addresses.",
help="Use DNS to convert host names to IP addresses.",
)
parser.add_argument(
"--debug",
Expand Down
4 changes: 2 additions & 2 deletions cmk/base/automations/check_mk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1942,10 +1942,10 @@ def execute( # pylint: disable=too-many-branches
try:
resolved_address = config.lookup_ip_address(config_cache, host_name)
except Exception:
raise MKGeneralException("Cannot resolve hostname %s into IP address" % host_name)
raise MKGeneralException("Cannot resolve host name %s into IP address" % host_name)

if resolved_address is None:
raise MKGeneralException("Cannot resolve hostname %s into IP address" % host_name)
raise MKGeneralException("Cannot resolve host name %s into IP address" % host_name)

ipaddress = resolved_address

Expand Down
8 changes: 4 additions & 4 deletions cmk/base/modes/check_mk.py
Original file line number Diff line number Diff line change
Expand Up @@ -1507,8 +1507,8 @@ def mode_restart(args: Sequence[HostName]) -> None:
argument_optional=True,
argument_descr="[HostA, HostB]",
long_help=[
"You may add hostnames as additional arguments. This enables the incremental "
"activate mechanism, only compiling these hostnames and using cached data for all "
"You may add host names as additional arguments. This enables the incremental "
"activate mechanism, only compiling these host names and using cached data for all "
"other hosts. Only supported with Checkmk Micro Core."
],
handler_function=mode_restart,
Expand Down Expand Up @@ -1556,8 +1556,8 @@ def mode_reload(args: Sequence[HostName]) -> None:
argument_optional=True,
argument_descr="[HostA, HostB]",
long_help=[
"You may add hostnames as additional arguments. This enables the incremental "
"activate mechanism, only compiling these hostnames and using cached data for all "
"You may add host names as additional arguments. This enables the incremental "
"activate mechanism, only compiling these host names and using cached data for all "
"other hosts. Only supported with Checkmk Micro Core."
],
handler_function=mode_reload,
Expand Down
8 changes: 4 additions & 4 deletions cmk/fields/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def __call__(self, value):

# NOTE: This was duplicated from cmk.gui.valuespec:HostAddress._is_valid_host_name to prevent import cycles.
class HostNameValidator(Validator):
"""Validate a hostname according to RFC1123
"""Validate a host name according to RFC1123
Examples:
Expand All @@ -158,12 +158,12 @@ class HostNameValidator(Validator):
>>> validator("aol.com..")
Traceback (most recent call last):
...
marshmallow.exceptions.ValidationError: Domain part #2: '' is not a valid hostname. [RFC1123]
marshmallow.exceptions.ValidationError: Domain part #2: '' is not a valid host name. [RFC1123]
>>> validator("-hyphenfront")
Traceback (most recent call last):
...
marshmallow.exceptions.ValidationError: Domain part #0: '-hyphenfront' is not a valid hostname. [RFC1123]
marshmallow.exceptions.ValidationError: Domain part #0: '-hyphenfront' is not a valid host name. [RFC1123]
>>> validator("127.0.0.1")
Traceback (most recent call last):
Expand All @@ -190,7 +190,7 @@ def __call__(self, hostname):
for index, part in enumerate(hostname.split(".")):
if not allowed.match(part):
raise ValidationError(
f"Domain part #{index}: {part!r} is not a valid hostname. [RFC1123]"
f"Domain part #{index}: {part!r} is not a valid host name. [RFC1123]"
)


Expand Down
12 changes: 6 additions & 6 deletions cmk/gui/fields/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class DirectMapping(BaseSchema, CheckmkTuple):
tuple_fields = ("hostname", "replace_with")

hostname = String(
description="The hostname to be replaced.",
description="The host name to be replaced.",
required=True,
)
replace_with = String(
Expand All @@ -395,20 +395,20 @@ class DirectMapping(BaseSchema, CheckmkTuple):
class TranslateNames(BaseSchema):
case = String(
data_key="convert_case",
description="Convert all detected hostnames to upper- or lower-case.\n\n"
description="Convert all detected host names to upper- or lower-case.\n\n"
+ _enum_options(
[
("nop", "Do not convert anything"),
("lower", "Convert all hostnames to lowercase."),
("upper", "Convert all hostnames to uppercase."),
("lower", "Convert all host names to lowercase."),
("upper", "Convert all host names to uppercase."),
]
),
enum=["nop", "lower", "upper"],
load_default="nop",
)
drop_domain = Boolean(
description=(
"Drop the rest of the domain, only keep the hostname. Will not affect "
"Drop the rest of the domain, only keep the host name. Will not affect "
"IP addresses.\n\n"
"Examples:\n\n"
" * `192.168.0.1` -> `192.168.0.1`\n"
Expand All @@ -423,7 +423,7 @@ class TranslateNames(BaseSchema):
Nested(RegexpRewrites),
data_key="regexp_rewrites",
description=(
"Rewrite discovered hostnames with multiple regular expressions. The "
"Rewrite discovered host names with multiple regular expressions. The "
"replacements will be done one after another in the order they appear "
"in the list. If not anchored at the end by a `$` character, the regexp"
"will be anchored at the end implicitly by adding a `$` character.\n\n"
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/inventory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,14 +579,14 @@ def check_for_valid_hostname(hostname: str) -> None:
>>> check_for_valid_hostname("klappspaten")
>>> check_for_valid_hostname("../../etc/passwd")
Traceback (most recent call last):
cmk.gui.exceptions.MKUserError: You need to provide a valid "hostname". Only letters, digits, dash, underscore and dot are allowed.
cmk.gui.exceptions.MKUserError: You need to provide a valid "host name". Only letters, digits, dash, underscore and dot are allowed.
"""
if HostAddress.is_valid(hostname):
return
raise MKUserError(
None,
_(
'You need to provide a valid "hostname". '
'You need to provide a valid "host name". '
"Only letters, digits, dash, underscore and dot are allowed.",
),
)
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/inventory/_rulespec.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _valuespec_inv_exports_software_csv() -> Dictionary:
"filename",
TextInput(
title=_(
"Export file to create, containing <tt>&lt;HOST&gt;</tt> for the hostname"
"Export file to create, containing <tt>&lt;HOST&gt;</tt> for the host name"
),
help=_(
"Please specify the path to the export file. The text <tt>[HOST]</tt> "
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/mkeventd/wato.py
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ def vs_mkeventd_rule(customer: str | None = None) -> Dictionary:
(
"set_host",
TextInput(
title=_("Rewrite hostname"),
title=_("Rewrite host name"),
help=_(
"Replace the host name with this text. If you have bracketed "
"groups in the text to match, then you can use the placeholders "
Expand Down Expand Up @@ -5055,7 +5055,7 @@ def _valuespec_active_checks_mkevents() -> Dictionary:
default_value=["$HOSTNAME$", "$HOSTADDRESS$"],
help=_(
"When querying the event status, you can match events to a particular host "
"using the hostname, the IP address, or the host alias. This is due to the "
"using the host name, the IP address, or the host alias. This is due to the "
"fact that various event sources (e.g. syslog, snmptrapd) may refer to the "
"same host using different specification methods. Alternatively, you can "
"specify an explicit host for which to show events."
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/openapi/endpoints/downtime/request_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from cmk import fields

MONITORED_HOST = gui_fields.HostField(
description="The hostname or IP address itself.",
description="The host name or IP address itself.",
example="example.com",
should_exist=None,
should_be_monitored=True,
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/host_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def bulk_update_hosts(params: Mapping[str, Any]) -> Response:
path_params=[
{
"host_name": gui_fields.HostField(
description="A hostname.",
description="A host name.",
should_exist=True,
permission_type="setup_write",
),
Expand Down Expand Up @@ -756,7 +756,7 @@ def bulk_delete(params: Mapping[str, Any]) -> Response:
path_params=[
{
"host_name": gui_fields.HostField(
description="A hostname.",
description="A host name.",
should_exist=True,
permission_type="setup_read",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DirectoryTypeBaseRequest(BaseSchema):

class DirectoryTypeManualRequest(DirectoryTypeBaseRequest):
ldap_server = fields.String(
description="Set the host address of the LDAP server. Might be an IP address or resolvable hostname.",
description="Set the host address of the LDAP server. Might be an IP address or resolvable host name.",
example="your_ldap_server.example.com",
required=True,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LDAPDirectoryTypeConnection(BaseSchema):
)
ldap_server = fields.String(
description="Set the host address of the LDAP server. Might be an IP address or "
"resolvable hostname.",
"resolvable host name.",
example="your_ldap_server.example.com",
)
failover_servers = fields.List(
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/openapi/endpoints/metric/request_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class _BaseGetSchema(BaseRequestSchema):
example="heute",
)
host_name = HostField(
description="The hostname to use.",
description="The host name to use.",
example="my.cool.host",
should_be_monitored=True,
should_exist=None,
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/endpoints/service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@

HOST_NAME = {
"host_name": HostField(
description="A hostname.",
description="A host name.",
should_exist=True,
permission_type="monitor",
)
}

OPTIONAL_HOST_NAME = {
"host_name": HostField(
description="A hostname.",
description="A host name.",
should_exist=True,
required=False,
permission_type="monitor",
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/openapi/restful_objects/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

HOST_NAME = {
"host_name": HostField(
description="A hostname.",
description="A host name.",
should_exist=True,
)
}

OPTIONAL_HOST_NAME = {
"host_name": HostField(
description="A hostname.",
description="A host name.",
should_exist=True,
required=False,
)
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/openapi/restful_objects/request_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from cmk import fields

MONITORED_HOST = gui_fields.HostField(
description="The hostname or IP address itself.",
description="The host name or IP address itself.",
example="example.com",
should_exist=None,
should_be_monitored=True,
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/active_checks/by_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def to_valuespec(x: tuple[str, dict[str, Any]] | SSHOptions) -> SSHOptions:
default_value="$HOSTADDRESS$",
allow_empty=False,
help=_(
"You can specify a hostname or IP address different from IP address "
"You can specify a host name or IP address different from IP address "
"of the host as configured in your host properties."
),
),
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/active_checks/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _valuespec_active_checks_dns():
valuespec=Dictionary(
title=_("Check DNS service"),
help=_(
"Check the resolution of a hostname into an IP address by a DNS "
"Check the resolution of a host name into an IP address by a DNS "
"server. This check uses <tt>check_dns</tt> from the standard "
"Nagios plug-ins. Note, that check_dns will always be executed in "
"the monitoring site. By default, the configured host(s) that "
Expand Down
6 changes: 3 additions & 3 deletions cmk/gui/plugins/wato/active_checks/mailbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _smtp_email_parameters() -> Dictionary:
title=_("SMTP server"),
allow_empty=False,
help=_(
"You can specify a hostname or IP address different from the IP address "
"You can specify a host name or IP address different from the IP address "
"of the host this check will be assigned to."
),
),
Expand Down Expand Up @@ -145,7 +145,7 @@ def _common_email_parameters(protocol: str, port_defaults: str) -> Dictionary:
title=f"{protocol} server",
allow_empty=False,
help=_(
"You can specify a hostname or IP address different from the IP "
"You can specify a host name or IP address different from the IP "
"address of the host this check will be assigned to."
),
),
Expand Down Expand Up @@ -516,7 +516,7 @@ def _forward_to_ec_elements() -> list[DictionaryEntry]:
TextInput(
title=_("Events: Hostname"),
help=_(
"Use this hostname for all created events instead of the name of the mailserver"
"Use this host name for all created events instead of the name of the mailserver"
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/active_checks/traceroute.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _valuespec_active_checks_traceroute() -> Dictionary:
"dns",
Checkbox(
title=_("Name resolution"),
label=_("Use DNS to convert IP addresses into hostnames"),
label=_("Use DNS to convert IP addresses into host names"),
help=_(
"If you use this option, then <tt>traceroute</tt> is <b>not</b> being "
"called with the option <tt>-n</tt>. That means that all IP addresses "
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/check_parameters/heartbeat_crm.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def _parameter_valuespec_heartbeat_crm() -> Dictionary:
TextInput(
allow_empty=False,
title=_("Expected DC"),
help=_("The hostname of the expected distinguished controller of the cluster"),
help=_("The host name of the expected distinguished controller of the cluster"),
),
),
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _parameter_valuespec_heartbeat_crm_resources():
"expected_node",
Alternative(
title=_("Expected node"),
help=_("The hostname of the expected node to hold this resource."),
help=_("The host name of the expected node to hold this resource."),
elements=[
FixedValue(value=None, totext="", title=_("Do not check the node")),
TextInput(allow_empty=False, title=_("Expected node")),
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/special_agents/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _vs_element_aws_piggyback_naming_convention() -> DictionaryEntry:
],
help=_(
"Each EC2 instance creates a piggyback host.<br><b>Note:</b> "
"Not every hostname is pingable and changing the piggyback name "
"Not every host name is pingable and changing the piggyback name "
"will reset the piggyback host.<br><br><b>IP - Region - Instance "
'ID:</b><br>The name consists of "{Private IPv4 '
'address}-{Region}-{Instance ID}". This uniquely identifies the '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def tls_verify_options() -> tuple[Literal["ssl"], Alternative]:
title=_("SSL certificate checking"),
elements=[
FixedValue(value=False, title=_("Deactivated"), totext=""),
FixedValue(value=True, title=_("Use hostname"), totext=""),
FixedValue(value=True, title=_("Use host name"), totext=""),
TextInput(
title=_("Use other hostname"),
title=_("Use other host name"),
help=_("Use a custom name for the SSL certificate validation"),
),
],
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/special_agents/graylog.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def _valuespec_special_agents_graylog():
help=_(
"Use this option to set which instance should be "
"checked by the special agent. Please add the "
"hostname here, eg. my_graylog.com."
"host name here, eg. my_graylog.com."
),
size=32,
allow_empty=False,
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/special_agents/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _valuespec_special_agents_jira():
help=_(
"Use this option to set which instance should be "
"checked by the special agent. Please add the "
"hostname here, eg. my_jira.com. If not set, the "
"host name here, eg. my_jira.com. If not set, the "
"assigned host is used as instance."
),
size=32,
Expand Down
4 changes: 2 additions & 2 deletions cmk/gui/plugins/wato/special_agents/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def _valuespec_generic_metrics_prometheus() -> Dictionary:
"Hosts for namespaced Kubernetes objects will then be prefixed with the "
"name of their namespace. This makes Kubernetes resources in different "
"namespaces that have the same name distinguishable, but results in "
"longer hostnames."
"longer host names."
),
choices=[
("use_namespace", _("Use a namespace prefix")),
Expand Down Expand Up @@ -87,7 +87,7 @@ def _valuespec_generic_metrics_prometheus() -> Dictionary:
help=_(
"Per default, Checkmk tries to map the underlying Checkmk host "
"to the Node Exporter host which contains either the Checkmk "
'hostname, host address or "localhost" in its endpoint address. '
'host name, host address or "localhost" in its endpoint address. '
"The created services of the mapped Node Exporter will "
"be assigned to the Checkmk host. A piggyback host for each "
"Node Exporter host will be created if none of the options are "
Expand Down
2 changes: 1 addition & 1 deletion cmk/gui/plugins/wato/special_agents/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _valuespec_special_agents_rabbitmq():
help=_(
"Use this option to set which instance should be "
"checked by the special agent. Please add the "
"hostname here, eg. my_rabbitmq.com. If not set, the "
"host name here, eg. my_rabbitmq.com. If not set, the "
"assigned host is used as instance."
)
+ monitoring_macro_help(),
Expand Down
Loading

0 comments on commit 6669b53

Please sign in to comment.