Fail IPA startup if no protocol prefix in ironic api address
Add regex validation of api_url specified in configuration file. Oslo config will raise exception if no supported protocol prefix is included in Ironic api address in configuration file. Supported protocols are http and https. Closes-Bug: #1630785 Change-Id: I437b4ea0a2995921ddede03bc670087fdbbc8b83
This commit is contained in:
ironic_python_agent
releasenotes/notes
@ -25,8 +25,10 @@ cli_opts = [
|
||||
cfg.StrOpt('api_url',
|
||||
default=APARAMS.get('ipa-api-url'),
|
||||
deprecated_name='api-url',
|
||||
regex='^http(s?):\/\/.+',
|
||||
help='URL of the Ironic API. '
|
||||
'Can be supplied as "ipa-api-url" kernel parameter.'),
|
||||
'Can be supplied as "ipa-api-url" kernel parameter.'
|
||||
'The value must start with either http:// or https://.'),
|
||||
|
||||
cfg.StrOpt('listen_host',
|
||||
default=APARAMS.get('ipa-listen-host', '0.0.0.0'),
|
||||
|
Reference in New Issue
Block a user