1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-03 01:17:41 +03:00

M #-: Fix *.xsd (#3205)

* Schemas validated by online tool
* Ambiguity errors not solved
This commit is contained in:
Pavel Czerný 2024-09-03 18:45:56 +02:00 committed by GitHub
parent d8d1409377
commit cd9eb49321
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 36 deletions

View File

@ -13,7 +13,7 @@
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="POSITION" type="xs:integer"/> <xs:element name="POSITION" type="xs:integer"/>
<xs:element name="TYPE" type="xs:string"> <xs:element name="TYPE">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="IN"/> <xs:enumeration value="IN"/>
@ -21,7 +21,7 @@
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="VALUE" type="xs:string"/> <xs:element name="VALUE" type="xs:anyType"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- This schema is followd by the EVENT API message sent by the Hook Manager --> <!-- This schema is followd by the EVENT API message sent by the Hook Manager -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema"> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema">
<xs:include schemaLocation="api_info.xsd"/>
<xs:element name="HOOK_MESSAGE"> <xs:element name="HOOK_MESSAGE">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>

View File

@ -1,5 +1,5 @@
<!-- This schema is followd by the EVENT API message sent by the Hook Manager -->
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- This schema is followed by the EVENT API message sent by the Hook Manager -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema"> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema">
<xs:element name="HOOK_MESSAGE"> <xs:element name="HOOK_MESSAGE">
<xs:complexType> <xs:complexType>

View File

@ -1,11 +1,15 @@
<!-- This schema is followd by the EVENT API message sent by the Hook Manager -->
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- This schema is followed by the EVENT API message sent by the Hook Manager -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema"> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema">
<xs:include schemaLocation="host.xsd"/>
<xs:include schemaLocation="vm.xsd"/>
<xs:include schemaLocation="image.xsd"/>
<xs:include schemaLocation="vnet.xsd"/>
<xs:element name="HOOK_MESSAGE"> <xs:element name="HOOK_MESSAGE">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="HOOK_TYPE" type="xs:string" fixed="STATE"/> <xs:element name="HOOK_TYPE" type="xs:string" fixed="STATE"/>
<xs:element name="HOOK_OBJECT" type="xs:string"> <xs:element name="HOOK_OBJECT">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="VM"/> <xs:enumeration value="VM"/>
@ -17,6 +21,7 @@
</xs:element> </xs:element>
<xs:element name="STATE" type="xs:string"/> <xs:element name="STATE" type="xs:string"/>
<xs:element name="LCM_STATE" type="xs:string" maxOccurs="1" minOccurs="0"/> <xs:element name="LCM_STATE" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="RESOURCE_ID" type="xs:integer"/>
<xs:element name="REMOTE_HOST" type="xs:string" maxOccurs="1" minOccurs="0"/> <xs:element name="REMOTE_HOST" type="xs:string" maxOccurs="1" minOccurs="0"/>
<!-- The template of the resource (VM, Host, Image or VNet) is included here --> <!-- The template of the resource (VM, Host, Image or VNet) is included here -->
<xs:element ref="HOST" maxOccurs="1" minOccurs="0"/> <xs:element ref="HOST" maxOccurs="1" minOccurs="0"/>

View File

@ -2,36 +2,40 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema"> targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema">
<xs:element name="ZONE_POOL"> <xs:element name="ZONE_POOL">
<xs:element name="ZONE" minOccurs="1" maxOccurs="unbounded"> <xs:complexType>
<xs:complexType> <xs:sequence>
<xs:sequence> <xs:element name="ZONE" minOccurs="1" maxOccurs="unbounded">
<xs:element name="ID" type="xs:integer"/> <xs:complexType>
<xs:element name="NAME" type="xs:string"/> <xs:sequence>
<xs:element name="STATE" type="xs:integer"/> <xs:element name="ID" type="xs:integer"/>
<xs:element name="TEMPLATE"> <xs:element name="NAME" type="xs:string"/>
<xs:complexType> <xs:element name="STATE" type="xs:integer"/>
<xs:sequence> <xs:element name="TEMPLATE">
<xs:element name="ENDPOINT" type="xs:string"/> <xs:complexType>
</xs:sequence> <xs:sequence>
</xs:complexType> <xs:element name="ENDPOINT" type="xs:string"/>
</xs:element> </xs:sequence>
<xs:element name="SERVER_POOL"> </xs:complexType>
<xs:complexType> </xs:element>
<xs:sequence> <xs:element name="SERVER_POOL">
<xs:element name="SERVER" minOccurs="0" maxOccurs="unbounded"> <xs:complexType>
<xs:complexType> <xs:sequence>
<xs:sequence> <xs:element name="SERVER" minOccurs="0" maxOccurs="unbounded">
<xs:element name="ENDPOINT" type="xs:string"/> <xs:complexType>
<xs:element name="ID" type="xs:integer"/> <xs:sequence>
<xs:element name="NAME" type="xs:string"/> <xs:element name="ENDPOINT" type="xs:string"/>
</xs:sequence> <xs:element name="ID" type="xs:integer"/>
</xs:complexType> <xs:element name="NAME" type="xs:string"/>
</xs:element> </xs:sequence>
</xs:sequence> </xs:complexType>
</xs:complexType> </xs:element>
</xs:element> </xs:sequence>
</xs:sequence> </xs:complexType>
</xs:complexType> </xs:element>
</xs:element> </xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element> </xs:element>
</xs:schema> </xs:schema>