Skip to content
Discussion options

You must be logged in to vote

At the moment this does not appear to be configurable through a NetBox setting.

VirtualMachine.name is currently defined directly in the Django model with:

name = models.CharField(
    verbose_name=_('name'),
    max_length=64,
    db_collation="natural_sort"
)

so changing only the PostgreSQL column would not be a complete/supported solution — the application model and validation would still expect a maximum of 64 characters.

If preserving the exact external VM name is required today, I would avoid maintaining a local patch to the NetBox model.

A safer approach would be:

  • keep a shorter canonical value in the normal name field;
  • create a custom field such as source_name or original_name co…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@cnravin
Comment options

Answer selected by cnravin
Comment options

You must be logged in to vote
1 reply
@cnravin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants