Skip to content

Allow a choice in how the type of virtualization, qemu or lxc, is stored in Netbox #241

@sol1-matt

Description

@sol1-matt

Problem

Currently the type of virtualization proxmox is using, Virtual Machine (QEMU) or Container (LXC), is stored in Netbox using the virtualization/virtual-machine.role.

This is prevents end users setting a role for what the machine does, eg: Firewall.

Solution

Make how the plugin stores the virtualization type a option where the options are

  • Role
  • Tag
  • Custom Field

The option UI would a be single select drop down.

Role

This is the existing behavior, it remains unchanged

Tag

2 Netbox tag objects (extras/tags) are created, Virtual Machine (QEMU) or Container (LXC), the tag slugs should be something along the lines of virtualization_qemu and virtualization_lxc.

Custom Field

A Netbox custom field object (extras/custom-fields) and Netbox custom field choices (extras/custom-field-choices) are added.

The Netbox custom field choices, named something like virtualization_type_choices or promox_virtualization_type_choices, are set to Virtual Machine (QEMU) and Container (LXC).

Note the choices can have a value and label, it would be good to set machine friendly values virtualization_qemu and virtualization_lxc

The Netbox custom field should have the following properties
name: something like virtualization_type or promox_virtualization_type
object_types: virtualization.virtualmachine
group_name: Promox Plugin
type: select (this is the data value, the UI will show Selection)
choice_set: the name used above, not sure what the API will require but both ID and name are likely to work

Metadata

Metadata

Labels

acceptedThis issue has been accepted for implementationfeatureIntroduction of new functionality to the application

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions