diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-09-18 12:42:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-18 12:42:21 +0100 |
| commit | 1522496d16c77a5f69c96e01a72780e33e9045a3 (patch) | |
| tree | 434f6e57b5e290d399c106cc5ffa8fa8479a1257 /python | |
| parent | 119e9fedbdd10abdc6e65f8e25dff04b58c37781 (diff) | |
| parent | 03ded6c071b9bfee98c7ccf3983be56f0ad98c4f (diff) | |
| download | vyos-1x-1522496d16c77a5f69c96e01a72780e33e9045a3.tar.gz vyos-1x-1522496d16c77a5f69c96e01a72780e33e9045a3.zip | |
Merge pull request #4722 from natali-rs1985/T7796
T7796: PPPoE-server add mapping in vpp if vpp-cp is enabled
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/vpp/control_vpp.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/python/vyos/vpp/control_vpp.py b/python/vyos/vpp/control_vpp.py index 596ef4f12..42e7bf6c1 100644 --- a/python/vyos/vpp/control_vpp.py +++ b/python/vyos/vpp/control_vpp.py @@ -486,3 +486,20 @@ class VPPControl: Callable[AnyParam, AnyType]: API functions """ return self.__vpp_api_client.api + + @_Decorators.api_call + def map_pppoe_interface(self, ifname: str, is_add: bool) -> None: + """Create or delete PPPoE mapping between data-plain and control-plane interfaces + + Args: + ifname (str): name of an interface in kernel + is_add (bool): create or delete mapping + """ + vpp_pair = self.lcp_pair_find(kernel_name=ifname) + if vpp_pair: + vpp_pair_name = vpp_pair['vpp_name_kernel'] + self.__vpp_api_client.api.pppoe_add_del_cp( + dp_sw_if_index=self.get_sw_if_index(ifname), + cp_sw_if_index=self.get_sw_if_index(vpp_pair_name), + is_add=is_add, + ) |
