You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When more than one site exists with the same name under different parents, the appliance has the potential to get mismatched depending on where the parent is in relation to the duplicate site's parent alphabetically. e.g. XYZ company has a site in Austin, TX, named Austin in NCentral. ABC company also has a site with the same name. If one were to invoke the installer on an agent under XYZ's Austin site, it will get matched with ABC's site instead because a match was found, causing iteration through the list of customers to halt.
How to replicate:
Create a scenario similar to the above example.
Proposal for resolution:
Perhaps iteration should continue, then additional validation occurs if more than one match is returned. Or perhaps, if this is possible (not intimately familiar with the N-Central API), match against a more unique ID instead of using the site name as the key.
I will review the code and relevant API docs and see if I can't come up with a resolution. If I do and you haven't had time to work this out, I'll submit a PR. :)
The text was updated successfully, but these errors were encountered:
Rather than continue the iteration, I think I should abandon the customer name matching altogether. When I retrieve the list of customers, I'm already getting all the IDs, and when I get the DeviceInfo, the customerID is one of the fields along with customername, and is a unique number. So lines 111 to 140 need to change from matching against customerName to customerID.
That being said, hopefully you've got time to submit the PR.
Problem:
When more than one site exists with the same name under different parents, the appliance has the potential to get mismatched depending on where the parent is in relation to the duplicate site's parent alphabetically. e.g. XYZ company has a site in Austin, TX, named
Austin
in NCentral. ABC company also has a site with the same name. If one were to invoke the installer on an agent under XYZ's Austin site, it will get matched with ABC's site instead because a match was found, causing iteration through the list of customers to halt.How to replicate:
Create a scenario similar to the above example.
Proposal for resolution:
Perhaps iteration should continue, then additional validation occurs if more than one match is returned. Or perhaps, if this is possible (not intimately familiar with the N-Central API), match against a more unique ID instead of using the site name as the key.
I will review the code and relevant API docs and see if I can't come up with a resolution. If I do and you haven't had time to work this out, I'll submit a PR. :)
The text was updated successfully, but these errors were encountered: