Refactored code to introduce different VM templates

This commit is contained in:
M.Ravi 2017-05-07 05:31:39 +05:30
commit 6d4e9d8a83
2 changed files with 61 additions and 7 deletions

View file

@ -2,13 +2,9 @@
{% block content %}
<form action="{% url 'admin:createvm' %}" method="post">
{% csrf_token %}
<select id="vm_template" name="vm_template">
<option value="select">Select a template</option>
<option value="1">disk = 10GB, vcpu=1, ram=1GB</option>
<option value="2">disk = 20GB, vcpu=2, ram=2GB</option>
</select>
<input type="submit" name="create_vm" value="Create VM" />
{% csrf_token %}
{{ form }}
<input type="submit" name="create_vm" value="Create VM" />
</form>
{% if vms %}
<section>