mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 03:56:53 -06:00
Enabled export templates for virtual chassis
This commit is contained in:
parent
85efdf8e00
commit
67dbe02deb
@ -2267,6 +2267,7 @@ class VirtualChassis(ChangeLoggedModel):
|
||||
tags = TaggableManager()
|
||||
|
||||
serializer = 'dcim.api.serializers.VirtualChassisSerializer'
|
||||
csv_headers = ['master', 'domain']
|
||||
|
||||
class Meta:
|
||||
ordering = ['master']
|
||||
@ -2286,3 +2287,9 @@ class VirtualChassis(ChangeLoggedModel):
|
||||
raise ValidationError({
|
||||
'master': "The selected master is not assigned to this virtual chassis."
|
||||
})
|
||||
|
||||
def to_csv(self):
|
||||
return (
|
||||
self.master,
|
||||
self.domain,
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ GRAPH_TYPE_CHOICES = (
|
||||
EXPORTTEMPLATE_MODELS = [
|
||||
'provider', 'circuit', # Circuits
|
||||
'site', 'region', 'rack', 'rackgroup', 'manufacturer', 'devicetype', 'device', # DCIM
|
||||
'consoleport', 'powerport', 'interfaceconnection', # DCIM
|
||||
'consoleport', 'powerport', 'interfaceconnection', 'virtualchassis', # DCIM
|
||||
'aggregate', 'prefix', 'ipaddress', 'vlan', 'vrf', # IPAM
|
||||
'tenant', # Tenancy
|
||||
'cluster', 'virtualmachine', # Virtualization
|
||||
|
@ -1,7 +1,11 @@
|
||||
{% extends '_base.html' %}
|
||||
{% load buttons %}
|
||||
{% load helpers %}
|
||||
|
||||
{% block content %}
|
||||
<div class="pull-right">
|
||||
{% export_button content_type %}
|
||||
</div>
|
||||
<h1>{% block title %}Virtual Chassis{% endblock %}</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
Loading…
Reference in New Issue
Block a user