Merge "Fix meta of a new bond" into stable/newton

This commit is contained in:
Jenkins 2016-12-30 11:13:09 +00:00 committed by Gerrit Code Review
commit d356643fc8
1 changed files with 10 additions and 2 deletions

View File

@ -364,7 +364,6 @@ var EditNodeInterfacesScreen = React.createClass({
});
this.updateWithLimitations(updatedIfc, ifc);
});
return Backbone.sync('update', node.interfaces, {url: _.result(node, 'url') + '/interfaces'});
}))
.then(
@ -453,6 +452,14 @@ var EditNodeInterfacesScreen = React.createClass({
)
});
var bondMeta = {
dpdk: {
available: _.every(interfaces,
(ifc) => ((ifc.get('meta') || {}).dpdk || {}).available !== false
)
}
};
// populate bond attributes with first slave values
var firstSlaveAttributes = interfaces[0].get('attributes');
_.each(bondAttributes.attributes, (section, sectionName) => {
@ -474,7 +481,8 @@ var EditNodeInterfacesScreen = React.createClass({
assigned_networks: new models.InterfaceNetworks(),
slaves: _.invokeMap(interfaces, 'pick', 'name'),
state: 'down',
attributes: bondAttributes
attributes: bondAttributes,
meta: bondMeta
});
this.updateBondOffloading(bond, interfaces);
} else {