feat(virtualization): Add Virtual Machine Type model

Introduce `VirtualMachineType` to classify virtual machines and apply
default platform, vCPU, and memory values when creating a VM.

This adds the new model and its relationship to `VirtualMachine`, and
wires it through forms, filtersets, tables, views, the REST API,
GraphQL, navigation, search, documentation, and tests.

Explicit values set on a virtual machine continue to take precedence,
and changes to a type do not retroactively update existing VMs.
This commit is contained in:
Martin Hauser
2026-03-30 20:06:50 +02:00
committed by Jeremy Stretch
parent c7504628bd
commit 2389feea6b
31 changed files with 1574 additions and 122 deletions

View File

@@ -0,0 +1,10 @@
{% extends 'generic/object.html' %}
{% load i18n %}
{% block extra_controls %}
{% if perms.virtualization.add_virtualmachine %}
<a href="{% url 'virtualization:virtualmachine_add' %}?virtual_machine_type={{ object.pk }}" class="btn btn-primary">
<span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Virtual Machine" %}
</a>
{% endif %}
{% endblock extra_controls %}