ERROR: One or more entries contained multiple IDs that are not supported by PyRemedy
jkalbus opened this issue · 8 comments
Hello,
this error prevents me from accessing schemas I think are essential for my work,
ERROR: One or more entries contained multiple IDs that are not supported by PyRemedy
It happens when I try to access HPD:IncidentInterface to fetch details on a currently open incident. I am not aware there are multiple indices when specifying ONE inc only.
Remedy lib 8.1.1 is as recommended on a rhel 6 system with python 2.6
Could you provide me some help?
This is rather strange because none of my schemas had multiple IDs. I explicitly chose to not support schemas that contained more than 1 ID per entry is that complicates the usage and implementation of the library.
I have pushed the multiple-ids branch to understand this problem further in your Remedy implementation.
Can you please run it and provide me the lines printed to stdout starting with the word "DEBUG"?
Thanks
Fotis
I will be closing this for now, but happy to re-open it if you would like to discuss further. Currently, this library does work as intended with regards to this feature, but I will re-consider it if I can find legitimate cases where it is useful. Certainly our schema has no duplicate keys.
Hello
and sorry for the late reply. I am still busy with other projects. I will
try to provide you with the information needed.
In the meantime I am using some self written code using suds and some
reverse engineered settings to access remedy :-(
Johanes Kalbus
2016-03-09 13:16 GMT+01:00 Fotis Gimian notifications@github.com:
—
Reply to this email directly or view it on GitHub
#1 (comment).
No worries @jkalbus, sorry for the late reply on my part too. I've re-opened the issue so we can see if there's a good solution to this problem. 😄
Ok, did my last code tries with your multiple IDs branch and got double item ids.
Why and what happened I cannot say for sure because the output is for an INC I did not request...
Here is the code:
try:
# Initialise a connection to the Remedy ARS server
ars = ARS(
server='server', port=2494,
user='foo', password='bar'
)
entries = ars.query(
schema='HPD:IncidentInterface',
qualifier = ''' 'Incident Number*' = "''' + inc + '''"''',
fields = [ 'Description', 'Incident Number', 'Assigned Group', 'InstanceId' ]
)
print entries
for entry_id, entry_values in entries:
print('Entry ID: {0}'.format(entry_id))
print('-' * 80)
for field, value in entry_values.items():
print('{0}: {1}'.format(field, value))
print
and here is the output - I clearly asked for INC000000150247 and got an additional INC000000146162. Searching for that second Incident I don't get any response from the remedy gui. Or remedy has different internal incident numbers than the ones shown...
<0> $ ./rem_inc.py INC000000150247
DEBUG: 2 number of items found
DEBUG: item id : INC000000146162
DEBUG: item id : INC000000146162
[('INC000000146162', {'InstanceId': 'IDGAA5V0FNZSKANATU3EN91XREB541', 'Incident Number': 'INC000000150247', 'Description': 'Anfrage Server Access', 'Assigned Group': 'Operations'})]
Entry ID: INC000000146162
--------------------------------------------------------------------------------
InstanceId: IDGAA5V0FNZSKANATU3EN91XREB541
Incident Number: INC000000150247
Description: Anfrage Server Access
Assigned Group: Operations
Thanks @jkalbus, I suspect your schema actually has a real issue there. It is presenting 2 IDs which are identical to one another. This is not actually standard behaviour of Remedy.
Would you be able to reach out to BMC or whoever maintains your schema to determine the cause for this?
The reason this is critical is that the next version of PyRemedy will change to returning a dict instead of a list of tuples and the ID will have to be unique as it will serve as the key in the dict.
I will be closing this case as it appears to be a problem with your instance.
Kindest Regards
Fotis