[modules/nic] Add list of excluded interface prefixes as parameter
"nic.exclude" is now a parameter that can be used to have a custom list of excluded interface prefixes. Multiple prefixes should be separated by a comma. fixes #26
This commit is contained in:
parent
c14189433d
commit
f4b114bd6e
1 changed files with 4 additions and 2 deletions
|
@ -5,12 +5,14 @@ def description():
|
|||
return "Displays the names, IP addresses and status of each available interface."
|
||||
|
||||
def parameters():
|
||||
return [ "none" ]
|
||||
return [
|
||||
"nic.exclude: Comma-separated list of interface prefixes to exlude (defaults to: \"lo,virbr,docker,vboxnet,veth\")"
|
||||
]
|
||||
|
||||
class Module(bumblebee.module.Module):
|
||||
def __init__(self, output, config, alias):
|
||||
super(Module, self).__init__(output, config, alias)
|
||||
self._exclude = ( "lo", "virbr", "docker", "vboxnet", "veth" )
|
||||
self._exclude = tuple(filter(len, self._config.parameter("exclude", "lo,virbr,docker,vboxnet,veth").split(",")))
|
||||
self._state = "down"
|
||||
self._typecache = {}
|
||||
|
||||
|
|
Loading…
Reference in a new issue