From 3437ff962a6cae3750dd61cfdf1f133b46509fba Mon Sep 17 00:00:00 2001 From: Nate Potter Date: Thu, 4 Aug 2016 22:20:30 +0000 Subject: [PATCH] Switch StrOpt to URIOpt for URL config options This patch updates options including a URL to be URIOpts rather than StrOpts. Change-Id: Icd39c16ea4ec83749f61a443cd450c76be1aabce Closes-bug: #1609152 --- cinder/backup/drivers/swift.py | 4 ++-- cinder/common/config.py | 2 +- cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py | 2 +- cinder/volume/drivers/quobyte.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cinder/backup/drivers/swift.py b/cinder/backup/drivers/swift.py index cf3083dc4f5..6630a800f58 100644 --- a/cinder/backup/drivers/swift.py +++ b/cinder/backup/drivers/swift.py @@ -61,9 +61,9 @@ from cinder import interface LOG = logging.getLogger(__name__) swiftbackup_service_opts = [ - cfg.StrOpt('backup_swift_url', + cfg.URIOpt('backup_swift_url', help='The URL of the Swift endpoint'), - cfg.StrOpt('backup_swift_auth_url', + cfg.URIOpt('backup_swift_auth_url', help='The URL of the Keystone endpoint'), cfg.StrOpt('swift_catalog_info', default='object-store:swift:publicURL', diff --git a/cinder/common/config.py b/cinder/common/config.py index 45ee7256923..22372feda37 100644 --- a/cinder/common/config.py +++ b/cinder/common/config.py @@ -195,7 +195,7 @@ global_opts = [ cfg.StrOpt('os_privileged_user_tenant', help='Tenant name associated with the OpenStack privileged ' 'account.'), - cfg.StrOpt('os_privileged_user_auth_url', + cfg.URIOpt('os_privileged_user_auth_url', help='Auth URL associated with the OpenStack privileged ' 'account.'), ] diff --git a/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py b/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py index 217f7396d7e..ada1b7cf26a 100644 --- a/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py +++ b/cinder/volume/drivers/hpe/hpe_lefthand_iscsi.py @@ -63,7 +63,7 @@ if hpelefthandclient: from hpelefthandclient import exceptions as hpeexceptions hpelefthand_opts = [ - cfg.StrOpt('hpelefthand_api_url', + cfg.URIOpt('hpelefthand_api_url', default=None, help="HPE LeftHand WSAPI Server Url like " "https://:8081/lhos", diff --git a/cinder/volume/drivers/quobyte.py b/cinder/volume/drivers/quobyte.py index 7d135fb0d4c..8d77e6544a5 100644 --- a/cinder/volume/drivers/quobyte.py +++ b/cinder/volume/drivers/quobyte.py @@ -35,7 +35,7 @@ VERSION = '1.1' LOG = logging.getLogger(__name__) volume_opts = [ - cfg.StrOpt('quobyte_volume_url', + cfg.URIOpt('quobyte_volume_url', help=('URL to the Quobyte volume e.g.,' ' quobyte:///')), cfg.StrOpt('quobyte_client_cfg',