Skip to content

Commit

Permalink
Merge pull request #420 from wdpypere/ncm-network-lacp
Browse files Browse the repository at this point in the history
ncm-network: allow for bonding with lacp while keeping validation
  • Loading branch information
jrha committed Mar 5, 2015
2 parents 026be01 + 87c76ae commit b051a62
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions ncm-network/src/main/pan/components/network/core-schema.pan
Expand Up @@ -29,11 +29,23 @@ type structure_interface_alias = {
# Describes the bonding options for configuring channel bonding on SL5
# and similar.
type structure_bonding_options = {
"mode" : long
"mode" : long(0..6)
"miimon" : long
"updelay" : long
"updelay" ? long
"downdelay" ? long
"primary" : string with exists("/system/network/interfaces/" + SELF)
"primary" ? string with exists("/system/network/interfaces/" + SELF)
"lacp_rate" ? long(0..1)
} with {
if ( SELF['mode'] == 1 || SELF['mode'] == 5 || SELF['mode'] == 6 ) {
if ( ! exists(SELF["primary"]) ) {
error("Bonding configured but no primary is defined.");
};
} else {
if ( exists(SELF["primary"]) ) {
error("Primary is defined but this is not allowed with this bonding mode.");
};
};
true;
};

# describes the bridging options
Expand Down

0 comments on commit b051a62

Please sign in to comment.