Permalink
Browse files

Reorder XSD attributes for better ordering. [HHQ-3062]

  • Loading branch information...
1 parent 6e6e449 commit 04f307090e8510b5236dfc8d35e891b1799f967a Ryan Morgan committed Jun 29, 2009
Showing with 71 additions and 72 deletions.
  1. +71 −72 xsd/HQApi1.xsd
View
143 xsd/HQApi1.xsd
@@ -36,29 +36,29 @@
<!-- Resource objects -->
<xs:complexType name="Ip">
- <xs:attribute name="address" type="xs:string" use="required"/>
<xs:attribute name="netmask" type="xs:string" use="optional"/>
<xs:attribute name="mac" type="xs:string" use="optional"/>
+ <xs:attribute name="address" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="ResourcePrototype">
- <xs:attribute name="id" type="xs:int" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
<xs:complexType name="ResourceConfig">
- <xs:attribute name="key" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:attribute name="key" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="ResourceProperty">
- <xs:attribute name="key" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:attribute name="key" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="ResourceInfo">
- <xs:attribute name="key" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:attribute name="key" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="Resource">
@@ -79,9 +79,9 @@
e.g installpath, fqdn, autoinventory identifier -->
<xs:element name="ResourceInfo" maxOccurs="unbounded" type="ResourceInfo"/>
</xs:sequence>
- <xs:attribute name="id" type="xs:int" use="optional"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string" use="optional"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="optional"/>
</xs:complexType>
<xs:element name="ResourcePrototypesResponse">
@@ -167,17 +167,17 @@
<!-- User objects -->
<xs:complexType name="User">
- <xs:attribute name="id" type="xs:int" use="optional"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="firstName" type="xs:string" use="required"/>
- <xs:attribute name="lastName" type="xs:string" use="required"/>
- <xs:attribute name="department" type="xs:string" use="required"/>
- <xs:attribute name="emailAddress" type="xs:string" use="required"/>
- <xs:attribute name="SMSAddress" type="xs:string" use="required"/>
- <xs:attribute name="phoneNumber" type="xs:string" use="required"/>
- <xs:attribute name="active" type="xs:boolean" use="required"/>
- <xs:attribute name="htmlEmail" type="xs:boolean" use="required"/>
<xs:attribute name="passwordHash" type="xs:string" use="required"/>
+ <xs:attribute name="htmlEmail" type="xs:boolean" use="required"/>
+ <xs:attribute name="active" type="xs:boolean" use="required"/>
+ <xs:attribute name="phoneNumber" type="xs:string" use="required"/>
+ <xs:attribute name="SMSAddress" type="xs:string" use="required"/>
+ <xs:attribute name="emailAddress" type="xs:string" use="required"/>
+ <xs:attribute name="department" type="xs:string" use="required"/>
+ <xs:attribute name="lastName" type="xs:string" use="required"/>
+ <xs:attribute name="firstName" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="optional"/>
</xs:complexType>
<!-- User Responses -->
@@ -299,9 +299,9 @@
<xs:element name="Operation" maxOccurs="unbounded" type="Operation"/>
<xs:element name="User" maxOccurs="unbounded" type="User"/>
</xs:sequence>
- <xs:attribute name="id" type="xs:int" use="optional"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="description" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="optional"/>
</xs:complexType>
<!-- Role response objects -->
@@ -359,8 +359,8 @@
<xs:complexType name="Criteria">
<xs:all>
- <xs:element name="id" type="xs:int"/>
<xs:element name="name" type="xs:string"/>
+ <xs:element name="id" type="xs:int"/>
</xs:all>
</xs:complexType>
@@ -371,10 +371,10 @@
<xs:element name="Resource" type="Resource" maxOccurs="unbounded"/>
<xs:element name="Role" type="Role" maxOccurs="unbounded"/>
</xs:sequence>
- <xs:attribute name="id" type="xs:int" use="optional" />
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="description" type="xs:string"/>
<xs:attribute name="location" type="xs:string"/>
+ <xs:attribute name="description" type="xs:string"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="optional" />
</xs:complexType>
<!-- Group Responses -->
@@ -417,20 +417,20 @@
<xs:sequence>
<xs:element name="MetricTemplate" type="MetricTemplate"/>
</xs:sequence>
+ <xs:attribute name="collectionType" type="xs:string" use="required"/>
+ <xs:attribute name="indicator" type="xs:boolean" use="required"/>
+ <xs:attribute name="defaultOn" type="xs:boolean" use="required"/>
+ <xs:attribute name="enabled" type="xs:boolean" use="required"/>
+ <xs:attribute name="interval" type="xs:long" use="required"/>
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="interval" type="xs:long" use="required"/>
- <xs:attribute name="enabled" type="xs:boolean" use="required"/>
- <xs:attribute name="defaultOn" type="xs:boolean" use="required"/>
- <xs:attribute name="indicator" type="xs:boolean" use="required"/>
- <xs:attribute name="collectionType" type="xs:string" use="required"/>
</xs:complexType>
<!-- Metric data -->
<xs:complexType name="DataPoint">
- <xs:attribute name="timestamp" type="xs:long" use="required"/>
<xs:attribute name="value" type="xs:double" use="required"/>
+ <xs:attribute name="timestamp" type="xs:long" use="required"/>
</xs:complexType>
<xs:complexType name="MetricData">
@@ -506,16 +506,16 @@
<!-- MetricTemplate objects -->
<xs:complexType name="MetricTemplate">
- <xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="alias" type="xs:string" use="required"/>
- <xs:attribute name="units" type="xs:string" use="required"/>
- <xs:attribute name="plugin" type="xs:string" use="required"/>
- <xs:attribute name="indicator" type="xs:boolean" use="required"/>
- <xs:attribute name="defaultOn" type="xs:boolean" use="required"/>
- <xs:attribute name="collectionType" type="xs:string" use="required"/>
- <xs:attribute name="category" type="xs:string" use="required"/>
<xs:attribute name="defaultInterval" type="xs:long" use="required"/>
+ <xs:attribute name="category" type="xs:string" use="required"/>
+ <xs:attribute name="collectionType" type="xs:string" use="required"/>
+ <xs:attribute name="defaultOn" type="xs:boolean" use="required"/>
+ <xs:attribute name="indicator" type="xs:boolean" use="required"/>
+ <xs:attribute name="plugin" type="xs:string" use="required"/>
+ <xs:attribute name="units" type="xs:string" use="required"/>
+ <xs:attribute name="alias" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
<!-- MetricTemplate Responses -->
@@ -562,29 +562,30 @@
<xs:sequence>
<xs:element name="Notify" type="Notify" maxOccurs="unbounded" />
</xs:sequence>
- <xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="wait" type="xs:long" use="required"/>
- <xs:attribute name="actionType" type="xs:string" use="required"/>
<!-- Email or SMS -->
<xs:attribute name="notifyType" type="xs:string" use="required" />
<xs:attribute name="sms" type="xs:boolean" use="required" />
<!-- Syslog attributes -->
<xs:attribute name="syslogMeta" use="optional"/>
<xs:attribute name="syslogProduct" use="optional"/>
<xs:attribute name="syslogVersion" use="optional"/>
+ <!-- Base attributes -->
+ <xs:attribute name="wait" type="xs:long" use="required"/>
+ <xs:attribute name="actionType" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
<xs:complexType name="Escalation">
<xs:sequence>
<xs:element name="Action" type="EscalationAction" maxOccurs="unbounded"/>
</xs:sequence>
- <xs:attribute name="id" type="xs:int" use="optional"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="description" type="xs:string" use="required"/>
- <xs:attribute name="pauseAllowed" type="xs:boolean" use="required"/>
- <xs:attribute name="maxPauseTime" type="xs:long" use="required"/>
- <xs:attribute name="notifyAll" type="xs:boolean" use="required"/>
<xs:attribute name="repeat" type="xs:boolean" use="required"/>
+ <xs:attribute name="notifyAll" type="xs:boolean" use="required"/>
+ <xs:attribute name="maxPauseTime" type="xs:long" use="required"/>
+ <xs:attribute name="pauseAllowed" type="xs:boolean" use="required"/>
+ <xs:attribute name="description" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="optional"/>
</xs:complexType>
<!-- Escalation Responses -->
@@ -624,9 +625,9 @@
<!-- Autodiscvoery objects -->
<xs:complexType name="AIPlatform">
- <xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="fqdn" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
<!-- Autodiscovery Responses -->
@@ -646,11 +647,11 @@
<!-- Agent objects -->
<xs:complexType name="Agent">
- <xs:attribute name="id" type="xs:int" use="required"/>
- <xs:attribute name="address" type="xs:string" use="required"/>
- <xs:attribute name="port" type="xs:int" use="required"/>
- <xs:attribute name="version" type="xs:string" use="required"/>
<xs:attribute name="unidirectional" type="xs:boolean" use="required"/>
+ <xs:attribute name="version" type="xs:string" use="required"/>
+ <xs:attribute name="port" type="xs:int" use="required"/>
+ <xs:attribute name="address" type="xs:string" use="required"/>
+ <xs:attribute name="id" type="xs:int" use="required"/>
</xs:complexType>
<!-- Agent responses -->
@@ -694,9 +695,6 @@
<!-- Since conditions must be ordered and inheritence does not work so
well in JAXB we must define all options -->
<xs:complexType name="AlertCondition">
- <!-- All conditions -->
- <xs:attribute name="required" type="xs:boolean" use="required"/>
- <xs:attribute name="type" type="xs:int" use="required"/>
<!-- CProp change conditions -->
<xs:attribute name="property" type="xs:string" use="optional"/>
<!-- Log conditions -->
@@ -720,28 +718,31 @@
<!-- Control command -->
<xs:attribute name="controlAction" type="xs:string" use="optional"/>
<xs:attribute name="controlStatus" type="xs:string" use="optional"/>
+ <!-- All conditions -->
+ <xs:attribute name="type" type="xs:int" use="required"/>
+ <xs:attribute name="required" type="xs:boolean" use="required"/>
</xs:complexType>
<xs:complexType name="AlertDefinition">
<xs:sequence>
<xs:element name="Resource" type="Resource" maxOccurs="1"/>
<xs:element name="ResourcePrototype" type="ResourcePrototype" maxOccurs="1"/>
<xs:element name="Escalation" type="Escalation" maxOccurs="1"/>
- <!-- The ordering of this this is important -->
+ <!-- The ordering of this list is important -->
<xs:element name="AlertCondition" type="AlertCondition" maxOccurs="unbounded"/>
</xs:sequence>
- <xs:attribute name="id" type="xs:int" use="optional" />
- <xs:attribute name="name" type="xs:string" use="required" />
- <xs:attribute name="description" type="xs:string" use="required" />
- <xs:attribute name="parent" type="xs:int" use="optional" />
- <xs:attribute name="priority" type="xs:int" use="required" />
- <xs:attribute name="active" type="xs:boolean" use="required" />
- <xs:attribute name="frequency" type="xs:int" use="required" />
- <xs:attribute name="count" type="xs:int" use="required" />
- <xs:attribute name="range" type="xs:int" use="required" />
- <xs:attribute name="willRecover" type="xs:boolean" use="required" />
- <xs:attribute name="notifyFiltered" type="xs:boolean" use="required" />
<xs:attribute name="controlFiltered" type="xs:boolean" use="required" />
+ <xs:attribute name="notifyFiltered" type="xs:boolean" use="required" />
+ <xs:attribute name="willRecover" type="xs:boolean" use="required" />
+ <xs:attribute name="range" type="xs:int" use="required" />
+ <xs:attribute name="count" type="xs:int" use="required" />
+ <xs:attribute name="frequency" type="xs:int" use="required" />
+ <xs:attribute name="active" type="xs:boolean" use="required" />
+ <xs:attribute name="priority" type="xs:int" use="required" />
+ <xs:attribute name="parent" type="xs:int" use="optional" />
+ <xs:attribute name="description" type="xs:string" use="required" />
+ <xs:attribute name="name" type="xs:string" use="required" />
+ <xs:attribute name="id" type="xs:int" use="optional" />
</xs:complexType>
<xs:element name="AlertDefinitionResponse">
@@ -798,11 +799,9 @@
<xs:sequence>
<xs:element name="State" maxOccurs="1" type="MaintenanceState"/>
</xs:sequence>
-
- <xs:attribute name="groupId" type="xs:int" use="required"/>
- <xs:attribute name="startTime" type="xs:long" use="required"/>
<xs:attribute name="endTime" type="xs:long" use="required"/>
-
+ <xs:attribute name="startTime" type="xs:long" use="required"/>
+ <xs:attribute name="groupId" type="xs:int" use="required"/>
</xs:complexType>
<!-- Maintenance response objects -->

0 comments on commit 04f3070

Please sign in to comment.