Coverage for nova/api/openstack/compute/schemas/images.py: 100%
4 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-17 15:08 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-04-17 15:08 +0000
1# Licensed under the Apache License, Version 2.0 (the "License"); you may
2# not use this file except in compliance with the License. You may obtain
3# a copy of the License at
4#
5# http://www.apache.org/licenses/LICENSE-2.0
6#
7# Unless required by applicable law or agreed to in writing, software
8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10# License for the specific language governing permissions and limitations
11# under the License.
13from nova.api.validation import parameter_types
15# NOTE(stephenfin): These schemas are incomplete but won't be enhanced further
16# since these APIs have been removed
18show_query = {
19 'type': 'object',
20 'properties': {},
21 'additionalProperties': True,
22}
24index_query = {
25 'type': 'object',
26 'properties': {
27 # NOTE(stephenfin): We never validated these and we're not going to add
28 # that validation now.
29 # field filters
30 'name': {},
31 'status': {},
32 'changes-since': {},
33 'server': {},
34 'type': {},
35 'minRam': {},
36 'minDisk': {},
37 # pagination filters
38 'limit': parameter_types.multi_params(
39 parameter_types.positive_integer),
40 'page_size': parameter_types.multi_params(
41 parameter_types.positive_integer),
42 'marker': {},
43 'offset': parameter_types.multi_params(
44 parameter_types.positive_integer),
45 },
46 'patternProperties': {
47 '^property-.*$': {},
48 },
49 'additionalProperties': True,
50}
52detail_query = index_query