Skip to content

Maintain database representations of reports & scripts #14438

Closed
@jeremystretch

Description

@jeremystretch

NetBox version

v3.6.6

Feature type

Data model extension

Proposed functionality

Promote the "dummy" models in the extras that currently represent reports and scripts to "real" models corresponding to database tables. Each Report or Script instance will correlate to a Python class belonging to a ReportModule or ScriptModule, respectively. Report and Script objects will be created, updated, and deleted automatically in response to content changes in their assigned module.

Use case

The lack of a concrete database object representing individual reports and scripts limits our ability to efficiently represent relationships with other NetBox objects. Two prime examples are:

Essentially, we reduce the current need for a tuple of (module, class) to a simple ForeignKey relationship.

Database changes

Promoting the Report and Script classes to concrete models will effect the creation of two new PostgreSQL tables:

  • extras_report
  • extras_script

One new database record will be automatically created for each report and script currently installed.

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