Send netdisco-users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/netdisco-users
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of netdisco-users digest..."
Today's Topics:

   1. Re: Prevent display of up='notPresent' ports in CiscoSB
      device port listings (Nick Nauwelaerts)
--- Begin Message ---
excellect question, i would just copy & modify the code 12 lines up in 
properties.pm that skips interfaces based on names:

if (scalar grep {$port =~ m/^$_$/} @{setting('ignore_interfaces') || []}) {

and wouldnt worry with checking much else. notpresent & matched against an 
ignored type -> skip, else pass. going of ignore_interfaces as a template, that 
only has 3 references too: 2 in properties.pm & 1 in config.yml.

perhaps something like:

if (defined $i_up->{$entry} and defined $i_type->{$entry} and $i_up->{$entry} 
eq 'notPresent' and (scalar grep {$i_type->{$entry} =~ m/^$_$/} 
@{setting('ignore_nonpresent_types') || []}) ) {
       debug sprintf ' [%s] interfaces - ignoring %s (%s) (%s) 
(config:ignore_nonpresent_types)',


and an entry in config.yml:
ignore_nonpresent_types:
  - 'ethernetCsmacd'


and then some documentation. i'll see if i can whip up something working right 
now.



// nick

From: Nic Bernstein [mailto:[email protected]]
Sent: Friday, December 7, 2018 15:08
To: Nick Nauwelaerts <[email protected]>; Oliver Gorwits 
<[email protected]>; [email protected]
Subject: Re: [Netdisco] Prevent display of up='notPresent' ports in CiscoSB 
device port listings

Nick,
Sounds great to me, but I haven't looked at the configuration stuff at all, so 
have no idea what's involved with it.  If I get a chance, I'll look later 
today.  Of course, if someone beats me to it...

How is validation performed on configuration entries?  I can imagine trying to 
prevent invalid types by checking against a list, but that would necessarily 
prevent new types from being handled properly, without an update.  Or, do we 
just let matches fail when invalid types are input?  I guess that's not so bad.
    -nic
On 12/6/18 5:29 PM, Nick Nauwelaerts wrote:
cool, less work for me. :)

but what do you think of this: add a new config item "ignore_nonpresent_types", 
since removing tunnel & portchannels seems tempting. also, this way if you dont 
want to ignore nonpresent interfaces you can define a blank list.

thx



--

Nic Bernstein                             
[email protected]<mailto:[email protected]>

Onlight Inc.                              
www.onlight.com<http://www.onlight.com>

6525 W Bluemound Rd., Ste 24             v. 414.272.4477

Milwaukee, Wisconsin  53213-4073        f. 414.290.0335

________________________________

Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> | 
Twitter<https://twitter.com/aquafinnv> | 
YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | 
LinkedIN<http://www.linkedin.com/company/aquafin/products>

In het kader van de uitoefening van onze taken verzamelen we bij Aquafin 
persoonsgegevens. Hoe we omgaan met deze gegevens en wat de rechten van de 
betrokkenen zijn, kan je nalezen in onze privacy 
policy<https://www.aquafin.be/nl-be/privacy-policy>.

  P Denk aan het milieu. Druk deze mail niet onnodig af.

--- End Message ---
_______________________________________________
Netdisco mailing list - Digest Mode
[email protected]
https://lists.sourceforge.net/lists/listinfo/netdisco-users

Reply via email to