summaryrefslogtreecommitdiff
path: root/src/conf_mode/protocols_static_neighbor-proxy.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-03 00:15:43 +0200
committerChristian Breunig <christian@breunig.cc>2024-04-03 00:15:43 +0200
commit274b2da242acd1f1f64ff1dee471e34295137c5f (patch)
tree664ecd75f20eba0115761967a7728f2ab0c086ae /src/conf_mode/protocols_static_neighbor-proxy.py
parent4c7c168fe970b807750a05ceb66b70c0d8652535 (diff)
downloadvyos-1x-274b2da242acd1f1f64ff1dee471e34295137c5f.tar.gz
vyos-1x-274b2da242acd1f1f64ff1dee471e34295137c5f.zip
T6199: drop unused Python imports
found using "git ls-files *.py | xargs pylint | grep W0611"
Diffstat (limited to 'src/conf_mode/protocols_static_neighbor-proxy.py')
-rwxr-xr-xsrc/conf_mode/protocols_static_neighbor-proxy.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/conf_mode/protocols_static_neighbor-proxy.py b/src/conf_mode/protocols_static_neighbor-proxy.py
index 10cc1e748..8a1ea1df9 100755
--- a/src/conf_mode/protocols_static_neighbor-proxy.py
+++ b/src/conf_mode/protocols_static_neighbor-proxy.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (C) 2023 VyOS maintainers and contributors
+# Copyright (C) 2023-2024 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
@@ -14,19 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-import os
-
from sys import exit
from vyos.config import Config
-from vyos.configdict import node_changed
from vyos.utils.process import call
from vyos import ConfigError
from vyos import airbag
-
airbag.enable()
-
def get_config(config=None):
if config:
conf = config
@@ -38,9 +33,7 @@ def get_config(config=None):
return config
-
def verify(config):
-
if 'arp' in config:
for neighbor, neighbor_conf in config['arp'].items():
if 'interface' not in neighbor_conf:
@@ -55,11 +48,9 @@ def verify(config):
f"ARP neighbor-proxy for '{neighbor}' requires an interface to be set!"
)
-
def generate(config):
pass
-
def apply(config):
if not config:
# Cleanup proxy
@@ -83,7 +74,6 @@ def apply(config):
for interface in neighbor_conf['interface']:
call(f'ip -6 neighbor add proxy {neighbor} dev {interface}')
-
if __name__ == '__main__':
try:
c = get_config()