Implemented tenancy for VRFs and VLANs

This commit is contained in:
Jeremy Stretch
2016-07-27 11:29:20 -04:00
parent 767aa2aedf
commit 01a0b00f32
16 changed files with 144 additions and 21 deletions

View File

@@ -70,10 +70,10 @@
<td>{{ vlan.name }}</td>
</tr>
<tr>
<td>Description</td>
<td>Tenant</td>
<td>
{% if vlan.description %}
{{ vlan.description }}
{% if vlan.tenant %}
<a href="{{ vlan.tenant.get_absolute_url }}">{{ vlan.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
@@ -89,6 +89,16 @@
<td>Role</td>
<td>{{ vlan.role }}</td>
</tr>
<tr>
<td>Description</td>
<td>
{% if vlan.description %}
{{ vlan.description }}
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Created</td>
<td>{{ vlan.created }}</td>

View File

@@ -9,7 +9,8 @@
<td><a href="{% url 'ipam:vlan' pk=vlan.pk %}">{{ vlan.vid }}</a></td>
<td>{{ vlan.name }}</td>
<td>{{ vlan.site }}</td>
<td>{{ vlan.status }}</td>
<td>{{ vlan.tenant }}</td>
<td>{{ vlan.get_status_display }}</td>
<td>{{ vlan.role }}</td>
<td>{{ vlan.description }}</td>
</tr>

View File

@@ -48,6 +48,11 @@
<td>Configured VLAN name</td>
<td>Cameras</td>
</tr>
<tr>
<td>Tenant</td>
<td>Name of tenant (optional)</td>
<td>Internal</td>
</tr>
<tr>
<td>Status</td>
<td>Current status</td>
@@ -66,7 +71,7 @@
</tbody>
</table>
<h4>Example</h4>
<pre>LAS2,Backend Network,1400,Cameras,Active,Security,Security team only</pre>
<pre>LAS2,Backend Network,1400,Cameras,Internal,Active,Security,Security team only</pre>
</div>
</div>
{% endblock %}

View File

@@ -30,6 +30,16 @@
<td>Route Distinguisher</td>
<td>{{ vrf.rd }}</td>
</tr>
<tr>
<td>Tenant</td>
<td>
{% if vrf.tenant %}
<a href="{{ vrf.tenant.get_absolute_url }}">{{ vrf.tenant }}</a>
{% else %}
<span class="text-muted">None</span>
{% endif %}
</td>
</tr>
<tr>
<td>Enforce Uniqueness</td>
<td>

View File

@@ -8,6 +8,7 @@
<tr>
<td><a href="{% url 'ipam:vrf' pk=vrf.pk %}">{{ vrf.name }}</a></td>
<td>{{ vrf.rd }}</td>
<td>{{ vrf.tenant }}</td>
<td>{{ vrf.description }}</td>
</tr>
{% endfor %}

View File

@@ -38,6 +38,11 @@
<td>Route distinguisher</td>
<td>65000:123456</td>
</tr>
<tr>
<td>Tenant</td>
<td>Name of tenant (optional)</td>
<td>ABC01</td>
</tr>
<tr>
<td>Enforce uniqueness</td>
<td>Prevent duplicate prefixes/IP addresses</td>
@@ -51,7 +56,7 @@
</tbody>
</table>
<h4>Example</h4>
<pre>Customer_ABC,65000:123456,True,Native VRF for customer ABC</pre>
<pre>Customer_ABC,65000:123456,ABC01,True,Native VRF for customer ABC</pre>
</div>
</div>
{% endblock %}

View File

@@ -41,6 +41,7 @@
</form>
</div>
</div>
{% include 'inc/filter_panel.html' %}
</div>
</div>
{% endblock %}

View File

@@ -9,6 +9,7 @@
{% render_field form.name %}
{% render_field form.slug %}
{% render_field form.group %}
{% render_field form.description %}
</div>
</div>
<div class="panel panel-default">