chore(api): use the non-deprecated nat init call 39/35339/7
authorVratko Polak <vrpolak@cisco.com>
Wed, 16 Feb 2022 13:28:45 +0000 (14:28 +0100)
committerVratko Polak <vrpolak@cisco.com>
Wed, 16 Feb 2022 16:27:32 +0000 (16:27 +0000)
Change-Id: Ic1949c46aa339e66a47a0ebbc428499c5cf9305e
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
resources/api/vpp/supported_crcs.yaml
resources/libraries/python/NATUtil.py
resources/libraries/robot/ip/nat.robot

index 840abe8..927838b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
     nat44_add_del_address_range_reply: '0xe8d4e804'  # dev
     nat44_address_details: '0x0d1beac1'  # dev teardown
     nat44_address_dump: '0x51077d14'  # dev teardown
+    nat44_ed_plugin_enable_disable: '0xbe17f8dd'  # dev
+    nat44_ed_plugin_enable_disable_reply: '0xe8d4e804'  # dev
     nat44_interface_add_del_feature: '0xf3699b83'  # dev
     nat44_interface_add_del_feature_reply: '0xe8d4e804'  # dev
     nat44_interface_addr_details: '0xe4aca9ca'  # dev teardown
     nat44_interface_addr_dump: '0x51077d14'  # dev teardown
     nat44_interface_details: '0x5d286289'  # dev teardown
     nat44_interface_dump: '0x51077d14'  # dev teardown
-    nat44_plugin_enable_disable: '0xdea0d501'  # dev
-    nat44_plugin_enable_disable_reply: '0xe8d4e804'  # dev
     nat44_show_running_config: '0x51077d14'  # dev teardown
     nat44_show_running_config_reply: '0x93d8e267'  # dev teardown
     nat44_static_mapping_details: '0x06cb40b2'  # dev teardown
index 0116306..ceed560 100644 (file)
@@ -62,23 +62,18 @@ class NATUtil:
         pass
 
     @staticmethod
-    def enable_nat44_plugin(
-            node, inside_vrf=0, outside_vrf=0, users=0, user_memory=0,
-            sessions=0, session_memory=0, user_sessions=0, mode=u""):
+    def enable_nat44_ed_plugin(
+        node, inside_vrf=0, outside_vrf=0, sessions=0, session_memory=0,
+        mode=u""
+    ):
         """Enable NAT44 plugin.
 
         :param node: DUT node.
         :param inside_vrf: Inside VRF ID.
         :param outside_vrf: Outside VRF ID.
-        :param users: Maximum number of users. Used only in endpoint-independent
-            mode.
-        :param user_memory: User memory size - overwrite auto calculated hash
-            allocation parameter if non-zero.
         :param sessions: Maximum number of sessions.
         :param session_memory: Session memory size - overwrite auto calculated
             hash allocation parameter if non-zero.
-        :param user_sessions: Maximum number of sessions per user. Used only in
-            endpoint-independent mode.
         :param mode: NAT44 mode. Valid values:
             - endpoint-independent
             - endpoint-dependent
@@ -88,24 +83,18 @@ class NATUtil:
         :type node: dict
         :type inside_vrf: str or int
         :type outside_vrf: str or int
-        :type users: str or int
-        :type user_memory: str or int
         :type sessions: str or int
         :type session_memory: str or int
-        :type user_sessions: str or int
         :type mode: str
         """
-        cmd = u"nat44_plugin_enable_disable"
+        cmd = u"nat44_ed_plugin_enable_disable"
         err_msg = f"Failed to enable NAT44 plugin on the host {node[u'host']}!"
         args_in = dict(
             enable=True,
             inside_vrf=int(inside_vrf),
             outside_vrf=int(outside_vrf),
-            users=int(users),
-            user_memory=int(user_memory),
             sessions=int(sessions),
             session_memory=int(session_memory),
-            user_sessions=int(user_sessions),
             flags=getattr(
                 Nat44ConfigFlags,
                 f"NAT44_IS_{mode.replace(u'-', u'_').upper()}"
index c33c875..c04aef0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -52,7 +52,8 @@
 | |
 | | ${max_sessions}= | Compute Max Translations Per Thread
 | | ... | ${n_sessions} | ${dp_count_int}
-| | Enable NAT44 Plugin | ${dut1} | mode=${nat_mode} | sessions=${max_sessions}
+| | Enable NAT44 ED Plugin | ${dut1} | mode=${nat_mode}
+| | ... | sessions=${max_sessions}
 | | Configure inside and outside interfaces
 | | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0]
 | | ${resetter} = | Set NAT44 Address Range