Skip to content

revamp data model for "services", and "service templates" #17196

@goteamkor

Description

NetBox version

v.4.0.8

Feature type

Data model extension

Proposed functionality

I'm going to close my existing FR #16841 to create a new FR with more detail and a bit more expanded scope. I want to flesh out the concept here and hopefully there are enough people that see value in this. There is quite a bit of work contained within this single FR, so if devs want this broken out into smaller chunks, let me know.

The overall proposal consists of a few key items.

  1. rename "service templates" model to "service groups"
  2. rename "services" to "service assignments"
  3. create NEW model called "services"
  4. allow the ability for services to be placed into one or more service groups
  5. allow the ability to assign both services and/or service groups to dcim.devices and virtualization.virtualmachine object types
  6. move "services" and the newly renamed "Service Groups" out of "IPAM -> other" and into a new root dropdown called "Services". (applications/services don't really have much to do with IPAM so it makes sense to move them into their own category)

Here are some mockups of the changes in action
image

image

EDIT: one final note, when assigning services to objects, the object should reference the service object and not instantiate a new service per object.
For example, the service would work just like a contact. If I assign a service to an object and then edit the service (for example I change the port from 22 to 21) then that service should change for every object its assigned to.

Use case

Item 1) rename "service templates" model to "service groups"
This calls for a database change for the rename of the model. Service groups will function exactly like other existing groups (ex: site groups, tenant groups, contact groups, cluster groups, etc.) Right now, in other areas of netbox, 'templates' work a very specific way. The existing 'service templates' works more like 'groups' work for other object types. this would make the naming more consistent.

Item 2) rename "services" to "service assignments"
This is another area where it would make sense to rename the existing functionality of 'services' to 'service assignments'. Currently, when you click on services it is showing you what services are currently associated with parent objects. This functionality is what 'assignments' is for other areas of netbox. "contact assignments' is an example of this concept.

Item 3) allow the ability for services to be placed into one or more service groups
let's suppose you create a service for TCP/80 (http). You could create a new service group called "Salesforce" and place the tcp/80 (http) service into that group. You might also create another service group called "Lansweeper". Lansweeper also hosts a web frontend so you could put the existing service tcp/80 (http) into the lansweeper service group as well.
You would now have the ability to create multiple services and put them into respective groups to build what is in effect an "application" that comprises multiple ports, multiple protocols.

Item 4) create NEW model called "services"
Create a new data model that is individual services. Much like what the existing 'service templates' is. A list of all individual services available in NetBox. these services can be assigned individually to an object, but can also be associated with a service group.
To easily wrap your head around this item, think of the contacts object model.
Right now, 'services' works more like 'contact assignments' does today
Right now, 'service templates' works more like 'contact groups' does today
there is no existing method to capture individual services like there is for 'contacts'

item 5) allow the ability to assign both services and/or service groups to dcim.devices and virtualization.virtualmachine object types
Currently you can only assign services to these object types. After a data model extension these object types would need to support having either a single or multiple individual services assigned to them, but extended to be able to assign a single or multiple service groups as well.

item 6) move "service", the newly created "Service Groups", and the renamed 'Service assignments' out of IPAM -> other and into a new root dropdown called "Services"
This follows the same logic as an upcoming change to move the racks, rack roles, elevations, etc. out of "Organization" and into its own category (#16988). Services don't really fit into the IPAM section. Creating the model 'service groups' and giving services some revamp love like what is mentioned in this FR allows "Services" to be a front and center killer feature of NetBox that would deserve its own category.

Database changes

rename data model "service templates" to "service groups"
rename data model "services" to "service assignments"
create new data model "services" that is strictly a list of all available individual services available to be assigned to objects or service groups.
alter dcim.device and virtualization.virtualmachine to accept new service group model (multiple groups assigned)

External dependencies

none.

Metadata

Assignees

No one assigned

    Labels

    netboxstatus: under reviewFurther discussion is needed to determine this issue's scope and/or implementationtype: featureIntroduction of new functionality to the application

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions