diff options
author | DmitriyEshenko <snooppy@mail.ua> | 2019-08-23 13:26:08 +0000 |
---|---|---|
committer | DmitriyEshenko <snooppy@mail.ua> | 2019-08-23 13:26:08 +0000 |
commit | 87be8bbd814f2e387c3b60fbd3f44e55a21b2bce (patch) | |
tree | 4e7567aa474c050c3becbf8ff2618c5781e396ed /src/conf_mode/interface-dummy.py | |
parent | db67a7e9e6f448567203ceb5f6364e78c7bb3300 (diff) | |
download | vyos-1x-87be8bbd814f2e387c3b60fbd3f44e55a21b2bce.tar.gz vyos-1x-87be8bbd814f2e387c3b60fbd3f44e55a21b2bce.zip |
[dummy] T1609 Fixing dummy interface state
Diffstat (limited to 'src/conf_mode/interface-dummy.py')
-rwxr-xr-x | src/conf_mode/interface-dummy.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/interface-dummy.py b/src/conf_mode/interface-dummy.py index ff9d57c89..8c939ce95 100755 --- a/src/conf_mode/interface-dummy.py +++ b/src/conf_mode/interface-dummy.py @@ -22,6 +22,7 @@ import copy import vyos.configinterface as VyIfconfig +from vyos.interfaceconfig import Interface from vyos.config import Config from vyos import ConfigError @@ -100,6 +101,11 @@ def apply(dummy): for addr in dummy['address']: VyIfconfig.add_interface_address(dummy['intf'], addr) + if dummy['disable']: + Interface(dummy['intf']).linkstate = 'down' + else: + Interface(dummy['intf']).linkstate = 'up' + return None if __name__ == '__main__': |