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

Assigning inventory kind assets to devices #153

Open
Azmodeszer opened this issue Mar 29, 2024 · 4 comments
Open

Assigning inventory kind assets to devices #153

Azmodeszer opened this issue Mar 29, 2024 · 4 comments

Comments

@Azmodeszer
Copy link

Okay, just so I understand this correctly, an asset object can be one of four "kinds":

Inventory Item (plugin)
Inventory Item (native)
Device (native)
Module (native)

My issue in particular is that I have observed that I cannot assign a native device object to an asset if that asset is not of kind Device Type. To be more precise, I can specify the relationship with the Edit Assignment page, hit 'Save' and there are no errors, but the assignment is simply not being written to the database and no activity is shown in the changelog.

So this seems more like a bug to me? Or is this intentional? You could change the asset's kind to Device Type, BUT then the asset does not show up for any Inventory Item Groups (unsurprising, because it is not of kind Inventory Item anymore) and thus not in handy things like 'Asset count by status' which seems to me like defeating the point of the plugin. I tried setting both an inventory item type and a device type for an asset, but only one is allowed (this can be pushed through directly in the database, however then you can't edit the asset anymore ... :> ).

What is the intended way of doing things here? I have an asset object and want to link it to a hardware entry in the native database, but retain inventory-related overviews pertaining to status and group. I guess the thinking was that inventory items and full-blown NB devices are fundamentally different, but surely it makes sense for a lot of hardware to be relevant to native documentation in NB as devices while at the same time also being useful to keep track of as inventory.

@matejv
Copy link
Member

matejv commented Apr 18, 2024

When you have an asset that represents a device - such as a switch or outer, you create that asset by assigning it a device type, not an inventory item type.

When you do that you can then either:

  • associate an existing device in netbox with this asset. They must have a matching device type, though.
  • create a new netbox device from asset. the new device will have the same device type as the asset has

When you do that, you have linked device and asset. So throughout netbox you have easy access from device to asset and associated asset data such as purchase, warranty info and so on.

Also take a look at this excelent explenation by @alehaa

@Azmodeszer
Copy link
Author

Okay, so basically I can't have it both ways: Link an asset to a device and associate it with an Inventory Item Group. It's intentionally either/or?

@matejv
Copy link
Member

matejv commented May 6, 2024

Inventory item groups are grouping Inventory item types. (I suppose they should be called Inventory item type groups, but that seems a bit too verbose).

An equivalent function for devices would be to be able to group device types I suppose.

What is your use-case exactly? It might help to understand how to approach solving this.

@Azmodeszer
Copy link
Author

Well, suppose there are a couple of desktops that are documented in NetBox natively since they are also relevant for network documentation. At the same time, it'd of course also be useful to track them as assets (ex. in terms of their status; in use, stored, repair, defective, etc.) as part of an inventory item group "Desktop". As it is now, I cannot do that; at best I could create separate device types and inventory item types for the same thing, but with no hard link between them.

I'm aware NetBox is not strictly an asset management system, but it would be a nice bonus to be able to extend the functionality with this plugin.

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