Skip to content

Commit

Permalink
Merge "ECMP Hashing default value."
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jan 29, 2016
2 parents 38291c5 + b71684c commit 7c9acd3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions webroot/config/networking/port/ui/js/models/portModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ define([
'templateGeneratorData': 'rawData',
'disable_sub_interface' : false,
'subnetGroupVisible': true,
'ecmp_hashing_include_fields': {
'ecmp_hashing_include_fields': {/*
'source_mac': true,
'destination_mac': true,
'source_ip': true,
'destination_ip': true,
'ip_protocol': true,
'source_port': true,
'destination_port': true
'destination_port': true*/
}
},
setVNData: function(allNetworks) {
Expand Down Expand Up @@ -846,19 +846,20 @@ define([
}
/* ECMP Hashing */
var ecmpHashIncFields = this.getNonDefaultECMPHashingFields();
var count = 0;
if (null != newPortData['ecmp_hashing_include_fields']) {
var tmpEcmpHashIncFields =
newPortData['ecmp_hashing_include_fields'].split(',');
var cnt = tmpEcmpHashIncFields.length;
for (var i = 0; i < cnt; i++) {
if (tmpEcmpHashIncFields[i].length > 0) {
ecmpHashIncFields[tmpEcmpHashIncFields[i]] = true;
count++;
}
}
} else {
for (key in ecmpHashIncFields) {
ecmpHashIncFields[key] = true;
}
}
if (count == 0) {
ecmpHashIncFields = {};
}
newPortData['ecmp_hashing_include_fields']
= ecmpHashIncFields;
Expand Down
2 changes: 1 addition & 1 deletion webroot/config/networking/port/ui/js/views/portEditView.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ define([
elementId: 'ecmpHashingIncFields',
view: 'FormMultiselectView',
viewConfig: {
label: 'ECMP Hashing',
label: 'ECMP Hashing Fields',
path: 'ecmp_hashing_include_fields',
class: 'span12',
dataBindValue:
Expand Down
2 changes: 1 addition & 1 deletion webroot/config/networking/port/ui/js/views/portGridView.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ define([
}, {
key: 'id_perms',
name:"id_perms",
label:"ECMP Hashing",
label:"ECMP Hashing Fields",
templateGenerator: 'TextGenerator',
templateGeneratorConfig:{
formatter: "ECMPHashingFormatter"
Expand Down

0 comments on commit 7c9acd3

Please sign in to comment.