Use oslo_config PortOpt support
The oslo_config library provide PortOpt type to validate the port of range now. References: https://review.openstack.org/#/c/231257/ Depends-On: Ida294b05a85f5bef587b761fcd03c28c7a3474d8 Change-Id: I2e4e09653e523bb4118b2387bd44c3ff7f40872d
This commit is contained in:
parent
15f44c6946
commit
986cb44962
@ -17,13 +17,12 @@ from oslo_config import cfg
|
||||
|
||||
# Register options for the service
|
||||
OPTS = [
|
||||
cfg.IntOpt('port',
|
||||
default=8777,
|
||||
min=1, max=65535,
|
||||
deprecated_name='metering_api_port',
|
||||
deprecated_group='DEFAULT',
|
||||
help='The port for the ceilometer API server.',
|
||||
),
|
||||
cfg.PortOpt('port',
|
||||
default=8777,
|
||||
deprecated_name='metering_api_port',
|
||||
deprecated_group='DEFAULT',
|
||||
help='The port for the ceilometer API server.',
|
||||
),
|
||||
cfg.StrOpt('host',
|
||||
default='0.0.0.0',
|
||||
help='The listen IP for the ceilometer API server.',
|
||||
|
@ -33,10 +33,9 @@ OPTS = [
|
||||
default='0.0.0.0',
|
||||
help='Address to which the UDP socket is bound. Set to '
|
||||
'an empty string to disable.'),
|
||||
cfg.IntOpt('udp_port',
|
||||
default=4952,
|
||||
min=1, max=65535,
|
||||
help='Port to which the UDP socket is bound.'),
|
||||
cfg.PortOpt('udp_port',
|
||||
default=4952,
|
||||
help='Port to which the UDP socket is bound.'),
|
||||
cfg.BoolOpt('requeue_sample_on_dispatcher_error',
|
||||
default=False,
|
||||
help='Requeue the sample on the collector sample queue '
|
||||
|
@ -32,10 +32,9 @@ OPTS = [
|
||||
cfg.StrOpt('host_ip',
|
||||
default='',
|
||||
help='IP address of the VMware vSphere host.'),
|
||||
cfg.IntOpt('host_port',
|
||||
default=443,
|
||||
min=1, max=65535,
|
||||
help='Port of the VMware vSphere host.'),
|
||||
cfg.PortOpt('host_port',
|
||||
default=443,
|
||||
help='Port of the VMware vSphere host.'),
|
||||
cfg.StrOpt('host_username',
|
||||
default='',
|
||||
help='Username of VMware vSphere.'),
|
||||
|
Loading…
Reference in New Issue
Block a user