Permalink
Browse files

Merge branch 'wadl'

  • Loading branch information...
2 parents 4bf6600 + 7242076 commit b807fe6c8211baa03c1681f0dc015ec9914d3855 Ryan Morgan committed Jun 29, 2009
@@ -0,0 +1,35 @@
+package org.hyperic.hq.hqapi1.test;
+
+import org.hyperic.hq.hqapi1.wadl.*;
+
+public class WADLGroup_test extends WADLTestBase {
+
+ public void testGroupList() throws Exception {
+ Endpoint.GroupListHqu groupList = new Endpoint.GroupListHqu();
+
+ GroupsResponse response = groupList.getAsGroupsResponse();
+ hqAssertSuccess(response);
+ }
+
+ public void testGroupGet() throws Exception {
+ Endpoint.GroupGetHqu groupGet = new Endpoint.GroupGetHqu();
+
+ GroupResponse response = groupGet.getAsGroupResponse("Some group");
+ hqAssertFailure(response);
+ }
+
+ public void testGroupDelete() throws Exception {
+ Endpoint.GroupDeleteHqu groupDelete = new Endpoint.GroupDeleteHqu();
+
+ StatusResponse response = groupDelete.getAsStatusResponse(Integer.MAX_VALUE);
+ hqAssertFailure(response);
+ }
+
+ public void testGroupSync() throws Exception {
+ Endpoint.GroupSyncHqu groupSync = new Endpoint.GroupSyncHqu();
+ GroupsRequest request = new GroupsRequest();
+
+ GroupsResponse response = groupSync.postAsGroupsResponse(request);
+ hqAssertSuccess(response);
+ }
+}
@@ -0,0 +1,35 @@
+package org.hyperic.hq.hqapi1.test;
+
+import org.hyperic.hq.hqapi1.wadl.*;
+
+public class WADLRole_test extends WADLTestBase {
+
+ public void testRoleList() throws Exception {
+ Endpoint.RoleListHqu roleList = new Endpoint.RoleListHqu();
+
+ RolesResponse response = roleList.getAsRolesResponse();
+ hqAssertSuccess(response);
+ }
+
+ public void testRoleGet() throws Exception {
+ Endpoint.RoleGetHqu roleGet = new Endpoint.RoleGetHqu();
+
+ RoleResponse response = roleGet.getAsRoleResponse("Some role");
+ hqAssertFailure(response);
+ }
+
+ public void testRoleDelete() throws Exception {
+ Endpoint.RoleDeleteHqu roleDelete = new Endpoint.RoleDeleteHqu();
+
+ StatusResponse response = roleDelete.getAsStatusResponse(Integer.MAX_VALUE);
+ hqAssertFailure(response);
+ }
+
+ public void testRoleSync() throws Exception {
+ Endpoint.RoleSyncHqu roleSync = new Endpoint.RoleSyncHqu();
+ RolesRequest request = new RolesRequest();
+
+ StatusResponse response = roleSync.postAsStatusResponse(request);
+ hqAssertSuccess(response);
+ }
+}
View
@@ -970,6 +970,152 @@
</wadl:method>
</wadl:resource>
+ <wadl:resource path="group/get.hqu">
+ <wadl:doc title="HQApi Group get command">
+ Get a Group
+ </wadl:doc>
+ <wadl:method name="GET" id="GroupGet">
+ <wadl:request>
+ <wadl:param name="name" style="query" required="true"
+ type="xs:string">
+ <wadl:doc>
+ The name of the Group to return.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="GroupResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="group/list.hqu">
+ <wadl:doc title="HQApi Group list command">
+ List Groups
+ </wadl:doc>
+ <wadl:method name="GET" id="GroupList">
+ <wadl:request>
+ <wadl:param name="compatible" style="query" required="false"
+ type="xs:boolean">
+ <wadl:doc>
+ If specified only return compatible Groups when set
+ to true, or mixed Groups when set to false.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="GroupsResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="group/delete.hqu">
+ <wadl:doc title="HQApi Group delete command">
+ Delete a Group
+ </wadl:doc>
+ <wadl:method name="GET" id="GroupDelete">
+ <wadl:request>
+ <wadl:param name="id" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the Group 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="group/sync.hqu">
+ <wadl:doc title="HQApi Group sync command">
+ Sync Groups
+ </wadl:doc>
+ <wadl:method name="POST" id="GroupSync">
+ <wadl:request>
+ <wadl:representation mediaType="application/xml"
+ element="GroupsRequest"/>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="GroupsResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="role/get.hqu">
+ <wadl:doc title="HQApi Role get command">
+ Get a Role
+ </wadl:doc>
+ <wadl:method name="GET" id="RoleGet">
+ <wadl:request>
+ <wadl:param name="name" style="query" required="true"
+ type="xs:string">
+ <wadl:doc>
+ The name of the Role to return.
+ </wadl:doc>
+ </wadl:param>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="RoleResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="role/list.hqu">
+ <wadl:doc title="HQApi Role list command">
+ List Roles
+ </wadl:doc>
+ <wadl:method name="GET" id="RoleList">
+ <wadl:request/>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="RolesResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
+ <wadl:resource path="role/delete.hqu">
+ <wadl:doc title="HQApi Role delete command">
+ Delete a Role
+ </wadl:doc>
+ <wadl:method name="GET" id="RoleDelete">
+ <wadl:request>
+ <wadl:param name="id" style="query" required="true"
+ type="xs:int">
+ <wadl:doc>
+ The id of the Role 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="role/sync.hqu">
+ <wadl:doc title="HQApi Role sync command">
+ Sync Roles
+ </wadl:doc>
+ <wadl:method name="POST" id="RoleSync">
+ <wadl:request>
+ <wadl:representation mediaType="application/xml"
+ element="RolesRequest"/>
+ </wadl:request>
+ <wadl:response>
+ <wadl:representation mediaType="application/xml"
+ element="StatusResponse"/>
+ </wadl:response>
+ </wadl:method>
+ </wadl:resource>
+
</wadl:resources>
</wadl:application>

0 comments on commit b807fe6

Please sign in to comment.