[pve-devel] [PATCH 3/4] pve_network_templates.tt: add macro for ethernet interfaces

Dietmar Maurer dietmar at proxmox.com
Tue Aug 14 13:56:02 CEST 2018


Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
 images/pve_network_templates.tt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/images/pve_network_templates.tt b/images/pve_network_templates.tt
index bf2ef89..9f061f6 100644
--- a/images/pve_network_templates.tt
+++ b/images/pve_network_templates.tt
@@ -54,3 +54,19 @@
 
     ]
 [% END %]
+
+[% MACRO interface BLOCK %]
+[% id %] [
+  shape=plaintext
+  label=<
+	  <table border='0' cellspacing='0' cellpadding='0' cellborder='0'>
+	    <tr><td>[% PROCESS switch_ports draw_ports=ifname %]</td></tr>
+	    [% IF cidr %]
+	    <tr><td><table color='green' BGCOLOR="lightgreen" border='2' cellspacing='2' cellpadding='0' cellborder='0' style='rounded'>
+              <tr><td width='10'></td><td><font face='monospace' point-size='12'>[% cidr %]</font></td><td width='10'></td></tr>
+	    </table></td></tr>
+	    [% END %]
+	  </table>>
+
+    ]
+[% END %]
-- 
2.11.0




More information about the pve-devel mailing list