Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
f99b3b96
Commit
f99b3b96
authored
Dec 30, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support to change bond_xmit_hash_policy on linux bond devices
parent
2f414196
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
Network.pm
PVE/API2/Network.pm
+6
-0
BondModeSelector.js
www/manager/form/BondModeSelector.js
+18
-1
NetworkEdit.js
www/manager/node/NetworkEdit.js
+22
-0
No files found.
PVE/API2/Network.pm
View file @
f99b3b96
...
...
@@ -81,6 +81,12 @@ my $confdesc = {
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
',
...
...
www/manager/form/BondModeSelector.js
View file @
f99b3b96
...
...
@@ -20,7 +20,7 @@ Ext.define('PVE.form.BondModeSelector', {
[
'
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
'
]
];
...
...
@@ -29,3 +29,20 @@ Ext.define('PVE.form.BondModeSelector', {
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
();
}
});
www/manager/node/NetworkEdit.js
View file @
f99b3b96
...
...
@@ -90,13 +90,35 @@ Ext.define('PVE.node.NetworkEdit', {
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
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment