diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-12-11 20:27:50 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-12-11 20:27:50 +0100 |
commit | 4df8182dfb2e5988d333db1052bb4379b8326527 (patch) | |
tree | f43b289db8073adc10a67607d6e043c18acd764d /python | |
parent | 15828b9e86f46ca7f5cfa06be59f87055c4e3fef (diff) | |
parent | ff56aeefddaad2d37d3ea32626e1adf3960eaf26 (diff) | |
download | vyos-1x-4df8182dfb2e5988d333db1052bb4379b8326527.tar.gz vyos-1x-4df8182dfb2e5988d333db1052bb4379b8326527.zip |
Merge branch 't4792-sstpc' into current
* t4792-sstpc:
sstp: T4384: initial implementation of SSTP client CLI
pppoe: T4384: remove unused import of leaf_node_changed
pppoe: xml: T4792: split "no-peer-dns" CLI node into building block
xml: ddns: T4792: split "server" CLI node into building block
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/ifconfig/__init__.py | 3 | ||||
-rw-r--r-- | python/vyos/ifconfig/sstpc.py | 40 |
2 files changed, 42 insertions, 1 deletions
diff --git a/python/vyos/ifconfig/__init__.py b/python/vyos/ifconfig/__init__.py index d1ddaa13e..206b2bba1 100644 --- a/python/vyos/ifconfig/__init__.py +++ b/python/vyos/ifconfig/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2019-2021 VyOS maintainers and contributors <maintainers@vyos.io> +# Copyright 2019-2022 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -38,3 +38,4 @@ from vyos.ifconfig.l2tpv3 import L2TPv3If from vyos.ifconfig.macsec import MACsecIf from vyos.ifconfig.veth import VethIf from vyos.ifconfig.wwan import WWANIf +from vyos.ifconfig.sstpc import SSTPCIf diff --git a/python/vyos/ifconfig/sstpc.py b/python/vyos/ifconfig/sstpc.py new file mode 100644 index 000000000..50fc6ee6b --- /dev/null +++ b/python/vyos/ifconfig/sstpc.py @@ -0,0 +1,40 @@ +# Copyright 2022 VyOS maintainers and contributors <maintainers@vyos.io> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library. If not, see <http://www.gnu.org/licenses/>. + +from vyos.ifconfig.interface import Interface + +@Interface.register +class SSTPCIf(Interface): + iftype = 'sstpc' + definition = { + **Interface.definition, + **{ + 'section': 'sstpc', + 'prefixes': ['sstpc', ], + 'eternal': 'sstpc[0-9]+$', + }, + } + + def _create(self): + # we can not create this interface as it is managed outside + pass + + def _delete(self): + # we can not create this interface as it is managed outside + pass + + def get_mac(self): + """ Get a synthetic MAC address. """ + return self.get_mac_synthetic() |