aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2022-02-16 14:28:45 +0100
committerVratko Polak <vrpolak@cisco.com>2022-02-16 16:27:32 +0000
commit692397148d893b22acdfdd708e4df2d5361d007a (patch)
treee960579324eb84048913fdda8240312eb63ad465 /resources
parentd68a81201939ea15fd02c495e708a9ef57cf4f14 (diff)
chore(api): use the non-deprecated nat init call
Change-Id: Ic1949c46aa339e66a47a0ebbc428499c5cf9305e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/api/vpp/supported_crcs.yaml6
-rw-r--r--resources/libraries/python/NATUtil.py21
-rw-r--r--resources/libraries/robot/ip/nat.robot5
3 files changed, 11 insertions, 21 deletions
diff --git a/resources/api/vpp/supported_crcs.yaml b/resources/api/vpp/supported_crcs.yaml
index 840abe8084..927838bc8d 100644
--- a/resources/api/vpp/supported_crcs.yaml
+++ b/resources/api/vpp/supported_crcs.yaml
@@ -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:
@@ -202,14 +202,14 @@
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
diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py
index 0116306e6c..ceed560a04 100644
--- a/resources/libraries/python/NATUtil.py
+++ b/resources/libraries/python/NATUtil.py
@@ -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()}"
diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot
index c33c875389..c04aef0f69 100644
--- a/resources/libraries/robot/ip/nat.robot
+++ b/resources/libraries/robot/ip/nat.robot
@@ -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