Skip to content

Add 'role' to Inventory Items #3087

@candlerb

Description

@candlerb

Environment

  • Python version: 3.5.4
  • NetBox version: 2.3.6

Proposed Functionality

Add a "role" field to Inventory Items.

Use Case

  • To classify inventory items by function, e.g. "OS disk", "data disk", "hot spare"; and/or
  • To classify inventory items by type, e.g. "motherboard", "CPU", "RAM", "NIC"

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 existing vm_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

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions