From d36a3436086af3a0c8f4c5c0161ba65671eabe21 Mon Sep 17 00:00:00 2001 From: vponomaryov Date: Fri, 9 Jan 2015 13:08:01 +0200 Subject: [PATCH] Sync tempest plugin with latest Tempest Tempest has been changed and our plugin no more compatible with it. Update files that are broken and bump Tempest commit that is used as HEAD. Change-Id: I5b13d060b552154345ecfc5c1c6679496f3f3ea6 --- contrib/ci/pre_test_hook.sh | 2 +- contrib/tempest/tempest/config_share.py | 6 ++++++ .../tempest/services/share/json/shares_client.py | 11 +++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index 60cb04071d..d5273b68fa 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -38,7 +38,7 @@ fi # Go to Tempest dir and checkout stable commit to avoid possible # incompatibilities for plugin stored in Manila repo. -TEMPEST_COMMIT="128bbed7" # 23 Dec, 2014 +TEMPEST_COMMIT="b5fa11db" # 8 Jan, 2015 cd $BASE/new/tempest git checkout $TEMPEST_COMMIT diff --git a/contrib/tempest/tempest/config_share.py b/contrib/tempest/tempest/config_share.py index e38764e011..28ccba56f4 100644 --- a/contrib/tempest/tempest/config_share.py +++ b/contrib/tempest/tempest/config_share.py @@ -31,6 +31,12 @@ ServiceAvailableGroup = [ share_group = cfg.OptGroup(name="share", title="Share Service Options") ShareGroup = [ + cfg.StrOpt("region", + default="", + help="The share region name to use. If empty, the value " + "of identity.region is used instead. If no such region " + "is found in the service catalog, the first found one is " + "used."), cfg.StrOpt("catalog_type", default="share", help="Catalog type of the Share service."), diff --git a/contrib/tempest/tempest/services/share/json/shares_client.py b/contrib/tempest/tempest/services/share/json/shares_client.py index b376399c18..6d77c3f177 100644 --- a/contrib/tempest/tempest/services/share/json/shares_client.py +++ b/contrib/tempest/tempest/services/share/json/shares_client.py @@ -35,8 +35,11 @@ class SharesClient(rest_client.RestClient): """ def __init__(self, auth_provider): - super(SharesClient, self).__init__(auth_provider) - self.service = CONF.share.catalog_type + super(SharesClient, self).__init__( + auth_provider, + CONF.share.catalog_type, + CONF.share.region or CONF.identity.region, + endpoint_type=CONF.share.endpoint_type) self.share_protocol = None if CONF.share.enable_protocols: self.share_protocol = CONF.share.enable_protocols[0] @@ -45,10 +48,6 @@ class SharesClient(rest_client.RestClient): self.build_timeout = CONF.share.build_timeout self.auth_params = auth_provider._auth_params() - def _get_endpoint_type(self, service): - # This is workaround for rest_client, that uses main config - return CONF.share.endpoint_type - def create_share(self, share_protocol=None, size=1, name=None, snapshot_id=None, description=None, metadata={}, share_network_id=None,