1. Some limits fields are removed from Microversion 2.35/2.38/2.56, so we should check limits fields according to microversion. 2. In test_max_metadata_exceed_limit, maxImageMeta is deprecated from Microversion 2.38, so maxServerMeta is used instead, btw, maxServerMeta seems to be more suitable for this testcase. Besides, test_max_metadata_exceed_limit is not used in interop, so we can safely change its name. ref: https://developer.openstack.org/api-ref/compute/#show-rate-and-absolute-limits Implements blueprint: clear-deprecated-api Change-Id: I53e2ee82c9c52afb0a56526c655eb9b3b6b8f483
41 lines
1.4 KiB
Python
41 lines
1.4 KiB
Python
# Copyright 2012 OpenStack Foundation
|
|
# All Rights Reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
from tempest.api.compute import base
|
|
from tempest.lib import decorators
|
|
|
|
|
|
class AbsoluteLimitsTestJSON(base.BaseV2ComputeTest):
|
|
max_microversion = '2.56'
|
|
|
|
@classmethod
|
|
def setup_clients(cls):
|
|
super(AbsoluteLimitsTestJSON, cls).setup_clients()
|
|
cls.client = cls.limits_client
|
|
|
|
@decorators.idempotent_id('b54c66af-6ab6-4cf0-a9e5-a0cb58d75e0b')
|
|
def test_absLimits_get(self):
|
|
# To check if all limits are present in the response (will be checked
|
|
# by schema)
|
|
self.client.show_limits()
|
|
|
|
|
|
class AbsoluteLimitsV257TestJSON(base.BaseV2ComputeTest):
|
|
min_microversion = '2.57'
|
|
max_microversion = 'latest'
|
|
|
|
# NOTE(felipemonteiro): This class tests the Absolute Limits APIs
|
|
# response schema for the 2.57 microversion.
|