Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues matching Parent to apprpriate customer.id when duplicate customer names exist v11-InstallFromNCentralAgent.aspx.cs #5

Open
therealscottcarlow opened this issue Jan 24, 2017 · 2 comments

Comments

@therealscottcarlow
Copy link
Contributor

therealscottcarlow commented Jan 24, 2017

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

@joncz
Copy link
Collaborator

joncz commented Jan 24, 2017

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.

@therealscottcarlow
Copy link
Contributor Author

I haven't had the time to look much further into it. I'll dive into it over the weekend if you haven't gotten to it by then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants