Datasheet Attribute for Device Types #7854

Closed
opened 2025-12-29 20:29:01 +01:00 by adam · 10 comments
Owner

Originally created by @phillf on GitHub (Apr 2, 2023).

NetBox version

v3.4.7

Feature type

New functionality

Proposed functionality

  • Add attribute to device types and module types for datasheet URLs
  • Append a link with the display text of "View Datasheet" to the Description field of the Chassis/Module Type table

Use case

Creating a consistent expectation of where the reference to the datasheet is found and how it's referenced.

Database changes

Create new field named DatasheetUrl for Device and Module Types.

External dependencies

No response

Originally created by @phillf on GitHub (Apr 2, 2023). ### NetBox version v3.4.7 ### Feature type New functionality ### Proposed functionality - Add attribute to device types and module types for datasheet URLs - Append a link with the display text of "View Datasheet" to the Description field of the Chassis/Module Type table ### Use case Creating a consistent expectation of where the reference to the datasheet is found and how it's referenced. ### Database changes Create new field named DatasheetUrl for Device and Module Types. ### External dependencies _No response_
adam added the type: featurepending closurestatus: under review labels 2025-12-29 20:29:01 +01:00
adam closed this issue 2025-12-29 20:29:01 +01:00
Author
Owner

@abhi1693 commented on GitHub (Apr 2, 2023):

This may also be useful in module types

@abhi1693 commented on GitHub (Apr 2, 2023): This may also be useful in module types
Author
Owner

@phillf commented on GitHub (Apr 2, 2023):

This may also be useful in module types

Agreed. Feature Request amended.

@phillf commented on GitHub (Apr 2, 2023): > This may also be useful in module types Agreed. Feature Request amended.
Author
Owner

@jeremystretch commented on GitHub (Apr 3, 2023):

I find myself on the fence here. Most people just link to relevant documentation in the object's comments. This enables the addition of context pertaining to each link as well.

Creating a consistent expectation of where the reference to the datasheet is found and how it's referenced.

  • Is there a need to consume these links programmatically?
  • What do you do if there are multiple links to relevant documentation?
  • Is a custom field not sufficient for this purpose?
@jeremystretch commented on GitHub (Apr 3, 2023): I find myself on the fence here. Most people just link to relevant documentation in the object's comments. This enables the addition of context pertaining to each link as well. > Creating a consistent expectation of where the reference to the datasheet is found and how it's referenced. - Is there a need to consume these links programmatically? - What do you do if there are multiple links to relevant documentation? - Is a custom field not sufficient for this purpose?
Author
Owner

@phillf commented on GitHub (Apr 4, 2023):

  • Is there a need to consume these links programmatically?

I could see this being useful where other tools are concerned when it comes to pulling data out of Netbox via API. Having it it as "free text" in the comments doesn't really make it easy to pull this data whereas having it as discrete data would easily allow this.

  • What do you do if there are multiple links to relevant documentation?

Maybe adding an attribute of the link being something like "Publication Type" would be useful here. (ie. Service Manual, Parts Catalogue, Datasheet, etc)

  • Is a custom field not sufficient for this purpose?

That would be but the point of the feature request was to make this more consistent across instances. Relying on the custom field means that it could be named slightly differently from instance to instance.

This request was actually inspired by reading through some of the device-type template YML files and wondering why the datasheet links were free text comments rather than discreet data.

@phillf commented on GitHub (Apr 4, 2023): > * Is there a need to consume these links programmatically? I could see this being useful where other tools are concerned when it comes to pulling data out of Netbox via API. Having it it as "free text" in the comments doesn't really make it easy to pull this data whereas having it as discrete data would easily allow this. > * What do you do if there are multiple links to relevant documentation? Maybe adding an attribute of the link being something like "Publication Type" would be useful here. (ie. Service Manual, Parts Catalogue, Datasheet, etc) > * Is a custom field not sufficient for this purpose? That would be but the point of the feature request was to make this more consistent across instances. Relying on the custom field means that it could be named slightly differently from instance to instance. This request was actually inspired by reading through some of the device-type template YML files and wondering why the datasheet links were free text comments rather than discreet data.
Author
Owner

@DanSheps commented on GitHub (Apr 4, 2023):

From a technical standpoint, I ManyToOne (FK) or a M2M relationship would be best for this with a new model "ExternalLinks". Similar to how our contacts are done. That said, this could also be perfectly suited for a plugin.

A rough model:

LinkType:
  int id
  str name

Link:
  int id
  LinkType type
  str name
  str url

LinkAssignment:
  GFK object
  Link link
@DanSheps commented on GitHub (Apr 4, 2023): From a technical standpoint, I ManyToOne (FK) or a M2M relationship would be best for this with a new model "ExternalLinks". Similar to how our contacts are done. That said, this could also be perfectly suited for a plugin. A rough model: ``` LinkType: int id str name Link: int id LinkType type str name str url LinkAssignment: GFK object Link link ```
Author
Owner

@phillf commented on GitHub (Apr 9, 2023):

@jeremystretch, Given the answers I provided and @DanSheps sggested model I am curious where you stand now.

@phillf commented on GitHub (Apr 9, 2023): @jeremystretch, Given the answers I provided and @DanSheps sggested model I am curious where you stand now.
Author
Owner

@jeremystretch commented on GitHub (Apr 10, 2023):

I don't see any reason this use case isn't served by a custom field. And I definitely don't think there's any need for a separate model tracking discrete links.

@jeremystretch commented on GitHub (Apr 10, 2023): I don't see any reason this use case isn't served by a custom field. And I definitely don't think there's any need for a separate model tracking discrete links.
Author
Owner

@DanSheps commented on GitHub (Jun 19, 2023):

I have to agree with @jeremystretch here. Custom fields, in conjunction with custom links perhaps, are the best to provide the right set of options.

However, if there is a need for more robust tracking, I would encourage you to create a plugin for it and publish it so that is can be consumed by others.

@DanSheps commented on GitHub (Jun 19, 2023): I have to agree with @jeremystretch here. Custom fields, in conjunction with custom links perhaps, are the best to provide the right set of options. However, if there is a need for more robust tracking, I would encourage you to create a plugin for it and publish it so that is can be consumed by others.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 18, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Sep 18, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 19, 2023):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Oct 19, 2023): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7854