Bug 535819 (RHQ-2476) - Find another way of mapping augeas nodes to rhq properties
Summary: Find another way of mapping augeas nodes to rhq properties
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-2476
Product: RHQ Project
Classification: Other
Component: Plugins
Version: unspecified
Hardware: All
OS: All
high
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-26 15:20 UTC by Lukas Krejci
Modified: 2010-05-27 08:12 UTC (History)
0 users

Fixed In Version: 1.4
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-27 08:12:22 UTC
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2009-10-26 15:20:00 UTC
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 14:55:16 UTC
Maybe we should keep using the names as the default impl of this new API, e.g.:

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

CronTabComponent:
 @Override
 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 15:10:15 UTC
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 21:05:10 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2476


Comment 4 wes hayutin 2010-02-16 17:09:25 UTC
mass add of key word FutureFeature to help track

Comment 5 Charles Crouch 2010-05-26 01:25:02 UTC
Lukas, please close if this is done/out of date.

Comment 6 Lukas Krejci 2010-05-27 08:12:22 UTC
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.