From b4fd433ea58d670721ac1fa937b5daf652797280 Mon Sep 17 00:00:00 2001 From: Andrea Dainese Date: Wed, 26 Aug 2015 14:58:37 +0200 Subject: [PATCH] 20150826 --- VERSION | 2 +- html/includes/__node.php | 20 ++++++++++++++++++++ html/themes/default/js/new-functions.js | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 4083b86f..f72b75f4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.0-68 +0.9.0-70 diff --git a/html/includes/__node.php b/html/includes/__node.php index ccab258d..862d25e4 100644 --- a/html/includes/__node.php +++ b/html/includes/__node.php @@ -1306,6 +1306,26 @@ public function setEthernets() { } } break; + case 'acs': + for ($i = 0; $i < $this -> ethernet; $i++) { + if (isset($old_ethernets[$i])) { + // Previous interface found, copy from old one + $this -> ethernets[$i] = $old_ethernets[$i]; + } else { + $n = 'Gi0/'.$i; // Interface name + try { + $this -> ethernets[$i] = new Interfc(Array('name' => $n, 'type' => 'ethernet'), $i); + } catch (Exception $e) { + error_log('ERROR: '.$GLOBALS['messages'][40020]); + error_log((string) $e); + return 40020; + } + } + // Setting CMD flags (virtual device and map to TAP device) + $this -> flags_eth .= ' -device %NICDRIVER%,netdev=net'.$i.',mac=50:'.sprintf('%02x', $this -> tenant).':'.sprintf('%02x', $this -> id / 512).':'.sprintf('%02x', $this -> id % 512).':00:'.sprintf('%02x', $i); + $this -> flags_eth .= ' -netdev tap,id=net'.$i.',ifname=vunl'.$this -> tenant.'_'.$this -> id.'_'.$i.',script=no'; + } + break; case 'asa': for ($i = 0; $i < $this -> ethernet; $i++) { if (isset($old_ethernets[$i])) { diff --git a/html/themes/default/js/new-functions.js b/html/themes/default/js/new-functions.js index be839921..511497b7 100644 --- a/html/themes/default/js/new-functions.js +++ b/html/themes/default/js/new-functions.js @@ -81,7 +81,7 @@ function printPageLabList(folder) { success: function(data) { if (data['status'] == 'success') { logger(1, 'DEBUG: folder "' + folder + '" found.'); - html += '
Folders in ' + folder + '
Labs