-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add 'role' to Inventory Items #3087
Comments
This will be very useful but there would be a need to filter them by role in inventory items list view |
Reading the request, I was initially in support of this, but have since grown mixed feelings. I am abstaining from voting on this. Not against this idea, but wouldn't expect to use it on my server. |
Wouldn't InventoryItem roles and Device roles generally by mutually exclusive of one another? E.g. a "router" can't be an InventoryItem and a "hard disk" can't be a Device. Edit:
Missed that. Can you provide some examples? |
I was just saying what you said more clearly: that in many (most? all?) cases, Inventory Item roles would not be relevant to Device, or vice versa. So there could be a separate Inventory Item Roles list - but doing so would mean code duplication (e.g. for editing them, setting colours etc) and some menu clutter. Are there any examples where the same role would apply to both? Probably not. Maybe "hot spare" - on a device that might be better managed by Status, although there isn't one exactly that matches that (there are "offline" and "planned") |
Or this can be exposed only in ADMIN panel and Netbox Administrator can create them in advance. |
My wish: add Inventory to 'Device Type - Status' = 'Parent/Child/Inventory status' Reuse the 'Device Bay' logic... So I could map the following:
...two Power Supplies added to the server inventory - no more CopyPaste @candlerb The 'Inventory Item' dialog needs the 'Inventory Role' now. For my Power Supplies eg. |
I think what you want is instead to have Inventory Item Type (analagous to Device Type). This seems like a reasonable idea to me. Devices cannot contain other Devices as Inventory Items, they are completely distinct types of objects. |
I believe making device roles to more generic could be good and another boolean similar to VM Role. As of now, Devices and VirtualMachines are different models but shares the same Device Roles. We could have something similar flag inventory_item which can be assigned only to inventory items. As in original request, it was proposed that roles could be a function or physical type. |
@jeremystretch I think this ticket can be closed as it is a duplicate of #3333 |
@hSaria The two proposals are related but different. Similar to the difference between the DeviceRole and DeviceType models. |
Ah. That makes more sense.
… On 2 Jan 2020, at 6:12 pm, Jeremy Stretch ***@***.***> wrote:
@hSaria The two proposals are related but different. Similar to the difference between the DeviceRole and DeviceType models.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
FYI, both the typing and the role have been implemented in a fork here: If we can get an actual issue up for this and get it accepted we can get this ball rolling? If we are deadlocked then maybe we build out something else in a companion app? I think it would be better to have this functionality built in rather than having to go around it just to track what a component inside a server is and its role? |
Can we have the 'Inventory' also made part of the 'Device template' ? |
FYI @PieterL75 opened #8118 for this. We may take this on as part of the related work already scheduled for v3.2. |
Closes #3087: Add inventory item roles
Environment
Proposed Functionality
Add a "role" field to Inventory Items.
Use Case
Inventory items already have Tags, but the idea of using Tags for this was rejected in #3082
Database Changes
Add a "role_id" column to Inventory Item, which references device role. Make it nullable for backwards compatibility.
Probably want to add a new flag to
dcim_devicerole
to say whether it's usable on an inventory item (comparable to existingvm_role
flag)At this point it may also be worth having a flag to say whether the role is usable on Device (since I can imagine roles which are relevant to Inventory Item but not Device, and vice versa)
External Dependencies
None
The text was updated successfully, but these errors were encountered: