
Depends-On: https://review.opendev.org/c/openstack/governance/+/910581 Change-Id: I87866224d9ac89d3da150c95a86a20afb48dc4d2
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
# 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.
|
|
#
|
|
import copy
|
|
|
|
from typing import Any
|
|
|
|
from keystone.resource import schema as ks_schema
|
|
|
|
|
|
LINK_SCHEMA: dict[str, Any] = {
|
|
"type": "object",
|
|
"description": "Links to the resources in question. See [API Guide / Links and References](https://docs.openstack.org/api-guide/compute/links_and_references.html) for more info.",
|
|
"properties": {
|
|
"href": {"type": "string", "format": "uri"},
|
|
"rel": {"type": "string"},
|
|
},
|
|
}
|
|
|
|
LINKS_SCHEMA: dict[str, Any] = {
|
|
"type": "array",
|
|
"description": "Links to the resources in question. See [API Guide / Links and References](https://docs.openstack.org/api-guide/compute/links_and_references.html) for more info.",
|
|
"items": copy.deepcopy(LINK_SCHEMA),
|
|
}
|
|
|
|
|
|
TAG_SCHEMA: dict[str, Any] = copy.deepcopy(
|
|
ks_schema._project_tag_name_properties
|
|
)
|
|
|
|
TAGS_SCHEMA: dict[str, Any] = {
|
|
"type": "object",
|
|
"properties": {"tags": ks_schema._project_tags_list_properties},
|
|
}
|