optional => 1,
type => 'string', enum => $bond_mode_enum,
},
+ bond_xmit_hash_policy => {
+ description => "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
+ optional => 1,
+ type => 'string',
+ enum => ['layer2', 'layer2+3', 'layer3+4' ],
+ },
gateway => {
description => 'Default gateway address.',
type => 'string', format => 'ipv4',
['active-backup', 'active-backup'],
['balance-xor', 'balance-xor'],
['broadcast', 'broadcast'],
- ['802.3ad', 'LACP (layer2)'],
+ ['802.3ad', 'LACP (802.3ad)'],
['balance-tlb', 'balance-tlb'],
['balance-alb', 'balance-alb']
];
me.callParent();
}
});
+
+Ext.define('PVE.form.BondPolicySelector', {
+ extend: 'PVE.form.KVComboBox',
+ alias: ['widget.bondPolicySelector'],
+
+ initComponent: function() {
+ var me = this;
+ me.data = [
+ ['layer2', 'layer2'],
+ ['layer2+3', 'layer2+3'],
+ ['layer3+4', 'layer3+4']
+ ];
+
+ me.callParent();
+ }
+});
+
fieldLabel: gettext('Slaves'),
name: 'slaves'
});
+
+ var policySelector = Ext.createWidget('bondPolicySelector', {
+ fieldLabel: gettext('Hash policy'),
+ name: 'bond_xmit_hash_policy',
+ deleteEmpty: !me.create,
+ disabled: true
+ });
+
column2.push({
xtype: 'bondModeSelector',
fieldLabel: gettext('Mode'),
name: 'bond_mode',
value: me.create ? 'balance-rr' : undefined,
+ listeners: {
+ change: function(f, value) {
+ if (value === 'balance-xor' ||
+ value === '802.3ad') {
+ policySelector.setDisabled(false);
+ } else {
+ policySelector.setDisabled(true);
+ policySelector.setValue('');
+ }
+ }
+ },
allowBlank: false
});
+
+ column2.push(policySelector);
+
} else if (me.iftype === 'OVSBond') {
column2.push({
xtype: me.create ? 'PVE.form.BridgeSelector' : 'displayfield',