1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

Add validvals to addons, to be used by iface/ifedit wrapper

Ticket: CM-8669
Reviewed By: Julien
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>
This commit is contained in:
Daniel Walton
2016-05-31 13:12:21 -07:00
committed by Julien Fortin
parent 198ded6a35
commit c6370b563b
15 changed files with 140 additions and 32 deletions

View File

@@ -15,17 +15,23 @@ class usercmds(ifupdownaddons.modulebase.moduleBase):
_modinfo = {'mhelp' : 'user commands for interfaces',
'attrs' : {
'pre-up' :
{'help' : 'run command before bringing the interface up'},
{'help' : 'run command before bringing the interface up',
'multiline' : True},
'up' :
{'help' : 'run command at interface bring up'},
{'help' : 'run command at interface bring up',
'multiline' : True},
'post-up' :
{'help' : 'run command after interface bring up'},
{'help' : 'run command after interface bring up',
'multiline' : True},
'pre-down' :
{'help' : 'run command before bringing the interface down'},
{'help' : 'run command before bringing the interface down',
'multiline' : True},
'down' :
{'help' : 'run command at interface down'},
{'help' : 'run command at interface down',
'multiline' : True},
'post-down' :
{'help' : 'run command after bringing interface down'}}}
{'help' : 'run command after bringing interface down',
'multiline' : True}}}
def _run_command(self, ifaceobj, op):
cmd_list = ifaceobj.get_attr_value(op)