| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You 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. |
| --> |
| |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| <xs:annotation> |
| <xs:documentation> |
| This XSD is used to validate a version definition file. You can verify the XML is valid |
| by running (on Linux): |
| xmllint --noout --load-trace --schema [path-to-this-file] [path-to-xml] |
| </xs:documentation> |
| </xs:annotation> |
| |
| <xs:complexType name="release-type"> |
| <xs:all> |
| <xs:element name="type" type="repo-type" /> |
| <xs:element name="stack-id" type="xs:string" /> |
| <xs:element name="version" type="xs:string" /> |
| <xs:element name="build" type="xs:string" minOccurs="0" maxOccurs="1"/> |
| <xs:element name="compatible-with" type="xs:string" minOccurs="0"/> |
| <xs:element name="release-notes" type="xs:string" maxOccurs="1" /> |
| <xs:element name="display" type="xs:string" minOccurs="0" /> |
| <!-- deprecated and will be removed --> |
| <xs:element name="package-version" type="xs:string" minOccurs="0" /> |
| </xs:all> |
| </xs:complexType> |
| |
| <xs:simpleType name="repo-type"> |
| <xs:restriction base="xs:string"> |
| <xs:enumeration value="STANDARD" /> |
| <xs:enumeration value="SERVICE" /> |
| <xs:enumeration value="PATCH" /> |
| <xs:enumeration value="MAINT" /> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <xs:simpleType name="family-type"> |
| <xs:restriction base="xs:string"> |
| <xs:enumeration value="redhat6" /> |
| <xs:enumeration value="redhat7" /> |
| <xs:enumeration value="redhat-ppc6" /> |
| <xs:enumeration value="redhat-ppc7" /> |
| <xs:enumeration value="debian6" /> |
| <xs:enumeration value="debian7" /> |
| <xs:enumeration value="debian9" /> |
| <xs:enumeration value="ubuntu12" /> |
| <xs:enumeration value="ubuntu14" /> |
| <xs:enumeration value="ubuntu16" /> |
| <xs:enumeration value="ubuntu18" /> |
| <xs:enumeration value="suse11" /> |
| <xs:enumeration value="suse12" /> |
| <xs:enumeration value="amazonlinux2" /> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <xs:simpleType name="tag-type"> |
| <xs:restriction base="xs:NMTOKEN"> |
| <xs:enumeration value="GPL" /> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <xs:complexType name="manifest-service-type"> |
| <xs:annotation> |
| <xs:documentation> |
| The manifest element describes what services are included in the repository. This |
| is an exhaustive list and is NOT representative of what a cluster is allowed to |
| use for upgrading. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element name="service" minOccurs="1" maxOccurs="unbounded"> |
| <xs:annotation> |
| <xs:documentation> |
| A service includes both the name and version represented in the repository. |
| An ID is also required as a reference elsewhere in the document. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:complexType> |
| <xs:attribute name="name" type="xs:string" use="required" /> |
| <xs:attribute name="version" type="xs:string" use="required" /> |
| <xs:attribute name="id" type="xs:string" use="required" /> |
| <xs:attribute name="version-id" type="xs:string" /> |
| <xs:attribute name="release-version" type="xs:string" /> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="available-services-type"> |
| <xs:annotation> |
| <xs:documentation> |
| Provides a list of services that are available to upgrade out of this repository. |
| A service may include a list of components that can be upgraded. These are specified |
| (generally) for patch upgrades only. |
| |
| A service must have an 'idref' attribute to tie it back to a service and version from |
| the 'manifest' element. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element name="service" minOccurs="0" maxOccurs="unbounded"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="component" minOccurs="0" maxOccurs="unbounded" /> |
| </xs:sequence> |
| <xs:attribute name="idref" use="required" type="xs:string" /> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="tags-type"> |
| <xs:annotation> |
| <xs:documentation> |
| Tags are a way to mark a repository for special purposes. There |
| may be logic surrounding a tag in the code, or used by agents. |
| |
| Tags are NOT meant to be random strings, they must be defined |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element name="tag" type="tag-type" minOccurs="0" maxOccurs="unbounded" /> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="repository-info-type"> |
| <xs:sequence> |
| <xs:element name="os" maxOccurs="unbounded"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="package-version" minOccurs="0" /> |
| <xs:element name="repo" maxOccurs="unbounded"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="baseurl" type="xs:string" /> |
| <xs:element name="repoid" type="xs:string" /> |
| <xs:element name="reponame" type="xs:string" /> |
| <xs:element name="distribution" type="xs:string" minOccurs="0" maxOccurs="1" /> |
| <xs:element name="components" type="xs:string" minOccurs="0" maxOccurs="1" /> |
| <xs:element name="mirrorslist" type="xs:string" minOccurs="0" maxOccurs="1" /> |
| <xs:element name="unique" type="xs:boolean" minOccurs="0" maxOccurs="1" /> |
| <xs:element name="tags" type="tags-type" minOccurs="0" maxOccurs="1" /> |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| <xs:attribute name="family" type="family-type" use="required" /> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="upgrade-type"> |
| <xs:sequence> |
| <xs:element name="configuration" maxOccurs="unbounded"> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="set" maxOccurs="unbounded"> |
| <xs:complexType> |
| <xs:attribute name="key" use="required" /> |
| <xs:attribute name="value" use="required" /> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| <xs:attribute name="type" use="required" /> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:element name="repository-version"> |
| <xs:annotation> |
| <xs:documentation> |
| This is the root element for the xml file. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="release" type="release-type" /> |
| <xs:element name="manifest" type="manifest-service-type" /> |
| <xs:element name="available-services" type="available-services-type" /> |
| <xs:element name="repository-info" type="repository-info-type"/> |
| <xs:element name="upgrade" minOccurs="0" type="upgrade-type" /> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:key name="service-id-key"> |
| <xs:annotation> |
| <xs:documentation> |
| This key is used to identify services used in other elements to the services |
| from the 'manifest' element. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:selector xpath="./manifest/service" /> |
| <xs:field xpath="@id" /> |
| </xs:key> |
| |
| <xs:keyref name="available-services-id-keyref" refer="service-id-key"> |
| <xs:annotation> |
| <xs:documentation> |
| The key reference for 'available-services' to the 'manifest' service. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:selector xpath="./available-services/service" /> |
| <xs:field xpath="@idref" /> |
| </xs:keyref> |
| |
| </xs:element> |
| |
| </xs:schema> |