Use min and max on IntOpt option types
The latest oslo.config supports a minimum and maximum value for IntOpt options. This patch utilizes this for a number of options with well known ranges. Change-Id: I897d8870fdf67a095915c8fcdf239024b092e9e3
This commit is contained in:
parent
b91f3f6099
commit
ec59ea8db7
|
@ -63,6 +63,8 @@ ec2_opts = [
|
|||
help='The internal IP address of the EC2 API server'),
|
||||
cfg.IntOpt('ec2_port',
|
||||
default=8773,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port of the EC2 API server'),
|
||||
cfg.StrOpt('ec2_scheme',
|
||||
default='http',
|
||||
|
|
|
@ -32,6 +32,8 @@ opts = [
|
|||
help='Host on which to listen for incoming requests'),
|
||||
cfg.IntOpt('novncproxy_port',
|
||||
default=6080,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port on which to listen for incoming requests'),
|
||||
]
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ opts = [
|
|||
help='Host on which to listen for incoming requests'),
|
||||
cfg.IntOpt('serialproxy_port',
|
||||
default=6083,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port on which to listen for incoming requests'),
|
||||
]
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ opts = [
|
|||
help='Host on which to listen for incoming requests'),
|
||||
cfg.IntOpt('html5proxy_port',
|
||||
default=6082,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port on which to listen for incoming requests'),
|
||||
]
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ xvp_opts = [
|
|||
help='XVP log file'),
|
||||
cfg.IntOpt('console_xvp_multiplex_port',
|
||||
default=5900,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port for XVP to multiplex VNC connections on'),
|
||||
]
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ def register_cli_opts():
|
|||
'under normal operation. Use at your own risk.'),
|
||||
|
||||
cfg.IntOpt('port',
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Debug port to connect. Note '
|
||||
'that using the remote debug option changes how '
|
||||
'Nova uses the eventlet library to support async IO. '
|
||||
|
|
|
@ -47,6 +47,8 @@ glance_opts = [
|
|||
help='Default glance hostname or IP address'),
|
||||
cfg.IntOpt('port',
|
||||
default=9292,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Default glance port'),
|
||||
cfg.StrOpt('protocol',
|
||||
default='http',
|
||||
|
|
|
@ -51,6 +51,8 @@ s3_opts = [
|
|||
'the S3 api'),
|
||||
cfg.IntOpt('s3_port',
|
||||
default=3333,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port used when accessing the S3 api'),
|
||||
cfg.StrOpt('s3_access_key',
|
||||
default='notchecked',
|
||||
|
|
|
@ -108,6 +108,8 @@ linux_net_opts = [
|
|||
help='The IP address for the metadata API server'),
|
||||
cfg.IntOpt('metadata_port',
|
||||
default=8775,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port for the metadata API port'),
|
||||
cfg.StrOpt('iptables_top_regex',
|
||||
default='',
|
||||
|
|
|
@ -78,6 +78,8 @@ network_opts = [
|
|||
help='FlatDhcp will bridge into this interface if set'),
|
||||
cfg.IntOpt('vlan_start',
|
||||
default=100,
|
||||
min=1,
|
||||
max=4094,
|
||||
help='First VLAN for private networks'),
|
||||
cfg.StrOpt('vlan_interface',
|
||||
help='VLANs will bridge into this interface if set'),
|
||||
|
|
|
@ -64,6 +64,8 @@ s3_opts = [
|
|||
help='IP address for S3 API to listen'),
|
||||
cfg.IntOpt('s3_listen_port',
|
||||
default=3333,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port for S3 API to listen'),
|
||||
]
|
||||
|
||||
|
|
|
@ -67,6 +67,8 @@ service_opts = [
|
|||
help='The IP address on which the EC2 API will listen.'),
|
||||
cfg.IntOpt('ec2_listen_port',
|
||||
default=8773,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port on which the EC2 API will listen.'),
|
||||
cfg.IntOpt('ec2_workers',
|
||||
help='Number of workers for EC2 API service. The default will '
|
||||
|
@ -76,6 +78,8 @@ service_opts = [
|
|||
help='The IP address on which the OpenStack API will listen.'),
|
||||
cfg.IntOpt('osapi_compute_listen_port',
|
||||
default=8774,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port on which the OpenStack API will listen.'),
|
||||
cfg.IntOpt('osapi_compute_workers',
|
||||
help='Number of workers for OpenStack API service. The default '
|
||||
|
@ -88,6 +92,8 @@ service_opts = [
|
|||
help='The IP address on which the metadata API will listen.'),
|
||||
cfg.IntOpt('metadata_listen_port',
|
||||
default=8775,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='The port on which the metadata API will listen.'),
|
||||
cfg.IntOpt('metadata_workers',
|
||||
help='Number of workers for metadata service. The default will '
|
||||
|
|
|
@ -55,6 +55,8 @@ vmwareapi_opts = [
|
|||
'vCenter host.'),
|
||||
cfg.IntOpt('host_port',
|
||||
default=443,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port for connection to VMware vCenter host.'),
|
||||
cfg.StrOpt('host_username',
|
||||
help='Username for connection to VMware vCenter host.'),
|
||||
|
@ -83,6 +85,8 @@ vmwareapi_opts = [
|
|||
'socket error, etc.'),
|
||||
cfg.IntOpt('vnc_port',
|
||||
default=5900,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='VNC starting port'),
|
||||
cfg.IntOpt('vnc_port_total',
|
||||
default=10000,
|
||||
|
|
|
@ -40,9 +40,13 @@ xenapi_torrent_opts = [
|
|||
' seconds can be reaped'),
|
||||
cfg.IntOpt('torrent_listen_port_start',
|
||||
default=6881,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Beginning of port range to listen on'),
|
||||
cfg.IntOpt('torrent_listen_port_end',
|
||||
default=6891,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='End of port range to listen on'),
|
||||
cfg.IntOpt('torrent_download_stall_cutoff',
|
||||
default=600,
|
||||
|
|
|
@ -70,6 +70,8 @@ xenapi_vm_utils_opts = [
|
|||
' image_property `cache_in_nova=True`, and `none` turns'
|
||||
' off caching entirely'),
|
||||
cfg.IntOpt('image_compression_level',
|
||||
min=1,
|
||||
max=9,
|
||||
help='Compression level for images, e.g., 9 for gzip -9.'
|
||||
' Range is 1-9, 9 being most compressed but most CPU'
|
||||
' intensive on dom0.'),
|
||||
|
|
|
@ -38,6 +38,8 @@ LOG = logging.getLogger(__name__)
|
|||
xvp_proxy_opts = [
|
||||
cfg.IntOpt('xvpvncproxy_port',
|
||||
default=6081,
|
||||
min=1,
|
||||
max=65535,
|
||||
help='Port that the XCP VNC proxy should bind to'),
|
||||
cfg.StrOpt('xvpvncproxy_host',
|
||||
default='0.0.0.0',
|
||||
|
|
Loading…
Reference in New Issue