CreateChildResourceFacet.createResource(CreateResourceReport report) does not reflect children list automatically
John Mazzitelli
mazz at redhat.com
Fri Apr 15 13:23:36 UTC 2011
> What value should be set to the resource key and resource name of new
> creation resource? Should it be same as what
> ResourceDiscoveryComponent.discovery() does ?
Yes! Specifically, the resource key is the important one. The resource
name is really just for display purposes, RHQ doesn't use the resource
name for any kind of identity. Its all about the resource key.
Make sure the resource key is unique across any peer resources (that is,
given any parent resource, all of its children of the same type must
have unique keys). Note also this doesn't mean the keys must be unique
across the entire inventory - just have to be unique for the parent.
On 04/15/2011 02:12 AM, Lin Gao wrote:
> OK, I get the reason.
>
> I need to set resourceKey and resourceName to the CreateResourceReport
> when the creation succeeds.
>
> What value should be set to the resource key and resource name of new
> creation resource? Should it be same as what
> ResourceDiscoveryComponent.discovery() does ?
>
>
>
>
> On Fri, 2011-04-15 at 10:23 +0800, Lin Gao wrote:
>> Hi, all:
>>
>> In the RHQ domain api doc:
>>
>> http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/2.4/html/API_Guides/plugin-api/org/rhq/core/pluginapi/inventory/CreateChildResourceFacet.html#createResource%28org.rhq.core.pluginapi.inventory.CreateResourceReport%29
>>
>> it says: "If everything was successful, then the returned report will
>> indicate a CreateResourceStatus.SUCCESS. Note that the returned report
>> will not have the new resource in it - that will be picked up in the
>> next auto-discovery run (which should be kicked off automatically by
>> this method)."
>>
>> Can I understand it as: if the createResource() method returns a
>> CreateResourceReport with CreateResourceStatus.SUCCESS status, the
>> plugin will run the auto-discovery immediately ?
>>
>> In my case, it takes quite a long time to see the created child
>> resource in the inventory list. It seems just waiting for next round of
>> auto-discovery run, instead of calling it immediately. Do you guys have
>> any idea on how to make the created child resource displayed immediately
>> after created ?
>>
>> My RHQ environment:
>> Version: 4.0.0.Beta1
>> Build Number: eff8946
>>
>> GWT Version: 2.0.4
>> SmartGWT Version: 2.4
>>
>>
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel
More information about the rhq-devel
mailing list