mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-15 15:08:41 +00:00
add support to change bond_xmit_hash_policy on linux bond devices
This commit is contained in:
parent
10a9563eb4
commit
ffffb625e5
@ -81,6 +81,12 @@ my $confdesc = {
|
|||||||
optional => 1,
|
optional => 1,
|
||||||
type => 'string', enum => $bond_mode_enum,
|
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 => {
|
gateway => {
|
||||||
description => 'Default gateway address.',
|
description => 'Default gateway address.',
|
||||||
type => 'string', format => 'ipv4',
|
type => 'string', format => 'ipv4',
|
||||||
|
@ -20,7 +20,7 @@ Ext.define('PVE.form.BondModeSelector', {
|
|||||||
['active-backup', 'active-backup'],
|
['active-backup', 'active-backup'],
|
||||||
['balance-xor', 'balance-xor'],
|
['balance-xor', 'balance-xor'],
|
||||||
['broadcast', 'broadcast'],
|
['broadcast', 'broadcast'],
|
||||||
['802.3ad', 'LACP (layer2)'],
|
['802.3ad', 'LACP (802.3ad)'],
|
||||||
['balance-tlb', 'balance-tlb'],
|
['balance-tlb', 'balance-tlb'],
|
||||||
['balance-alb', 'balance-alb']
|
['balance-alb', 'balance-alb']
|
||||||
];
|
];
|
||||||
@ -29,3 +29,20 @@ Ext.define('PVE.form.BondModeSelector', {
|
|||||||
me.callParent();
|
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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
@ -90,13 +90,35 @@ Ext.define('PVE.node.NetworkEdit', {
|
|||||||
fieldLabel: gettext('Slaves'),
|
fieldLabel: gettext('Slaves'),
|
||||||
name: 'slaves'
|
name: 'slaves'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var policySelector = Ext.createWidget('bondPolicySelector', {
|
||||||
|
fieldLabel: gettext('Hash policy'),
|
||||||
|
name: 'bond_xmit_hash_policy',
|
||||||
|
deleteEmpty: !me.create,
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
column2.push({
|
column2.push({
|
||||||
xtype: 'bondModeSelector',
|
xtype: 'bondModeSelector',
|
||||||
fieldLabel: gettext('Mode'),
|
fieldLabel: gettext('Mode'),
|
||||||
name: 'bond_mode',
|
name: 'bond_mode',
|
||||||
value: me.create ? 'balance-rr' : undefined,
|
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
|
allowBlank: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
column2.push(policySelector);
|
||||||
|
|
||||||
} else if (me.iftype === 'OVSBond') {
|
} else if (me.iftype === 'OVSBond') {
|
||||||
column2.push({
|
column2.push({
|
||||||
xtype: me.create ? 'PVE.form.BridgeSelector' : 'displayfield',
|
xtype: me.create ? 'PVE.form.BridgeSelector' : 'displayfield',
|
||||||
|
Loading…
Reference in New Issue
Block a user