[pve-devel] [PATCH v12 pve-manager 2/4] sdn: move mac option from vnet to evpn zone plugin

Alexandre Derumier aderumier at odiso.com
Wed Apr 21 23:53:37 CEST 2021


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 www/manager6/sdn/VnetEdit.js       | 16 +---------------
 www/manager6/sdn/zones/EvpnEdit.js | 12 ++++++++++++
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/www/manager6/sdn/VnetEdit.js b/www/manager6/sdn/VnetEdit.js
index 1ed20994..191b73c9 100644
--- a/www/manager6/sdn/VnetEdit.js
+++ b/www/manager6/sdn/VnetEdit.js
@@ -13,10 +13,6 @@ Ext.define('PVE.sdn.VnetInputPanel', {
 	    delete values.vlanaware;
 	}
 
-	if (!values.mac) {
-	    delete values.mac;
-	}
-
 	return values;
     },
 
@@ -60,17 +56,7 @@ Ext.define('PVE.sdn.VnetInputPanel', {
 	    checked: false,
 	    fieldLabel: gettext('VLAN Aware'),
 	}
-    ],
-    advancedItems: [
-	{
-	    xtype: 'textfield',
-	    name: 'mac',
-	    fieldLabel: gettext('MAC address'),
-	    vtype: 'MacAddress',
-	    allowBlank: true,
-	    emptyText: 'auto'
-	},
-    ],
+    ]
 });
 
 Ext.define('PVE.sdn.VnetEdit', {
diff --git a/www/manager6/sdn/zones/EvpnEdit.js b/www/manager6/sdn/zones/EvpnEdit.js
index 65777190..834843ec 100644
--- a/www/manager6/sdn/zones/EvpnEdit.js
+++ b/www/manager6/sdn/zones/EvpnEdit.js
@@ -12,6 +12,10 @@ Ext.define('PVE.sdn.zones.EvpnInputPanel', {
 	    delete values.zone;
 	}
 
+        if (!values.mac) {
+            delete values.mac;
+        }
+
 	return values;
     },
 
@@ -35,6 +39,14 @@ Ext.define('PVE.sdn.zones.EvpnInputPanel', {
 		fieldLabel: 'VRF-VXLAN Tag',
 		allowBlank: false,
 	    },
+	    {
+		xtype: 'textfield',
+		name: 'mac',
+		fieldLabel: gettext('Vnet MAC address'),
+		vtype: 'MacAddress',
+		allowBlank: true,
+		emptyText: 'auto'
+	    },
 	    {
 		xtype: 'pveNodeSelector',
 		name: 'exitnodes',
-- 
2.20.1




More information about the pve-devel mailing list