Juan Hernandez has uploaded a new change for review.

Change subject: restapi: Fix XML schema for fencing agents
......................................................................

restapi: Fix XML schema for fencing agents

The "Agents" XML complex type corresponds to a collection, not to an
entity. But it is defined as an extension of the "BaseResource" type,
which corresponds to entities, not to collections. This breaks our rules
for XML schema and induces errors in the Java SDK, as the generated type
"Agents" is not within the bounds of the type parameters ued by the
generic type "CollectionDecorator".  This patch fixes the "Agents" type
so that it extends "BaseResources".

Change-Id: Ia5eed94f34ce7fafd98c362356e333db117668be
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
---
M 
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/38190/1

diff --git 
a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
 
b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
index 2798a8a..f7febd8 100644
--- 
a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
+++ 
b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
@@ -1759,8 +1759,8 @@
   <xs:element name="agents" type="Agents"/>
 
   <xs:complexType name="Agents">
-      <xs:complexContent>
-      <xs:extension base="BaseResource">
+    <xs:complexContent>
+      <xs:extension base="BaseResources">
         <xs:sequence>
           <xs:element name="agent" type="Agent" minOccurs="0" 
maxOccurs="unbounded">
             <xs:annotation>
@@ -1785,7 +1785,7 @@
       <xs:element name="options" type="Options" minOccurs="0"/>
       <xs:element ref="status" minOccurs="0" maxOccurs="1"/>
       <xs:element ref="pm_proxies" minOccurs="0" maxOccurs="1"/>
-      <xs:element ref="agents" minOccurs="0"/>
+      <xs:element ref="agents" minOccurs="0" maxOccurs="1"/>
       <xs:element name="automatic_pm_enabled" type="xs:boolean" minOccurs="0" 
maxOccurs="1"/>
       <xs:element name="kdump_detection" type="xs:boolean" minOccurs="0" 
maxOccurs="1"/>
     </xs:sequence>


-- 
To view, visit https://gerrit.ovirt.org/38190
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5eed94f34ce7fafd98c362356e333db117668be
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to