Skip to content

Commit

Permalink
Merge pull request #1796 from jrha/cleanup-metaconfig-dellnetworking
Browse files Browse the repository at this point in the history
ncm-metaconfig: dellnetworking: Fix wrapping and indentation in pan
  • Loading branch information
jrha authored Dec 16, 2024
2 parents c4440ef + fb21da4 commit acd8d7a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ncm-metaconfig/src/main/metaconfig/dellnetworking/pan/schema.pan
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ include 'quattor/functions/network';

# see TODO below why this is split in a function
function is_dellnetworking_interface_name = {
match(ARGV[0],
'^((ethernet)\s?(\d+/\d+/\d+(:\d+)?))|((port-channel|vlan)\s?\d+)$');
match(ARGV[0], '^((ethernet)\s?(\d+/\d+/\d+(:\d+)?))|((port-channel|vlan)\s?\d+)$');
};

type dellnetworking_interface_name = string with is_dellnetworking_interface_name(SELF);
Expand Down Expand Up @@ -96,10 +95,12 @@ type dellnetworking_interface = {
};
};
};
if (exists(SELF['access']) &&
if (
exists(SELF['access']) &&
exists(SELF['vids']) &&
index(SELF['access'], SELF['vids']) >= 0) {
error("access vlan %s cannot be part of trunk allowed vlan ids %s", SELF['access'], SELF['vids']);
index(SELF['access'], SELF['vids']) >= 0
) {
error("access vlan %s cannot be part of trunk allowed vlan ids %s", SELF['access'], SELF['vids']);
};
true;
};
Expand Down Expand Up @@ -238,8 +239,7 @@ type dellnetworking_config = {
};
foreach (idx; slname; inf['slaves']) {
if (exists(SELF['interfaces'][escape(slname)])) {
error("slave interface %s (for interface %s) cannot be configured as interface",
slname, name);
error("slave interface %s (for interface %s) cannot be configured as interface", slname, name);
};
if (index(slname, slifs) >= 0) {
error('slave interface %s found twice (last for interface %s)', slname, name);
Expand Down

0 comments on commit acd8d7a

Please sign in to comment.