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

Enable free-form, searchable, labeling/tagging of devices #132

Closed
ryanmerolle opened this issue Jun 29, 2016 · 12 comments
Closed

Enable free-form, searchable, labeling/tagging of devices #132

ryanmerolle opened this issue Jun 29, 2016 · 12 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation
Milestone

Comments

@ryanmerolle
Copy link
Contributor

Ability to apply comma separated free form labels or tags to any device that is searchable across all objects.

@troxil
Copy link

troxil commented Jun 29, 2016

Same as #129 ?

@ryanmerolle
Copy link
Contributor Author

I see that argument, so I'll talk this out some more.

The feature I am talking about is not just custom fields, but a way to apply tags that allow for searching through all assets not just assets of the same type. With # 129, if I applied a custom field in the circuit section I imagine it would just be searchable within the circuit section.

Device42 actually treat these two features different functions. I have seen this also implemented in one other opensource iPam tool before.

@mdlayher mdlayher changed the title [Feature] Labels or Tags Enable free-form, searchable, labeling/tagging of devices Jun 30, 2016
@aabouzaid
Copy link

I believe that this is absolutely one of most important features!

@aabouzaid
Copy link

aabouzaid commented Jul 29, 2016

I'd like to create a Python module that uses netbox as dynamic inventory for Ansible.
But I think it will be more useful when netbox has tagging or grouping feature (with multi roles of course) :-)

@seismiccollision
Copy link

I was hoping I'd see the ability to use the new custom fields feature to select multiple options so I could tag individual devices with multiple 'functions'/'purposes'/'categories' etc. but it sounds like what I need is the above. Am I in the right place to +1 this feature?

@Zorlin
Copy link

Zorlin commented Feb 21, 2017

This is absolutely essential for us. Right now we're using NetBox because nothing else on the market is quite as good, but free-form tagging would allow us to become a lot more efficient and well-documented without increasing complexity. Additionally, it is crucial for NetBox to become a proper Single Source of Truth in our org.

@puck
Copy link

puck commented Mar 2, 2017

A bunch of the comments in this thread are implying that people are using, or wanting to use netbox as an asset management system. Probably not the best idea. ;)

Also, this could be achievable by adding a new custom field type: multi-select

@alexjhart
Copy link
Contributor

I would like this to apply to more than just devices. For example, I'd like to be able to search a tag that brings up all IP addresses that have the same purpose. I can sort of do this now using the description field, but I like having the multi-select field type (https://select2.github.io/examples.html#multiple). I suppose another alternative would be allowing auto-complete hashtags in existing fields for tagging?

@candlerb
Copy link
Contributor

Having an arbitrary set of tags, at least on Device and VM, would be hugely useful for me.

I'd use this for categorising assets under management: for example, recording which service(s) are impacted by this device/VM, and which callout team(s) are responsible for it. Custom Fields are creaking at the seams here (#1625), especially when you consider that Device and VirtualMachine are separate tables, so Custom Fields have to be duplicated between both, and the inability to multi-select in a list.

I envisage it as an extension of "Role", so that at the simplest level, one Device/VM can be linked to multiple Roles instead of just one.

These more generic tags could also subsume Prefix/VLAN Role, IP address Roles, Rack Roles. Already, device/VM roles have a flag to say whether each one is suitable for VM use or not; implicitly they are all usable for Device. This could be extended to say whether a role is suitable for Device, Prefix, VLAN, IP Address, Rack (and indeed any other object type). Then you just have to allow many tags to be applied to the same object.

Tags could probably also subsume Platform, and even Rack Groups, Tenant Groups, Cluster Groups etc.

I am not sure that "comma separated" is the best way to do this, but that's just an implementation detail. Conceptually it's a many-to-many database relation, and could be implemented as such. If so, it could use GenericForeignKey such that tags can be applied to any objects - including Racks, Sites, Circuits etc.

If it's a comma-separated field then every taggable object needs a tags field. Better include a comma at the start and the end too:

,14,23,99,

so you can search for tags like '%,14,%' and it doesn't matter if it's at the start or end of the line. Use numeric tag IDs, so tags can be renamed.

It would be useful for the tags themselves to be grouped. The full tag name would then be <group>:<tag>

Examples:

  • tag group service
    • tag mail
    • tag web
    • tag database
    • ...
  • tag group platform
    • tag Ubuntu 14.04
    • tag Ubuntu 16.04
    • ...

(It makes sense to allow a machine to be tagged with multiple service tags. Admittedly it makes less sense to tag it with multiple platform tags)

@jeremystretch jeremystretch added this to the v2.4 milestone Jan 26, 2018
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Jan 26, 2018
@jeremystretch
Copy link
Member

Looks like an ArrayField is our best bet here. The django-array-tags project has a great reference implementation.

@jeremystretch
Copy link
Member

Making good progress on this in the 132-tags branch.

@jeremystretch jeremystretch self-assigned this Mar 30, 2018
@sevagh
Copy link

sevagh commented Apr 25, 2018

If you need any volunteers/help to test your branch, I'm available - I'd like to have this feature.

In the 132-tags branch/current implementation, is there a notion of ACLs for adding/removing tags?

jeremystretch added a commit that referenced this issue May 22, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation
Projects
None yet
Development

No branches or pull requests