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

Device Platform selection is not limited by Manufacturer #14058

Closed
sleepinggenius2 opened this issue Oct 17, 2023 · 3 comments · Fixed by #15183
Closed

Device Platform selection is not limited by Manufacturer #14058

sleepinggenius2 opened this issue Oct 17, 2023 · 3 comments · Fixed by #15183
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@sleepinggenius2
Copy link
Contributor

NetBox version

v3.6.3

Python version

3.8

Steps to Reproduce

Device
  1. Click on "Devices" > "Add"
  2. Select a "Device type" under the "Hardware" section
  3. Click on the "Platform" dropdown under the "Management" section
  4. The list includes all Platform values
Device Type
  1. Click on "Device Types" > "Add"
  2. Select a "Manufacturer" under the "Device Type" section
  3. Click on the "Default platform" dropdown under the "Device Type" section
  4. The list includes all Platform values

Expected Behavior

The available list of platforms should be limited by the selected manufacturer.

Observed Behavior

All Platform objects are available for selection.

It looks like when #11952 was implemented it caused a regression in how this worked for Devices, as the Manufacturer was previously filtered on in the UI. There is still a check in place on the Device.clean method to perform this validation, so it seems to just be a UI bug for Devices at this time.

For Device Types, it does not appear that filtering or validation were ever added for the default_platform field.

@sleepinggenius2 sleepinggenius2 added the type: bug A confirmed report of unexpected behavior in the application label Oct 17, 2023
@cpmills1975
Copy link
Contributor

I'd like to vote against this unless the filter allows platforms with no manufacturer to be included.

While a network switch OS is only ever going to be run on a switch from the same manufacturer, the same cannot be said for server OSs such as Linux that will run happily on a Dell just as it will on a HP.

The Devices clean method takes care of this through checking for a manufacturer field in the platform and only rejecting the platform if these differ. Unless the UI can do the same, then this shouldn't be 'fixed'.

@sleepinggenius2
Copy link
Contributor Author

Yes, the filter previously included platforms with no manufacturer set. I would just like to have pre-3.5 functionality restored in the UI for devices at a minimum. The Device Type functionality would actually be easier to implement, as it still has the Manufacturer field, it just looks like it was never implemented when the default_platform field was added. From a UX standpoint, if I have a Cisco device, I should see IOS, but not Junos listed, and I might still have something like Linux listed (no manufacturer set). This is how it worked in 3.4, before we lost the Manufacturer field, when it was incorporated into the object selector for the Device Type.

@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available labels Dec 7, 2023
@Katharta
Copy link

Katharta commented Dec 9, 2023

Agree with cpmills1975... I would like to notate the manufacturer for server OSes for inventory purposes, but locking the available device types to said manufacturer ideally should be a separate option or checkbox.

@DanSheps DanSheps added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Feb 15, 2024
@DanSheps DanSheps self-assigned this Feb 15, 2024
DanSheps added a commit that referenced this issue Feb 16, 2024
jeremystretch added a commit that referenced this issue Feb 20, 2024
…ms with no manufacturer (#15183)

* Fixes: #14058 - Limits platform selection to manufacturer and platforms with no manufacturer

* Apply suggestions from code review

Co-authored-by: Jeremy Stretch <[email protected]>

---------

Co-authored-by: Jeremy Stretch <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
5 participants