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. :)
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
Austinin 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. :)