[pve-devel] [PATCH] NetworkEdit : add support for vlan bridge|interface.

Alexandre Derumier aderumier at odiso.com
Tue Sep 22 04:52:11 CEST 2015


Edit only for now, create will come soon in another patch

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/API2/Network.pm             | 2 +-
 www/manager/Utils.js            | 2 ++
 www/manager/node/NetworkEdit.js | 4 ++++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 02172f6..11f8e4f 100644
--- a/PVE/API2/Network.pm
+++ b/PVE/API2/Network.pm
@@ -31,7 +31,7 @@ my $bond_mode_enum = [
     'lacp-balance-tcp', # OVS
     ];
 
-my $network_type_enum = ['bridge', 'bond', 'eth', 'alias', 
+my $network_type_enum = ['bridge', 'bond', 'eth', 'alias', 'interface_vlan', 'bridge_vlan',
 			 'OVSBridge', 'OVSBond', 'OVSPort', 'OVSIntPort'];
 
 my $confdesc = {
diff --git a/www/manager/Utils.js b/www/manager/Utils.js
index 0e2e8a2..61e70e6 100644
--- a/www/manager/Utils.js
+++ b/www/manager/Utils.js
@@ -127,6 +127,8 @@ Ext.define('PVE.Utils', { statics: {
 	eth: gettext("Network Device"),
 	bridge: 'Linux Bridge',
 	bond: 'Linux Bond',
+	interface_vlan: 'Linux Vlan interface',
+	bridge_vlan: 'Linux Bridge Vlan interface',
 	OVSBridge: 'OVS Bridge',
 	OVSBond: 'OVS Bond',
 	OVSPort: 'OVS Port',
diff --git a/www/manager/node/NetworkEdit.js b/www/manager/node/NetworkEdit.js
index 23ef08b..2a5ea0b 100644
--- a/www/manager/node/NetworkEdit.js
+++ b/www/manager/node/NetworkEdit.js
@@ -24,6 +24,10 @@ Ext.define('PVE.node.NetworkEdit', {
 	    iface_vtype = 'BondName';
 	} else if (me.iftype === 'eth' && !me.create) {
 	    iface_vtype = 'InterfaceName';
+	} else if (me.iftype === 'interface_vlan' && !me.create) {
+	    iface_vtype = 'InterfaceName';
+	} else if (me.iftype === 'bridge_vlan' && !me.create) {
+	    iface_vtype = 'InterfaceName';
 	} else if (me.iftype === 'OVSBridge') {
 	    iface_vtype = 'BridgeName';
 	} else if (me.iftype === 'OVSBond') {
-- 
2.1.4




More information about the pve-devel mailing list