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

OSFV_CLI doesn't detect multiple devices with the same IP in SnipeIT #27

Open
filipleple opened this issue Apr 5, 2024 · 4 comments
Open
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@filipleple
Copy link
Member

If there are multiple devices enlisted in SnipeIT with the same IP address, the script will simply pick the first one.

It would be really useful if it gave the user a warning in such situations instead.

@filipleple filipleple added the bug Something isn't working label Apr 5, 2024
@macpijan macpijan added this to the v0.5.0 milestone Jun 10, 2024
@macpijan macpijan added the good first issue Good for newcomers label Feb 14, 2025
@macpijan
Copy link
Contributor

We should probably look for duplicates when reviewing the assets here: https://github.com/Dasharo/osfv-scripts/blob/main/osfv_cli/src/osfv/libs/snipeit_api.py#L83

And issue warning to the user, rather than performing action on possibly incorrect device. In a worst case, it can lead to damaging some hardware.

@macpijan
Copy link
Contributor

@matmacieje If we create some Dummy test devices in SnipeIT, we can use them instead of those here: https://github.com/Dasharo/osfv-scripts/blob/main/osfv_cli/test/snipeit.robot#L14

We could also add one more test case, which would test for this case with multiple IPs.

@matmacieje
Copy link
Contributor

matmacieje commented Feb 17, 2025

@macpijan Do we need warning-and-exit only in case of unit's system IP duplication, or also for any other IP-defining conection (RTE, Sonoff, PiKVM, ...)?

@macpijan
Copy link
Contributor

macpijan commented Feb 17, 2025

@matmacieje As linked in the first comment, we can get asset either by asset ID or RTE IP. So we should check for duplication or RTE_IP field in the first place. Others are not as important, but may be a plus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants