diff options
author | Christian Breunig <christian@breunig.cc> | 2024-05-02 21:04:30 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-05-02 21:04:30 +0200 |
commit | dd40ed58b9e50d40cd395e67be3e9bccfb89e1f6 (patch) | |
tree | 65912073e72ab37fabd79346a5acdbd0dfd29ac9 /python/vyos/utils/network.py | |
parent | dd92f14b9d70956c6604f8fbbce0950f6d6c8a1d (diff) | |
download | vyos-1x-dd40ed58b9e50d40cd395e67be3e9bccfb89e1f6.tar.gz vyos-1x-dd40ed58b9e50d40cd395e67be3e9bccfb89e1f6.zip |
netns: T6295: disable incomplete support in VyOS 1.4 sagitta
The netns support currently available on the VyOS CLI is only a
proof-of-technology, we have no real support for any service behind it.
In order to not confuse anyone on the LTS branch we decided to remove the
netns option for interfaces until there is a proper usecase and implementation
available.
Diffstat (limited to 'python/vyos/utils/network.py')
-rw-r--r-- | python/vyos/utils/network.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/python/vyos/utils/network.py b/python/vyos/utils/network.py index 63c9e263d..a3bd5c58f 100644 --- a/python/vyos/utils/network.py +++ b/python/vyos/utils/network.py @@ -40,13 +40,6 @@ def interface_exists(interface) -> bool: import os return os.path.exists(f'/sys/class/net/{interface}') -def interface_exists_in_netns(interface_name, netns): - from vyos.utils.process import rc_cmd - rc, out = rc_cmd(f'ip netns exec {netns} ip link show dev {interface_name}') - if rc == 0: - return True - return False - def get_vrf_members(vrf: str) -> list: """ Get list of interface VRF members @@ -101,25 +94,6 @@ def get_interface_address(interface): tmp = loads(cmd(f'ip --detail --json addr show dev {interface}'))[0] return tmp -def get_interface_namespace(iface): - """ - Returns wich netns the interface belongs to - """ - from json import loads - from vyos.utils.process import cmd - # Check if netns exist - tmp = loads(cmd(f'ip --json netns ls')) - if len(tmp) == 0: - return None - - for ns in tmp: - netns = f'{ns["name"]}' - # Search interface in each netns - data = loads(cmd(f'ip netns exec {netns} ip --json link show')) - for tmp in data: - if iface == tmp["ifname"]: - return netns - def is_ipv6_tentative(iface: str, ipv6_address: str) -> bool: """Check if IPv6 address is in tentative state. |