1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

B #2580 Sunstone is not showing well security groups for ICMP6

(cherry picked from commit 1e218aa021b98643780c8ff4896298c972409e93)
This commit is contained in:
joseangelgm 2018-11-28 14:25:21 +01:00 committed by Tino Vazquez
parent f68b70ca27
commit 9b0978282d

View File

@ -49,6 +49,9 @@ define(function(require) {
case "ICMP":
text["PROTOCOL"] = Locale.tr("ICMP");
break;
case "ICMPV6":
text["PROTOCOL"] = Locale.tr("ICMPv6")
break;
case "IPSEC":
text["PROTOCOL"] = Locale.tr("IPsec");
break;
@ -83,6 +86,12 @@ define(function(require) {
text["ICMP_TYPE"] = "";
}
if(rule.ICMPv6_TYPE != undefined){
text["ICMPv6_TYPE"] = _icmpv6ToSt(rule.ICMPv6_TYPE);
} else {
text["ICMPv6_TYPE"] = "";
}
if(rule.RANGE != undefined && rule.RANGE != ""){
text["RANGE"] = rule.RANGE;
} else {
@ -155,6 +164,19 @@ define(function(require) {
}
}
function _icmpv6ToSt(icmpv6_type){
switch( icmpv6_type){
case "": return Locale.tr("All");
case "1": return "1: Destination Unreachable";
case "2": return "2/0: Packet too long";
case "3": return "3: Time exceeded";
case "4": return "4: Parameter problem";
case "128": return "128/0: Echo request (ping)";
case "129": return "129/0: Echo reply (pong)";
default: return "" + icmpv6_type;
}
}
/*
@param {Object} info Object representing the Security Group as returned by OpenNebula
*/