Skip to content

Commit

Permalink
Add Resource and Group elements to Application list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Morgan committed Sep 16, 2009
2 parents 4bba847 + 3eb8f30 commit 86db5bc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
14 changes: 14 additions & 0 deletions hqu/hqapi1/app/ApplicationController.groovy
Expand Up @@ -84,8 +84,22 @@ class ApplicationController extends ApiController {
}

def delete(params) {
def id = params.getOne('id')?.toInteger()

if (id == null) {
renderXml() {
out << StatusResponse() {
out << getFailureXML(ErrorCode.INVALID_PARAMETERS)
}
}
return
}

def failureXml = null

// TODO: remove next debugging line
print "ID: " + id

renderXml() {
StatusResponse() {
if (failureXml) {
Expand Down
11 changes: 6 additions & 5 deletions src/org/hyperic/hq/hqapi1/test/ApplicationList_test.java
Expand Up @@ -17,12 +17,13 @@ public void testList() throws Exception {
ApplicationsResponse response = api.listApplications();
// TODO: remove debugging lines
System.out.println("TEST " + response);
System.out.println("TEST " + response.getApplication().size());
System.out.println("TEST - Apps: " + response.getApplication().size());
if (response.getApplication().size() > 0) {
System.out.println("TEST " + response.getApplication().get(0).getLocation());
System.out.println("TEST " + response.getApplication().get(0).getDescription());
System.out.println("Resources: " + response.getApplication().get(0).getResource().size());
System.out.println("Groups: " + response.getApplication().get(0).getGroup().size());
System.out.println("APP 1: " + response.getApplication().get(0).getId());
System.out.println("APP 1: " + response.getApplication().get(0).getLocation());
System.out.println("APP 1: " + response.getApplication().get(0).getDescription());
System.out.println("APP 1 Resources: " + response.getApplication().get(0).getResource().size());
System.out.println("APP 1 Groups: " + response.getApplication().get(0).getGroup().size());
}
hqAssertSuccess(response);
}
Expand Down

0 comments on commit 86db5bc

Please sign in to comment.