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.