diff options
| author | Daniil Baturin <daniil@vyos.io> | 2024-05-03 17:29:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-03 17:29:45 +0200 |
| commit | 1e36c2da57c241095e077686476af93e61315168 (patch) | |
| tree | ac4d3f231e2e4dfee26c298872bcbeb3be5eb5e7 /python/vyos/utils | |
| parent | 1ff4ca42512527c0814216d7e31fd5dcc6d41287 (diff) | |
| parent | dd40ed58b9e50d40cd395e67be3e9bccfb89e1f6 (diff) | |
| download | vyos-1x-1e36c2da57c241095e077686476af93e61315168.tar.gz vyos-1x-1e36c2da57c241095e077686476af93e61315168.zip | |
Merge pull request #3403 from c-po/netns-removal
netns: T6295: disable incomplete support in VyOS 1.4 sagitta
Diffstat (limited to 'python/vyos/utils')
| -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. |
