Thanks John. That is what I suspected.
One problem with customizing the resource discovery based on the
environment variable (which would be desirable in my case), is that the
"Add New" button for adding environment variables does not work until
AFTER the new resource is saved and edited, which is too late to be used
in creating the resource key.
Is this a defect in the presentation code?
Al Amyot | Consultant
Sierra Systems
(eHealth): 204-926-4257 (T): 204-942-2575 (F): 204-942-2047
444 St. Mary Avenue, Suite 1050
Winnipeg, MB R3C 3T1
Management Consulting | System Integration | Managed Services
website:
www.SierraSystems.com
-----Original Message-----
From: rhq-users-bounces(a)lists.fedorahosted.org
[mailto:rhq-users-bounces@lists.fedorahosted.org] On Behalf Of John
Mazzitelli
Sent: Friday, October 08, 2010 3:25 PM
To: rhq-users(a)lists.fedorahosted.org
Subject: Re: Reusing the script plugin
On 10/08/2010 04:14 PM, Al Amyot wrote:
A Script Server with the specified connection properties was already
in inventory.
Remember that each resource has unique resource keys for a unique
parent. This means if you have a parent resource A, all direct children
of that resource A that are of the same type must have different
resource keys.
In your case, you have a platform resource with child script resources -
since the script resources are of the same type, they have to have
unique resource keys.
Make sure your plugin discovery component defines unique resource keys.
IIRC, the script plugin's resource key is the full path to the script.
If you only have one script in one location, you can only have one
script resource in inventory under that platform resource.
Since the full path to the script is not unique in your case (the same
script is used multiple times), you have to come up with an algorithm
that calculates a canonical resource key that is unique across all your
script resources and customize your discovery component class.
For example, if you have environment variables whose values are
different, you can calculate a hash (md5 or sha for example) and append
that hashcode to the full path to the script - those two should make
unique resource keys.
That's just one example how you can do it. The point is - your resource
keys must be unique - if they are not, you cannot manually add more than
one script resource.
_______________________________________________
rhq-users mailing list
rhq-users(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-users
This email and/or any documents in this transmission is intended for the
addressee(s) only and may contain legally privileged or confidential information. Any
unauthorized use, disclosure, distribution, copying or dissemination is strictly
prohibited. If you receive this transmission in error, please notify the sender
immediately and return the original.
Ce courriel et tout document dans cette transmission est destiné à la personne ou aux
personnes à qui il est adressé. Il peut contenir des informations privilégiées ou
confidentielles. Toute utilisation, divulgation, distribution, copie, ou diffusion non
autorisée est strictement défendue. Si vous n'êtes pas le destinataire de ce message,
veuillez en informer l'expéditeur immédiatement et lui remettre l'original.