Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'wadl'

  • Loading branch information...
commit 4bf6600d9f7b13121fb4443176720eecb534630f 2 parents 218d5de + 970cf87
Ryan Morgan authored
View
39 src/org/hyperic/hq/hqapi1/test/WADLAlertDefinition_test.java
@@ -0,0 +1,39 @@
+package org.hyperic.hq.hqapi1.test;
+
+import org.hyperic.hq.hqapi1.wadl.*;
+
+public class WADLAlertDefinition_test extends WADLTestBase {
+
+ public void testListDefinitions() throws Exception {
+ Endpoint.AlertdefinitionListDefinitionsHqu adList =
+ new Endpoint.AlertdefinitionListDefinitionsHqu();
+
+ AlertDefinitionsResponse response = adList.getAsAlertDefinitionsResponse();
+ hqAssertSuccess(response);
+ }
+
+ public void testListTypeDefinitions() throws Exception {
+ Endpoint.AlertdefinitionListTypeDefinitionsHqu adTypeList =
+ new Endpoint.AlertdefinitionListTypeDefinitionsHqu();
+
+ AlertDefinitionsResponse response = adTypeList.getAsAlertDefinitionsResponse();
+ hqAssertSuccess(response);
+ }
+
+ public void testDelete() throws Exception {
+ Endpoint.AlertdefinitionDeleteHqu adDelete =
+ new Endpoint.AlertdefinitionDeleteHqu();
+
+ StatusResponse response = adDelete.getAsStatusResponse(Integer.MAX_VALUE);
+ hqAssertFailure(response); // Won't exist.
+ }
+
+ public void testSync() throws Exception {
+ Endpoint.AlertdefinitionSyncHqu adSync =
+ new Endpoint.AlertdefinitionSyncHqu();
+ AlertDefinitionsRequest request = new AlertDefinitionsRequest();
+
+ AlertDefinitionsResponse response = adSync.postAsAlertDefinitionsResponse(request);
+ hqAssertSuccess(response);
+ }
+}
View
38 src/org/hyperic/hq/hqapi1/test/WADLEscalation_test.java
@@ -0,0 +1,38 @@
+package org.hyperic.hq.hqapi1.test;
+
+import org.hyperic.hq.hqapi1.wadl.*;
+
+public class WADLEscalation_test extends WADLTestBase {
+
+ public void testEscalationGet() throws Exception {
+ Endpoint.EscalationGetHqu escGet = new Endpoint.EscalationGetHqu();
+
+ EscalationResponse response = escGet.getAsEscalationResponse("Some Esc");
+ hqAssertFailure(response); // Won't exist
+ }
+
+ public void testEscalationList() throws Exception {
+ Endpoint.EscalationListHqu escList = new Endpoint.EscalationListHqu();
+
+ EscalationsResponse response = escList.getAsEscalationsResponse();
+ hqAssertSuccess(response);
+ }
+
+ public void testEscalationDelete() throws Exception {
+ Endpoint.EscalationDeleteHqu escDelete =
+ new Endpoint.EscalationDeleteHqu();
+
+ StatusResponse response = escDelete.getAsStatusResponse(Integer.MAX_VALUE);
+ hqAssertFailure(response); // Won't exist
+ }
+
+ public void testEscalationSync() throws Exception {
+ Endpoint.EscalationSyncHqu escSync =
+ new Endpoint.EscalationSyncHqu();
+
+ EscalationsRequest request = new EscalationsRequest();
+
+ StatusResponse response = escSync.postAsStatusResponse(request);
+ hqAssertSuccess(response);
+ }
+}
View
33 src/org/hyperic/hq/hqapi1/test/WADLMaintenance_test.java
@@ -0,0 +1,33 @@
+package org.hyperic.hq.hqapi1.test;
+
+import org.hyperic.hq.hqapi1.wadl.*;
+
+public class WADLMaintenance_test extends WADLTestBase {
+
+ public void testGet() throws Exception {
+ Endpoint.MaintenanceGetHqu maintGet = new Endpoint.MaintenanceGetHqu();
+
+ MaintenanceResponse response = maintGet.getAsMaintenanceResponse(Integer.MAX_VALUE);
+ hqAssertFailure(response);
+ }
+
+ public void testSchedule() throws Exception {
+ Endpoint.MaintenanceScheduleHqu maintSchedule =
+ new Endpoint.MaintenanceScheduleHqu();
+
+ MaintenanceResponse response =
+ maintSchedule.getAsMaintenanceResponse(Integer.MAX_VALUE,
+ System.currentTimeMillis(),
+ System.currentTimeMillis());
+ hqAssertFailure(response);
+ }
+
+ public void testUnschedule() throws Exception {
+ Endpoint.MaintenanceUnscheduleHqu maintUnschedule =
+ new Endpoint.MaintenanceUnscheduleHqu();
+
+ StatusResponse response =
+ maintUnschedule.getAsStatusResponse(Integer.MAX_VALUE);
+ hqAssertFailure(response);
+ }
+}
View
256 xsd/HQApi1.wadl
@@ -683,7 +683,7 @@
</wadl:resource>
<wadl:resource path="autodiscovery/getQueue.hqu">
- <wadl:doc title="HQApi Agent list command">
+ <wadl:doc title="HQApi Autodiscovery getQueue command">
List the Autodiscovery queue
</wadl:doc>
<wadl:method name="GET" id="AutodiscoveryGetQueue">
@@ -715,6 +715,260 @@
</wadl:method>
</wadl:resource>
+ <wadl:resource path="maintenance/get.hqu">
+ <wadl:doc title="HQApi Maintenance get command">
+ Get the maintenance schedule for a Group
+ </wadl:doc>
+ <wadl:method name="GET" id="MaintenanceGet">
+ <wadl:request>
+ <wadl:param name="groupId" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the Group to get maintenance.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="MaintenanceResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="maintenance/schedule.hqu">
+ <wadl:doc title="HQApi Maintenance schedule command">
+ Schedule maintenance for a Group
+ </wadl:doc>
+ <wadl:method name="GET" id="MaintenanceSchedule">
+ <wadl:request>
+ <wadl:param name="groupId" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the Group to put into maintenance.
+ </wadl:doc>
+ </wadl:param>
+
+ <wadl:param name="start" style="query" required="true"
+ type="xs:long">
+ <wadl:doc>
+ The start time in milliseconds from the epoch.
+ </wadl:doc>
+ </wadl:param>
+
+ <wadl:param name="end" style="query" required="true"
+ type="xs:long">
+ <wadl:doc>
+ The end time in milliseconds from the epoch.
+ </wadl:doc>
+ </wadl:param>
+
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="MaintenanceResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="maintenance/unschedule.hqu">
+ <wadl:doc title="HQApi Maintenance unschedule command">
+ Unschedule maintenance for a Group
+ </wadl:doc>
+ <wadl:method name="GET" id="MaintenanceUnschedule">
+ <wadl:request>
+ <wadl:param name="groupId" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the Group to unschedule from maintenance.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="StatusResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="alertdefinition/listDefinitions.hqu">
+ <wadl:doc title="HQApi Alertdefinition listDefinitions command">
+ List AlertDefinitions. If multiple optional parameters are used
+ the returned list will be the union of all parameters. (Logical
+ AND)
+ </wadl:doc>
+ <wadl:method name="GET" id="AlertDefinitionListDefinitions">
+ <wadl:request>
+ <wadl:param name="alertNameFilter" style="query" required="false"
+ type="xs:string">
+ <wadl:doc>
+ If specified, only return AlertDefinitions that have
+ a name matching the given regular expression.
+ </wadl:doc>
+ </wadl:param>
+ <wadl:param name="resourceNameFilter" style="query" required="false"
+ type="xs:string">
+ <wadl:doc>
+ If specified, only return AlertDefinitions that are
+ on Resources with a name matching the given regular
+ expression.
+ </wadl:doc>
+ </wadl:param>
+ <wadl:param name="groupName" style="query" required="false"
+ type="xs:string">
+ <wadl:doc>
+ If specified, only return AlertDefinitions for Resources
+ contained in the specified Group.
+ </wadl:doc>
+ </wadl:param>
+ <wadl:param name="escalationId" style="query" required="false"
+ type="xs:int">
+ <wadl:doc>
+ If specified, only return AlertDefinitions that are
+ assigned to the given Escalation.
+ </wadl:doc>
+ </wadl:param>
+ <wadl:param name="excludeTypeBased" style="query" required="false"
+ type="xs:boolean">
+ <wadl:doc>
+ If true, only return AlertDefinitions that are not created
+ as part of a Resource type definition.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="AlertDefinitionsResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="alertdefinition/listTypeDefinitions.hqu">
+ <wadl:doc title="HQApi Alertdefinition listTypeDefinitions command">
+ List type based AlertDefinitions
+ </wadl:doc>
+ <wadl:method name="GET" id="AlertDefinitionListTypeDefinitions">
+ <wadl:request>
+ <wadl:param name="excludeIds" style="query" required="false"
+ default="false" type="xs:boolean">
+ <wadl:doc>
+ If true, do not include AlertDefinition ids in the
+ XML output.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="AlertDefinitionsResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="alertdefinition/delete.hqu">
+ <wadl:doc title="HQApi Alertdefinition delete command">
+ Delete an AlertDefinition
+ </wadl:doc>
+ <wadl:method name="GET" id="AlertDefinitionDelete">
+ <wadl:request>
+ <wadl:param name="id" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the AlertDefinition to delete.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="StatusResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="alertdefinition/sync.hqu">
+ <wadl:doc title="HQApi Alertdefinition sync command">
+ Sync AlertDefinitions
+ </wadl:doc>
+ <wadl:method name="POST" id="AlertDefinitionSync">
+ <wadl:request>
+ <wadl:representation mediaType="application/xml"
+ element="AlertDefinitionsRequest"/>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="AlertDefinitionsResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="escalation/get.hqu">
+ <wadl:doc title="HQApi Escalation get command">
+ Get an Escalation
+ </wadl:doc>
+ <wadl:method name="GET" id="EscalationGet">
+ <wadl:request>
+ <wadl:param name="name" style="query" required="true"
+ type="xs:string">
+ <wadl:doc>
+ The name of the Escalation to return.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="EscalationResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="escalation/list.hqu">
+ <wadl:doc title="HQApi Escalation list command">
+ List Escalations
+ </wadl:doc>
+ <wadl:method name="GET" id="EscalationList">
+ <wadl:request/>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="EscalationsResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="escalation/delete.hqu">
+ <wadl:doc title="HQApi Escalation delete command">
+ Delete an AlertDefinition
+ </wadl:doc>
+ <wadl:method name="GET" id="EscalationDelete">
+ <wadl:request>
+ <wadl:param name="id" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the Escalation to delete.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="StatusResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <!-- Escalation create/update left off intentionally, use sync() -->
+
+ <wadl:resource path="escalation/sync.hqu">
+ <wadl:doc title="HQApi Escalation sync command">
+ Sync Escalations
+ </wadl:doc>
+ <wadl:method name="POST" id="EscalationSync">
+ <wadl:request>
+ <wadl:representation mediaType="application/xml"
+ element="EscalationsRequest"/>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="StatusResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
</wadl:resources>
Please sign in to comment.
Something went wrong with that request. Please try again.