From 724207652c1213d7b6fd6d2e073652d3b015caba Mon Sep 17 00:00:00 2001 From: Ryan Morgan Date: Mon, 29 Jun 2009 11:25:10 -0700 Subject: [PATCH] Add WADL resource definitions for RoleApi --- .../hyperic/hq/hqapi1/test/WADLRole_test.java | 35 +++++++++ xsd/HQApi1.wadl | 72 ++++++++++++++++++- 2 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 src/org/hyperic/hq/hqapi1/test/WADLRole_test.java diff --git a/src/org/hyperic/hq/hqapi1/test/WADLRole_test.java b/src/org/hyperic/hq/hqapi1/test/WADLRole_test.java new file mode 100644 index 00000000..d7cb9437 --- /dev/null +++ b/src/org/hyperic/hq/hqapi1/test/WADLRole_test.java @@ -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); + } +} diff --git a/xsd/HQApi1.wadl b/xsd/HQApi1.wadl index 29993a0b..9b32f0bf 100644 --- a/xsd/HQApi1.wadl +++ b/xsd/HQApi1.wadl @@ -992,7 +992,7 @@ - Get a Group + List Groups @@ -1011,7 +1011,6 @@ - Delete a Group @@ -1048,6 +1047,75 @@ + + + Get a Role + + + + + + The name of the Role to return. + + + + + + + + + + + + List Roles + + + + + + + + + + + + Delete a Role + + + + + + The id of the Role to delete. + + + + + + + + + + + + Sync Roles + + + + + + + + + + +