From e93cc5e9f2640707ac6cf76280e7080ffc08246e Mon Sep 17 00:00:00 2001 From: Biswajit Mandal Date: Tue, 23 Feb 2016 02:15:27 +0530 Subject: [PATCH] Closes-Bug: #1540678 Closes-Bug: #1546405 1. For physical-device virtuallization type, do not validate image name. 2. In interface/network route table if mask is not specified then add /32 for ipv4 and /128 for ipv6 Change-Id: I468c929b303f74aa0e20713fb85fc44c19098c49 --- .../networking/routetable/ui/js/models/RtTableModel.js | 8 ++++++++ .../services/instances/ui/js/models/svcInstModel.js | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/webroot/config/networking/routetable/ui/js/models/RtTableModel.js b/webroot/config/networking/routetable/ui/js/models/RtTableModel.js index 9f61ed905..18c38fa5b 100644 --- a/webroot/config/networking/routetable/ui/js/models/RtTableModel.js +++ b/webroot/config/networking/routetable/ui/js/models/RtTableModel.js @@ -64,6 +64,14 @@ define([ var prefix = routesCollection[i]['prefix'](); if ((null != prefix) && (!prefix.length)) { prefix = null; + } else { + if (-1 == prefix.indexOf('/')) { + if (isIPv4(prefix)) { + prefix = prefix + '/32'; + } else if (isIPv6(prefix)) { + prefix = prefix + '/128'; + } + } } var nextHop = routesCollection[i]['next_hop'](); if ((null != nextHop) && (!nextHop.length)) { diff --git a/webroot/config/services/instances/ui/js/models/svcInstModel.js b/webroot/config/services/instances/ui/js/models/svcInstModel.js index 2ac73277a..f9c7105ab 100644 --- a/webroot/config/services/instances/ui/js/models/svcInstModel.js +++ b/webroot/config/services/instances/ui/js/models/svcInstModel.js @@ -251,9 +251,6 @@ define([ if (2 == tmplVersion) { return; } - if (null == imgName) { - return 'Image name not found for this template'; - } var svcVirtType = getValueByJsonPath(tmpl, 'service_template_properties;service_virtualization_type', @@ -261,6 +258,9 @@ define([ if ('physical-device' == svcVirtType) { return; } + if (null == imgName) { + return 'Image name not found for this template'; + } var imgList = window.imageList; var imgCnt = imgList.length; for (var i = 0; i < imgCnt; i++) {