Fill schema gap in flavors.py

This is to make delete_flavor available in flavors.py in
all microversions.

Change-Id: I176a393ecc627acc16a4aeba3988b60a7d9ba509
partially-implements: blueprint full-schema-for-all-microversions
This commit is contained in:
zhufl 2018-07-30 15:43:28 +08:00
parent fc8ef3aeeb
commit ec2604205d
3 changed files with 14 additions and 2 deletions

View File

@ -60,7 +60,7 @@ common_flavor_info = {
},
'additionalProperties': False,
# 'OS-FLV-DISABLED', 'os-flavor-access', 'rxtx_factor' and
# 'OS-FLV-EXT-DATA' are API extensions. So they are not 'required'.
# 'OS-FLV-EXT-DATA' are API extensions, so they are not 'required'.
'required': ['name', 'links', 'ram', 'vcpus', 'swap', 'disk', 'id']
}
@ -74,7 +74,7 @@ list_flavors_details = {
'items': common_flavor_info
},
# NOTE(gmann): flavors_links attribute is not necessary
# to be present always So it is not 'required'.
# to be present always so it is not 'required'.
'flavors_links': parameter_types.links
},
'additionalProperties': False,

View File

@ -11,7 +11,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import copy
from tempest.lib.api_schema.response.compute.v2_1 import flavors as flavorsv21
from tempest.lib.api_schema.response.compute.v2_1 import parameter_types
# Note(gmann): This is schema for microversion 2.55 which includes the
@ -110,3 +112,9 @@ create_update_get_flavor_details = {
'required': ['flavor']
}
}
# Note(zhufl): Below are the unchanged schema in this microversion. We need
# to keep this schema in this file to have the generic way to select the
# right schema based on self.schema_versions_info mapping in service client.
# ****** Schemas unchanged since microversion 2.1 ***
delete_flavor = copy.deepcopy(flavorsv21.delete_flavor)

View File

@ -99,4 +99,8 @@ create_update_get_flavor_details = {
# Note(gmann): Below are the unchanged schema in this microversion. We need
# to keep this schema in this file to have the generic way to select the
# right schema based on self.schema_versions_info mapping in service client.
# ****** Schemas unchanged since microversion 2.55 ***
list_flavors = copy.deepcopy(flavorsv255.list_flavors)
# ****** Schemas unchanged since microversion 2.1 ***
delete_flavor = copy.deepcopy(flavorsv255.delete_flavor)