Bug 1136996

Summary: Support resource upgrade callbacks in plugins
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: AgentAssignee: Nobody <nobody>
Status: ON_QA --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.13CC: hrupp, tsegismo
Target Milestone: ---   
Target Release: RHQ 4.13   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1136998 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1136998    

Description Lukas Krejci 2014-09-03 19:33:45 UTC
Description of problem:
The DiscoveryCallback mechanism has been introduced to allow of influencing discovery results of resource types from other plugins.

The picture is incomplete without also having the ability to similarly affect the resource upgrade which, too, can result in resource's plugin config or name or res key changes.

Having the ability to intercept both the discovery and resource upgrade gives the implementors complete control over the discovery-related details of the resource (plugin config, name, description, version, etc.).

As an example:

We implement a discovery callback that changes a name of an EAP server found to be the RHQ server to end with the "RHQ Server" string.

If such server was in inventory prior to having the plugin with the callback installed in RHQ, the name cannot be updated (without resource upgrade callback).

Comment 1 Lukas Krejci 2014-09-05 12:12:49 UTC
Proposed fix: https://github.com/rhq-project/rhq/pull/121

Comment 2 Thomas Segismont 2014-09-10 14:16:20 UTC
Merged in master

commit 5c39e3a7645ec794a896f066c49b9c9342c1deed
Merge: a3a59ff 06fdb9a
Author: Thomas Segismont <tsegismo>
Date:   Wed Sep 10 16:11:34 2014 +0200

    Merge branch 'bug/1136996+1135034+1135107' of github.com:metlos/rhq into metlos-bug/1136996+1135034+1135107
    
    Conflicts:
        modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/PatchHandlerComponent.java