[Kimchi-devel] [PATCH v3] [Kimchi 8/8] VEPA network support: UI changes

dhbarboza82 at gmail.com dhbarboza82 at gmail.com
Tue Feb 16 17:58:14 UTC 2016


From: Daniel Henrique Barboza <dhbarboza82 at gmail.com>

Pinpoint UI changes to add a new network type named 'vepa'
with the same capabilites as the macvtap network.

At this moment, the UI does not support multiple physical
devices to be declared in the VEPA network. This will require
additional UI changes in the future (no backend changes
needed).

Signed-off-by: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
---
 ui/js/src/kimchi.network.js          | 1 +
 ui/js/src/kimchi.network_add_main.js | 4 ++--
 ui/pages/network-add.html.tmpl       | 5 +++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index 1e79f8d..02a37cd 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -18,6 +18,7 @@
 
 kimchi.NETWORK_TYPE_MACVTAP = "macvtap";
 kimchi.NETWORK_TYPE_BRIDGED = "bridge";
+kimchi.NETWORK_TYPE_VEPA = "vepa";
 
 
 kimchi.initNetwork = function() {
diff --git a/ui/js/src/kimchi.network_add_main.js b/ui/js/src/kimchi.network_add_main.js
index 6beb115..8e2665b 100644
--- a/ui/js/src/kimchi.network_add_main.js
+++ b/ui/js/src/kimchi.network_add_main.js
@@ -82,7 +82,7 @@ kimchi.getNetworkDialogValues = function() {
         name : $("#networkName").val(),
         type : $("#networkType").val()
     };
-    if (network.type === kimchi.NETWORK_TYPE_MACVTAP) {
+    if (network.type === kimchi.NETWORK_TYPE_MACVTAP ||  network.type === kimchi.NETWORK_TYPE_VEPA) {
         network.interface = $("#networkDestinationID").val();
     }
     if (network.type === kimchi.NETWORK_TYPE_BRIDGED) {
@@ -106,7 +106,7 @@ kimchi.setupNetworkFormEvent = function() {
 
     $('#networkType').on('change', function() {
         var selectedType = $("#networkType").val();
-        if(selectedType === kimchi.NETWORK_TYPE_MACVTAP) {
+        if(selectedType === kimchi.NETWORK_TYPE_MACVTAP || selectedType === kimchi.NETWORK_TYPE_VEPA) {
             kimchi.loadInterfaces(new Array("nic", "bonding"));
         } else {
             kimchi.loadInterfaces();
diff --git a/ui/pages/network-add.html.tmpl b/ui/pages/network-add.html.tmpl
index 6bd2acf..3f50ad2 100644
--- a/ui/pages/network-add.html.tmpl
+++ b/ui/pages/network-add.html.tmpl
@@ -1,7 +1,7 @@
 #*
  * Project Kimchi
  *
- * Copyright IBM, Corp. 2014-2015
+ * Copyright IBM Corp, 2014-2016
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,6 +41,7 @@
                 <option value="isolated">$_("Isolated: no external network connection")</option>
                 <option value="nat">$_("NAT: outbound physical network connection only")</option>
                 <option value="macvtap">$_("Macvtap: Virtual machines are connected to physical network directly")</option>
+                <option value="vepa">$_("VEPA: special mode where virtual machines are connected to a VEPA-enabled switch")</option>
                 <option value="bridge">$_("Bridged: Virtual machines are connected through a network bridge")</option>
             </select>
         </div>
@@ -72,4 +73,4 @@
 kimchi.network_add_main();
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
-- 
2.5.0




More information about the Kimchi-devel mailing list