[Kimchi-devel] [PATCH V1] [Kimchi] On s390x, hide network of type passthrough and vepa as not supported.
archus at linux.vnet.ibm.com
archus at linux.vnet.ibm.com
Tue Sep 27 10:35:13 UTC 2016
From: Archana Singh <archus at linux.vnet.ibm.com>
1) Added global var for s390x arch string.
2) Remove passthrough and vepa in Add network in case of s390x.
3) Do not show passthrough and vepa network devices in network listing.
Signed-off-by: Archana Singh <archus at linux.vnet.ibm.com>
---
ui/js/src/kimchi.main.js | 2 ++
ui/js/src/kimchi.network.js | 3 +++
ui/js/src/kimchi.network_add_main.js | 5 +++++
3 files changed, 10 insertions(+)
diff --git a/ui/js/src/kimchi.main.js b/ui/js/src/kimchi.main.js
index f3078ec..6c4e3c7 100644
--- a/ui/js/src/kimchi.main.js
+++ b/ui/js/src/kimchi.main.js
@@ -41,3 +41,5 @@ kimchi.getHostDetails(function(result) {
$(function(){
$('body').removeClass('wok-list wok-gallery');
});
+
+kimchi.s390xArch = "s390x"
diff --git a/ui/js/src/kimchi.network.js b/ui/js/src/kimchi.network.js
index 7ce5b28..3986b2e 100644
--- a/ui/js/src/kimchi.network.js
+++ b/ui/js/src/kimchi.network.js
@@ -51,6 +51,9 @@ kimchi.initNetworkListView = function() {
network.interface.join();
network.addrSpace = data[i].subnet ? data[i].subnet : null;
network.persistent = data[i].persistent;
+ if(kimchi.hostarch == kimchi.s390xArch && $.inArray(network.type, [kimchi.NETWORK_TYPE_PASSTHROUGH, kimchi.NETWORK_TYPE_VEPA]) != -1){
+ continue;
+ }
kimchi.addNetworkItem(network);
}
$('#networkGrid').dataGrid({enableSorting: false});
diff --git a/ui/js/src/kimchi.network_add_main.js b/ui/js/src/kimchi.network_add_main.js
index e1fdf13..8c17753 100644
--- a/ui/js/src/kimchi.network_add_main.js
+++ b/ui/js/src/kimchi.network_add_main.js
@@ -109,6 +109,11 @@ kimchi.setupNetworkFormEvent = function() {
wok.message.warn(i18n['KCHNET6001W'],'#alert-modal-container');
}
$('#bridgedContent').hide();
+ // remove network type passthrough and vepa on s390x only as its not supported.
+ if(kimchi.hostarch == kimchi.s390xArch){
+ $("#networkType option[value='passthrough']").remove();
+ $("#networkType option[value='vepa']").remove();
+ }
$("#networkName").on("keyup", function(event) {
$("#networkName").toggleClass("invalid-field", !$("#networkName").val().match(/^[^\"\/]+$/));
kimchi.updateNetworkFormButton();
--
2.7.4
More information about the Kimchi-devel
mailing list