Skip to content

Commit

Permalink
Added binary dependencies previously pulled from svn externals
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennifer Hickey committed Sep 21, 2009
1 parent 6285368 commit dcddbcd
Show file tree
Hide file tree
Showing 53 changed files with 4,146 additions and 0 deletions.
Binary file added hq_bin/db2monitor_bin/lib/db2monitor.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added hq_bin/lather_bin/lather-jboss.sar
Binary file not shown.
Binary file added hq_bin/lather_bin/lather.jar
Binary file not shown.
Binary file added hq_bin/launcher_bin/hq-agent.exe
Binary file not shown.
Binary file added hq_bin/launcher_bin/hq-server.exe
Binary file not shown.
Binary file added hq_bin/product_connectors/rt-1.0.2.tar.gz
Binary file not shown.
Binary file added hq_bin/product_connectors/snmp-1.0.2.tar.gz
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-amd64-freebsd-6.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-amd64-linux.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-amd64-solaris.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-ia64-hpux-11.sl
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-ia64-linux.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-pa-hpux-11.sl
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-ppc-aix-5.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-ppc-linux.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-ppc64-aix-5.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-ppc64-linux.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-s390x-linux.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-sparc-solaris.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-sparc64-solaris.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-x86-freebsd-5.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-x86-freebsd-6.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-x86-linux.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/libsigar-x86-solaris.so
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/sigar-amd64-winnt.dll
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/sigar-x86-winnt.dll
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/sigar-x86-winnt.lib
Binary file not shown.
Binary file added hq_bin/sigar_bin/lib/sigar.jar
Binary file not shown.
13 changes: 13 additions & 0 deletions ui_plugins/hqapi1/Plugin.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import org.hyperic.hq.hqu.rendit.HQUPlugin

// Import controllers for deployment time syntax checking.
import UserController

class Plugin extends HQUPlugin {

void initialize(File pluginDir) {
super.initialize(pluginDir)
addAdminView(true, '/api/index.hqu', 'HQ Web Services Api')
}
}

93 changes: 93 additions & 0 deletions ui_plugins/hqapi1/app/AgentController.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@

import org.hyperic.hq.hqapi1.ErrorCode;

class AgentController extends ApiController {

private Closure getAgentXML(a) {
{ doc ->
Agent(id : a.id,
address : a.address,
port : a.port,
version : a.version,
unidirectional : a.unidirectional)
}
}

private Closure getUpXML(boolean up) {
{ doc ->
Up(up)
}
}

def get(params) {
def id = params.getOne("id")?.toInteger()
def address = params.getOne("address")
def port = params.getOne("port")?.toInteger()

def failureXml
def agent = getAgent(id, address, port)

if (!agent) {
failureXml = getFailureXML(ErrorCode.OBJECT_NOT_FOUND,
"Unable to find agent with id=" + id +
" address=" + address + " port=" + port)
}

renderXml() {
out << AgentResponse() {
if (failureXml) {
out << failureXml
} else {
out << getSuccessXML()
out << getAgentXML(agent)
}
}
}
}

def list(params) {
renderXml() {
out << AgentsResponse() {
out << getSuccessXML()
for (agent in agentHelper.allAgents.sort {a, b -> a.address <=> b.address}) {
out << getAgentXML(agent)
}
}
}
}

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

def failureXml
boolean up
if (!id) {
failureXml = getFailureXML(ErrorCode.INVALID_PARAMETERS)
} else {
try {
def agent = getAgent(id, null, null)
if (!agent) {
failureXml = getFailureXML(ErrorCode.OBJECT_NOT_FOUND,
"Agent with id=" + id + " not found")

} else {
up = agent.ping(user)
}
} catch (Exception e) {
log.error("UnexpectedError: " + e.getMessage(), e);
failureXml = getFailureXML(ErrorCode.UNEXPECTED_ERROR)
}
}

renderXml() {
out << PingAgentResponse() {
if (failureXml) {
out << failureXml
} else {
out << getSuccessXML()
out << getUpXML(up)
}
}
}
}
}
Loading

0 comments on commit dcddbcd

Please sign in to comment.