diff options
Diffstat (limited to 'meta-openstack')
| -rw-r--r-- | meta-openstack/recipes-extended/tempest/tempest/0001-Stop-auto-detecting-glance-API-versions.patch | 122 | ||||
| -rw-r--r-- | meta-openstack/recipes-extended/tempest/tempest_git.bb | 2 |
2 files changed, 13 insertions, 111 deletions
diff --git a/meta-openstack/recipes-extended/tempest/tempest/0001-Stop-auto-detecting-glance-API-versions.patch b/meta-openstack/recipes-extended/tempest/tempest/0001-Stop-auto-detecting-glance-API-versions.patch index f382abf..5dffac4 100644 --- a/meta-openstack/recipes-extended/tempest/tempest/0001-Stop-auto-detecting-glance-API-versions.patch +++ b/meta-openstack/recipes-extended/tempest/tempest/0001-Stop-auto-detecting-glance-API-versions.patch | |||
| @@ -14,116 +14,20 @@ Change-Id: Ie958a7fb03ff502c5ea1783eaae9debb442c34ea | |||
| 14 | tempest/config.py | 16 +++++++++++++--- | 14 | tempest/config.py | 16 +++++++++++++--- |
| 15 | 3 files changed, 21 insertions(+), 19 deletions(-) | 15 | 3 files changed, 21 insertions(+), 19 deletions(-) |
| 16 | 16 | ||
| 17 | diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample | 17 | Index: git/etc/tempest.conf.sample |
| 18 | index 400cfca..e537c75 100644 | 18 | =================================================================== |
| 19 | --- a/etc/tempest.conf.sample | 19 | --- git.orig/etc/tempest.conf.sample |
| 20 | +++ b/etc/tempest.conf.sample | 20 | +++ git/etc/tempest.conf.sample |
| 21 | @@ -198,12 +198,15 @@ catalog_type = image | 21 | @@ -587,10 +587,10 @@ |
| 22 | # catalog, the first found one is used. | 22 | # |
| 23 | #region = RegionOne | ||
| 24 | 23 | ||
| 25 | -# The version of the OpenStack Images API to use | 24 | # Is the v2 image API enabled (boolean value) |
| 26 | -api_version = 1 | 25 | -#api_v2=true |
| 27 | - | 26 | +api_v2=true |
| 28 | # HTTP image to use for glance http image testing | ||
| 29 | http_image = http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz | ||
| 30 | 27 | ||
| 31 | +[image-feature-enabled] | 28 | # Is the v1 image API enabled (boolean value) |
| 32 | +# Is the image api_v1 enabled | 29 | -#api_v1=true |
| 33 | +api_v1 = True | 30 | +api_v1=true |
| 34 | +# Is the image api_v2 enabled | ||
| 35 | +api_v2 = True | ||
| 36 | + | ||
| 37 | [network] | ||
| 38 | # This section contains configuration options used when executing tests | ||
| 39 | # against the OpenStack Network API. | ||
| 40 | diff --git a/tempest/api/image/base.py b/tempest/api/image/base.py | ||
| 41 | index 4f54a15..ab0cb00 100644 | ||
| 42 | --- a/tempest/api/image/base.py | ||
| 43 | +++ b/tempest/api/image/base.py | ||
| 44 | @@ -74,17 +74,6 @@ class BaseImageTest(tempest.test.BaseTestCase): | ||
| 45 | cls.created_images.append(image['id']) | ||
| 46 | return resp, image | ||
| 47 | 31 | ||
| 48 | - @classmethod | ||
| 49 | - def _check_version(cls, version): | ||
| 50 | - __, versions = cls.client.get_versions() | ||
| 51 | - if version == 'v2.0': | ||
| 52 | - if 'v2.0' in versions: | ||
| 53 | - return True | ||
| 54 | - elif version == 'v1.0': | ||
| 55 | - if 'v1.1' in versions or 'v1.0' in versions: | ||
| 56 | - return True | ||
| 57 | - return False | ||
| 58 | - | ||
| 59 | 32 | ||
| 60 | class BaseV1ImageTest(BaseImageTest): | 33 | [input-scenario] |
| 61 | |||
| 62 | @@ -92,7 +81,7 @@ class BaseV1ImageTest(BaseImageTest): | ||
| 63 | def setUpClass(cls): | ||
| 64 | super(BaseV1ImageTest, cls).setUpClass() | ||
| 65 | cls.client = cls.os.image_client | ||
| 66 | - if not cls._check_version('v1.0'): | ||
| 67 | + if not cls.config.image_feature_enabled.api_v1: | ||
| 68 | msg = "Glance API v1 not supported" | ||
| 69 | raise cls.skipException(msg) | ||
| 70 | |||
| 71 | @@ -103,6 +92,6 @@ class BaseV2ImageTest(BaseImageTest): | ||
| 72 | def setUpClass(cls): | ||
| 73 | super(BaseV2ImageTest, cls).setUpClass() | ||
| 74 | cls.client = cls.os.image_client_v2 | ||
| 75 | - if not cls._check_version('v2.0'): | ||
| 76 | + if not cls.config.image_feature_enabled.api_v2: | ||
| 77 | msg = "Glance API v2 not supported" | ||
| 78 | raise cls.skipException(msg) | ||
| 79 | diff --git a/tempest/config.py b/tempest/config.py | ||
| 80 | index b454120..9123395 100644 | ||
| 81 | --- a/tempest/config.py | ||
| 82 | +++ b/tempest/config.py | ||
| 83 | @@ -252,9 +252,6 @@ image_group = cfg.OptGroup(name='image', | ||
| 84 | title="Image Service Options") | ||
| 85 | |||
| 86 | ImageGroup = [ | ||
| 87 | - cfg.StrOpt('api_version', | ||
| 88 | - default='1', | ||
| 89 | - help="Version of the API"), | ||
| 90 | cfg.StrOpt('catalog_type', | ||
| 91 | default='image', | ||
| 92 | help='Catalog type of the Image service.'), | ||
| 93 | @@ -270,6 +267,17 @@ ImageGroup = [ | ||
| 94 | help='http accessible image') | ||
| 95 | ] | ||
| 96 | |||
| 97 | +image_feature_group = cfg.OptGroup(name='image-feature-enabled', | ||
| 98 | + title='Enabled image service features') | ||
| 99 | + | ||
| 100 | +ImageFeaturesGroup = [ | ||
| 101 | + cfg.BoolOpt('api_v2', | ||
| 102 | + default=True, | ||
| 103 | + help="Is the v2 image API enabled"), | ||
| 104 | + cfg.BoolOpt('api_v1', | ||
| 105 | + default=True, | ||
| 106 | + help="Is the v1 image API enabled"), | ||
| 107 | +] | ||
| 108 | |||
| 109 | network_group = cfg.OptGroup(name='network', | ||
| 110 | title='Network Service Options') | ||
| 111 | @@ -635,6 +643,7 @@ class TempestConfig: | ||
| 112 | ComputeFeaturesGroup) | ||
| 113 | register_opt_group(cfg.CONF, identity_group, IdentityGroup) | ||
| 114 | register_opt_group(cfg.CONF, image_group, ImageGroup) | ||
| 115 | + register_opt_group(cfg.CONF, image_feature_group, ImageFeaturesGroup) | ||
| 116 | register_opt_group(cfg.CONF, network_group, NetworkGroup) | ||
| 117 | register_opt_group(cfg.CONF, volume_group, VolumeGroup) | ||
| 118 | register_opt_group(cfg.CONF, volume_feature_group, | ||
| 119 | @@ -655,6 +664,7 @@ class TempestConfig: | ||
| 120 | self.compute_feature_enabled = cfg.CONF['compute-feature-enabled'] | ||
| 121 | self.identity = cfg.CONF.identity | ||
| 122 | self.images = cfg.CONF.image | ||
| 123 | + self.image_feature_enabled = cfg.CONF['image-feature-enabled'] | ||
| 124 | self.network = cfg.CONF.network | ||
| 125 | self.volume = cfg.CONF.volume | ||
| 126 | self.volume_feature_enabled = cfg.CONF['volume-feature-enabled'] | ||
| 127 | -- | ||
| 128 | 1.7.9.5 | ||
| 129 | |||
diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb index 899d7e5..a1522c6 100644 --- a/meta-openstack/recipes-extended/tempest/tempest_git.bb +++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb | |||
| @@ -12,8 +12,6 @@ inherit setuptools identity hosts | |||
| 12 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=master \ | 12 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=master \ |
| 13 | file://tempest.conf \ | 13 | file://tempest.conf \ |
| 14 | file://logging.conf \ | 14 | file://logging.conf \ |
| 15 | file://0001-Stop-auto-detecting-glance-API-versions.patch \ | ||
| 16 | file://image-client-not-specify-version.patch \ | ||
| 17 | " | 15 | " |
| 18 | 16 | ||
| 19 | SRCREV="50af5d5ecc7d21d5e0d1a36fa564ef4850cf94ff" | 17 | SRCREV="50af5d5ecc7d21d5e0d1a36fa564ef4850cf94ff" |
