Use HostAddressOpt for opts that accept IP and hostnames
Some configuration options were accepting both IP addresses and hostnames. Since there was no specific OSLO opt type to support this, we were using ``StrOpt``. The change [1] that added support for ``HostAddressOpt`` type was merged in Ocata and became available for use with oslo version 3.22. This patch changes the opt type of configuration options to use this more relevant opt type - HostAddressOpt. [1] I77bdb64b7e6e56ce761d76696bc4448a9bd325eb TrivialFix Change-Id: I5a564efc189c062cc3a780aef1baf32b28914b39
This commit is contained in:
parent
0a90dc3ee0
commit
ac799dc016
|
@ -44,9 +44,11 @@ METADATA_PROXY_HANDLER_OPTS = [
|
|||
cfg.StrOpt('auth_ca_cert',
|
||||
help=_("Certificate Authority public key (CA cert) "
|
||||
"file for ssl")),
|
||||
cfg.StrOpt('nova_metadata_host', default='127.0.0.1',
|
||||
deprecated_name='nova_metadata_ip',
|
||||
help=_("IP address or DNS name of Nova metadata server.")),
|
||||
cfg.HostAddressOpt('nova_metadata_host',
|
||||
default='127.0.0.1',
|
||||
deprecated_name='nova_metadata_ip',
|
||||
help=_("IP address or DNS name of Nova metadata "
|
||||
"server.")),
|
||||
cfg.PortOpt('nova_metadata_port',
|
||||
default=8775,
|
||||
help=_("TCP Port used by Nova metadata server.")),
|
||||
|
|
|
@ -22,8 +22,8 @@ from neutron.common import constants
|
|||
|
||||
|
||||
core_opts = [
|
||||
cfg.StrOpt('bind_host', default='0.0.0.0',
|
||||
help=_("The host IP to bind to")),
|
||||
cfg.HostAddressOpt('bind_host', default='0.0.0.0',
|
||||
help=_("The host IP to bind to.")),
|
||||
cfg.PortOpt('bind_port', default=9696,
|
||||
help=_("The port to bind to")),
|
||||
cfg.StrOpt('api_extensions_path', default="",
|
||||
|
@ -96,12 +96,12 @@ core_opts = [
|
|||
"Attention: the following parameter MUST be set to "
|
||||
"False if Neutron is being used in conjunction with "
|
||||
"Nova security groups.")),
|
||||
cfg.StrOpt('host', default=net.get_hostname(),
|
||||
sample_default='example.domain',
|
||||
help=_("Hostname to be used by the Neutron server, agents and "
|
||||
"services running on this machine. All the agents and "
|
||||
"services running on this machine must use the same "
|
||||
"host value.")),
|
||||
cfg.HostAddressOpt('host', default=net.get_hostname(),
|
||||
sample_default='example.domain',
|
||||
help=_("Hostname to be used by the Neutron server, "
|
||||
"agents and services running on this machine. "
|
||||
"All the agents and services running on this "
|
||||
"machine must use the same host value.")),
|
||||
cfg.StrOpt("network_link_prefix",
|
||||
help=_("This string is prepended to the normal URL that is "
|
||||
"returned in links to the OpenStack Network API. If it "
|
||||
|
|
Loading…
Reference in New Issue