Validate url options

... so that these options only accept valid URLs.

Change-Id: Iec79cbbec07808cdc4c29456ac6392a4e4fb95b6
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-11-23 13:09:46 +09:00
parent ce898206cd
commit 53b4a27140
5 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ CONF = cfg.CONF
logger = log.getLogger(__name__)
opts = [
cfg.StrOpt('metadata-url',
cfg.URIOpt('metadata-url',
help='URL to query for CloudFormation Metadata'),
cfg.StrOpt('heat-metadata-hint',
default='/var/lib/heat-cfntools/cfn-metadata-server',

View File

@@ -28,7 +28,7 @@ EC2_METADATA_URL = 'http://169.254.169.254/latest/meta-data'
CONF = cfg.CONF
opts = [
cfg.StrOpt('metadata-url',
cfg.URIOpt('metadata-url',
default=EC2_METADATA_URL,
help='URL to query for EC2 Metadata'),
cfg.FloatOpt('timeout', default=10,

View File

@@ -32,7 +32,7 @@ opts = [
help='Password for API authentication'),
cfg.StrOpt('project-id',
help='ID of project for API authentication'),
cfg.StrOpt('auth-url',
cfg.URIOpt('auth-url',
help='URL for API authentication'),
cfg.StrOpt('stack-id',
help='ID of the stack this deployment belongs to'),

View File

@@ -28,7 +28,7 @@ CONF = cfg.CONF
logger = log.getLogger(__name__)
opts = [
cfg.StrOpt('metadata-url',
cfg.URIOpt('metadata-url',
help='URL to query for metadata'),
cfg.FloatOpt('timeout', default=10,
help='Seconds to wait for the connection and read request'

View File

@@ -36,7 +36,7 @@ opts = [
help='Password for API authentication'),
cfg.StrOpt('project-id',
help='ID of project for API authentication'),
cfg.StrOpt('auth-url',
cfg.URIOpt('auth-url',
help='URL for API authentication'),
cfg.StrOpt('queue-id',
help='ID of the queue to be checked'),