Skip to content

Commit

Permalink
Closes-Bug: #1401173
Browse files Browse the repository at this point in the history
Issue is it's failing while parsing virtual_network under interface_list
in instance UVE which doesn't exist in this case
Added the null to parse virtual network only if it exists

Change-Id: Ibee1fdcdac3b14eef2a19676e75afd7cf02ee7a7
  • Loading branch information
knagakiran committed Dec 10, 2014
1 parent b329824 commit c7fe444
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -832,7 +832,9 @@ var tenantNetworkMonitorUtils = {
obj['vRouter'] = ifNull(jsonPath(currObj, '$..vrouter')[0], '-');
obj['intfCnt'] = ifNull(jsonPath(currObj, '$..interface_list')[0], []).length;
obj['vn'] = ifNull(jsonPath(currObj, '$..interface_list[*].virtual_network'),[]);
obj['vn'] = tenantNetworkMonitorUtils.formatVN(obj['vn']);
//Parse the VN only if it exists
if(obj['vn'] != false)
obj['vn'] = tenantNetworkMonitorUtils.formatVN(obj['vn']);
obj['ip'] = [];
var intfList = ifNull(currObj['UveVirtualMachineAgent']['interface_list'],[]);
for(var i = 0; i < intfList.length; i++ ) {
Expand Down

0 comments on commit c7fe444

Please sign in to comment.