File: markdown.tmpl

package info (click to toggle)
ez-ipam 0.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,544 kB
  • sloc: makefile: 6
file content (111 lines) | stat: -rw-r--r-- 3,253 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# EZ-IPAM

> Generated by [EZ-IPAM](https://github.com/plumber-cd/ez-ipam). Do not edit manually.

## Overview

> Legend: `Subnet Container` holds child networks, `Host Pool` holds reservable IPs, and `Reserved IP` is a concrete host reservation.

{{- if .ZoneRows }}
## Zones

| Zone | VLANs | Description |
|------|-------|-------------|
{{- range $row := .ZoneRows }}
| {{ index $row "Name" }} | {{ index $row "VLANs" }} | {{ index $row "Description" }} |
{{- end }}
{{- end }}

{{- if .VLANRows }}
## VLANs

| VLAN ID | Name | Description |
|---------|------|-------------|
{{- range $row := .VLANRows }}
| {{ index $row "ID" }} | {{ index $row "Name" }} | {{ index $row "Description" }} |
{{- end }}
{{- end }}

## Networks

| Network | Name | Allocation | VLAN | Description |
|---------|------|------------|------|-------------|
{{- range $row := .SummaryRows }}
| {{ index $row "Network" }} | {{ index $row "Name" }} | {{ index $row "Allocation" }} | {{ index $row "VLAN" }} | {{ index $row "Description" }} |
{{- end }}

{{- if .DNSRows }}
## DNS Records

| FQDN | Type | Value | Description |
|------|------|-------|-------------|
{{- range $row := .DNSRows }}
| {{ index $row "FQDN" }} | {{ index $row "Type" }} | {{ index $row "Value" }} | {{ index $row "Description" }} |
{{- end }}
{{- end }}

{{- if .SSIDRows }}
## WiFi SSIDs

| SSID | Description |
|------|-------------|
{{- range $row := .SSIDRows }}
| {{ index $row "ID" }} | {{ index $row "Description" }} |
{{- end }}
{{- end }}

{{- if .EquipmentRows }}
## Equipment

{{- range $row := .EquipmentRows }}
### {{ index $row "DisplayName" }} ({{ index $row "Model" }})

> {{ index $row "Description" }}

| Port | Name | Type | Networks | Destination |
|------|------|------|----------|-------------|
{{- $equipmentPath := index $row "EquipmentPath" }}
{{- range $port := index $.EquipmentPorts $equipmentPath }}
| {{ index $port "Number" }} | {{ index $port "Name" }} | {{ index $port "Type" }} | {{ index $port "Networks" }} | {{ index $port "Destination" }} |
{{- end }}

{{- end }}
{{- end }}

## Detailed Networks

{{- $networksDataIndex := .NetworksDataIndex }}
{{- $networksData := .NetworksData }}
{{- range $path := .NetworksOrder }}

<a id="{{ index $.NetworksAnchor $path }}"></a>
{{ index $.NetworksHeading $path }} {{ index $.NetworksTitle $path }}

| Property | Value |
|----------|-------|
{{- range $key := index $networksDataIndex $path }}
{{- if eq $key "Description" }}
{{- continue }}
{{- end }}
| **{{ $key }}** | `{{ index (index $networksData $path) $key }}` |
{{- end }}

{{- $description := index $.NetworksDescription $path }}
{{- if ne $description "" }}

> {{ $description }}
{{- end }}

{{- if index $.NetworksHasReservedIPs $path }}

{{ index $.NetworksHeading $path }} Reserved IPs

| IP | Name | MAC | Description |
|----|------|-----|-------------|
{{- range $ip := index $.NetworksReservedIPs $path }}
| `{{ index $ip "Address" }}` | {{ if ne (index $ip "DisplayName") "" }}`{{ index $ip "DisplayName" }}`{{ else }}-{{ end }} | {{ if ne (index $ip "MACAddress") "" }}`{{ index $ip "MACAddress" }}`{{ else }}-{{ end }} | {{ if ne (index $ip "Description") "" }}{{ index $ip "Description" }}{{ else }}-{{ end }} |
{{- end }}
{{- end }}

---
{{- end }}