diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2025-09-15 19:12:04 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2025-09-17 17:49:45 +0300 |
| commit | 03ded6c071b9bfee98c7ccf3983be56f0ad98c4f (patch) | |
| tree | fb4a131462fb3845982f9aa5c2158a07798368a5 /python | |
| parent | 4669748ca1b39dc0cb54496d5ce695d05c8431f7 (diff) | |
| download | vyos-1x-03ded6c071b9bfee98c7ccf3983be56f0ad98c4f.tar.gz vyos-1x-03ded6c071b9bfee98c7ccf3983be56f0ad98c4f.zip | |
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, + ) |
