mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
reorganize host interfaces. remove it from instance methods
This commit is contained in:
parent
59af676f68
commit
2f1b11b3ca
6 changed files with 12 additions and 16 deletions
|
@ -204,10 +204,6 @@ class Instance(models.Model):
|
|||
def formats(self):
|
||||
return self.proxy.get_image_formats()
|
||||
|
||||
@cached_property
|
||||
def interfaces(self):
|
||||
return self.proxy.get_ifaces()
|
||||
|
||||
|
||||
class PermissionSet(models.Model):
|
||||
"""
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
{% for c_net in networks_host %}
|
||||
<option value="net:{{ c_net }}">Network {{ c_net }}</option>
|
||||
{% endfor %}
|
||||
{% for c_iface in instance.interfaces %}
|
||||
{% for c_iface in interfaces_host %}
|
||||
<option value="iface:{{ c_iface }}">Interface {{ c_iface }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
|
@ -401,7 +401,7 @@
|
|||
{% for c_net in networks_host %}
|
||||
<option value="net:{{ c_net }}" {% if c_net == network.nic %} selected {% endif %}>{% trans 'Network' %} {{ c_net }}</option>
|
||||
{% endfor %}
|
||||
{% for c_iface in instance.interfaces %}
|
||||
{% for c_iface in interfaces_host %}
|
||||
<option value="iface:{{ c_iface }}" {% if c_iface == network.nic %} selected {% endif %}>{% trans 'Interface' %} {{ c_iface }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue