[pve-devel] [PATCH] NetworkEdit : add support for vlan interfaces.

Alexandre Derumier aderumier at odiso.com
Tue Sep 22 08:26:57 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            | 1 +
 www/manager/node/NetworkEdit.js | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm
index 02172f6..186434a 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', 'vlan',
 			 'OVSBridge', 'OVSBond', 'OVSPort', 'OVSIntPort'];
 
 my $confdesc = {
diff --git a/www/manager/Utils.js b/www/manager/Utils.js
index 0e2e8a2..eda08d8 100644
--- a/www/manager/Utils.js
+++ b/www/manager/Utils.js
@@ -127,6 +127,7 @@ Ext.define('PVE.Utils', { statics: {
 	eth: gettext("Network Device"),
 	bridge: 'Linux Bridge',
 	bond: 'Linux Bond',
+	vlan: 'Linux 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..43f69e3 100644
--- a/www/manager/node/NetworkEdit.js
+++ b/www/manager/node/NetworkEdit.js
@@ -24,6 +24,8 @@ Ext.define('PVE.node.NetworkEdit', {
 	    iface_vtype = 'BondName';
 	} else if (me.iftype === 'eth' && !me.create) {
 	    iface_vtype = 'InterfaceName';
+	} else if (me.iftype === '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