Bug 535819 (RHQ-2476)

Summary: Find another way of mapping augeas nodes to rhq properties
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: PluginsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: unspecifiedKeywords: FutureFeature, Improvement
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2476
Whiteboard:
Fixed In Version: 1.4 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-27 04:12:22 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

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.:

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 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.