From fb21da4b7b5e21008b27adca4553b3a677259261 Mon Sep 17 00:00:00 2001 From: James Adams Date: Thu, 28 Nov 2024 15:36:17 +0000 Subject: [PATCH] ncm-metaconfig: dellnetworking: Fix wrapping and indentation in pan --- .../main/metaconfig/dellnetworking/pan/schema.pan | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ncm-metaconfig/src/main/metaconfig/dellnetworking/pan/schema.pan b/ncm-metaconfig/src/main/metaconfig/dellnetworking/pan/schema.pan index dc73f5d15b..811e6272a6 100644 --- a/ncm-metaconfig/src/main/metaconfig/dellnetworking/pan/schema.pan +++ b/ncm-metaconfig/src/main/metaconfig/dellnetworking/pan/schema.pan @@ -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); @@ -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; }; @@ -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);