Fix meta of a new bond
Closes-bug: #1653058 Change-Id: Ic8bcb7c6c2e0b197895bce879472b7b58cf50900
This commit is contained in:
parent
a5e8da4e77
commit
9630ab2fd6
|
@ -362,7 +362,6 @@ var EditNodeInterfacesScreen = React.createClass({
|
||||||
});
|
});
|
||||||
this.updateWithLimitations(updatedIfc, ifc);
|
this.updateWithLimitations(updatedIfc, ifc);
|
||||||
});
|
});
|
||||||
|
|
||||||
return Backbone.sync('update', node.interfaces, {url: _.result(node, 'url') + '/interfaces'});
|
return Backbone.sync('update', node.interfaces, {url: _.result(node, 'url') + '/interfaces'});
|
||||||
}))
|
}))
|
||||||
.done(() => {
|
.done(() => {
|
||||||
|
@ -448,6 +447,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
|
// populate bond attributes with first slave values
|
||||||
var firstSlaveAttributes = interfaces[0].get('attributes');
|
var firstSlaveAttributes = interfaces[0].get('attributes');
|
||||||
_.each(bondAttributes.attributes, (section, sectionName) => {
|
_.each(bondAttributes.attributes, (section, sectionName) => {
|
||||||
|
@ -469,7 +476,8 @@ var EditNodeInterfacesScreen = React.createClass({
|
||||||
assigned_networks: new models.InterfaceNetworks(),
|
assigned_networks: new models.InterfaceNetworks(),
|
||||||
slaves: _.invoke(interfaces, 'pick', 'name'),
|
slaves: _.invoke(interfaces, 'pick', 'name'),
|
||||||
state: 'down',
|
state: 'down',
|
||||||
attributes: bondAttributes
|
attributes: bondAttributes,
|
||||||
|
meta: bondMeta
|
||||||
});
|
});
|
||||||
this.updateBondOffloading(bond, interfaces);
|
this.updateBondOffloading(bond, interfaces);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue