Bug 535819 - (RHQ-2476) Find another way of mapping augeas nodes to rhq properties
Find another way of mapping augeas nodes to rhq properties
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
All All
high Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
: FutureFeature, Improvement
Depends On:
  Show dependency treegraph
Reported: 2009-10-26 11:20 EDT by Lukas Krejci
Modified: 2010-05-27 04:12 EDT (History)
0 users

See Also:
Fixed In Version: 1.4
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-05-27 04:12:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2009-10-26 11:20:00 EDT
Currently we "overload" the property name in rhq-plugin.xml to provide the expression to filter down to the augeas node corresponding to the property.
Because the property names have limited length (currently 100 chars), that obviously limits us in the complexity of the augeas expressions possible.

We should come up with a better way of handling this.

The simplest approach would be to modify augeas plugin to use some kind of facade interface to obtain the augeas expression from given property (or property definition) rather than directly using the name of those.
Comment 1 Ian Springer 2009-10-27 10:55:16 EDT
Maybe we should keep using the names as the default impl of this new API, e.g.:

 protected String getAugeasNodeExpression(PropertyDefinition propDef) {
   return propDef.getName();

 protected String getAugeasNodeExpression(PropertyDefinition propDef) {
   return NODE_EXPRESSION_MAP.get(propDef.getName());

That way we can keep the mapping metadata in the descriptor for the simpler cases.
Comment 2 Lukas Krejci 2009-10-27 11:10:15 EDT
Yes, I have it already implemented like that.

protected String getAugeasPathRelativeToParent(PropertyDefinition propDef, AugeasNode parentNode, Augeas augeas);

with the default implementation as you suggested...

This is in my local branch, will commit it soonish with the updates to the cron plugin...
Comment 3 Red Hat Bugzilla 2009-11-10 16:05:10 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2476
Comment 4 wes hayutin 2010-02-16 12:09:25 EST
mass add of key word FutureFeature to help track
Comment 5 Charles Crouch 2010-05-25 21:25:02 EDT
Lukas, please close if this is done/out of date.
Comment 6 Lukas Krejci 2010-05-27 04:12:22 EDT
This has been in the code base for some time now.

Note You need to log in before you can comment on or make changes to this bug.