From: <rm...@hy...> - 2008-07-30 16:31:54
|
Author: rmorgan Date: 2008-07-30 09:31:50 -0700 (Wed, 30 Jul 2008) New Revision: 203 URL: http://svn.hyperic.org/?view=rev&root=HQApi&revision=203 Modified: trunk/hqu/hqapi1/app/AgentController.groovy Log: Fix agent listing on 3.2, no isUnidirectional flag. Modified: trunk/hqu/hqapi1/app/AgentController.groovy =================================================================== --- trunk/hqu/hqapi1/app/AgentController.groovy 2008-07-28 23:50:11 UTC (rev 202) +++ trunk/hqu/hqapi1/app/AgentController.groovy 2008-07-30 16:31:50 UTC (rev 203) @@ -4,12 +4,20 @@ class AgentController extends ApiController { private Closure getAgentXML(a) { + def uni + if (a.metaClass.respondsTo(a, "isUnidirectional")) { + uni = a.unidirectional + } else { + // Legacy agent + uni = false + } + { doc -> Agent(id : a.id, address : a.address, port : a.port, version : a.version, - unidirectional : a.unidirectional) + unidirectional : uni) } } |