JBoss Community Archive (Read Only)


Providing DynaGroup expressions

Agent plugins can provide canned DynaGroup expressions. Such expressions become available to a user in UI when he creates DynaGroup definition and can serve as examples. Optionally such expressions can be auto-deployed as regular dynaGroups.

Descriptor file

DynaGroup expressions live in standalone XML descriptor file META-INF/rhq-group-expressions.xml within your plugin.jar. There is a XSD being used to validate and parse descriptor.

See following example from Platform Plugin:

<?xml version="1.0" encoding="UTF-8" ?>
<expressions xmlns="urn:xmlns:rhq-canned-groups">
    <id>Platforms</id> <!-- (String) unique per plugin -->
    <name>Groups by platform</name> <!-- dynaGroup name -->
    <createByDefault>true</createByDefault> <!-- (bool) true to deploy dynaGroup by default -->
    <recalcInMinutes>10</recalcInMinutes> <!-- (int) recalculation interval (0 = never) -->
    <recursive>false</recursive> <!-- (bool) true to create recursive groups -->
    <description>Generates groups by platform</description> <!-- description for dynaGroup -->
    <expression>resource.type.category = PLATFORM</expression> <!-- dynaGroup expression (each line as an element) -->
    <expression>groupby resource.type.name</expression>

More examples can be found for example in JBossAS7 plugin.

Server-side aspects

All definitions from all plugins are listed in Provided Expressions list whenever user edits or creates DynaGroup Definitionin UI.

Definitions having createByDefault=true

  • DynaGroup definition is created or updated when plugin is deployed to server.

  • DynaGroup definition is kept in sync with plugin whenever new version of plugin is deployed to server.

  • All DynaGroup definitions provided by plugins are removed when plugin is uninstalled from server.

  • When user changes plugin provided DynaGroup it gets detached from plugin - such definition will no longer be updated when plugin updates.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:37:23 UTC, last content change 2014-04-25 10:24:09 UTC.