FIX: SNAT -> NAT renaming of API
[csit.git] / resources / libraries / python / VppConfigGenerator.py
index 31defd6..dac8bae 100644 (file)
@@ -129,6 +129,11 @@ class VppConfigGenerator(object):
         path = ['unix', 'nodaemon']
         self.add_config_item(self._nodeconfig, '', path)
 
+    def add_unix_exec(self, value):
+        """Add UNIX exec configuration."""
+        path = ['unix', 'exec']
+        self.add_config_item(self._nodeconfig, value, path)
+
     def add_dpdk_dev(self, *devices):
         """Add DPDK PCI device configuration.
 
@@ -179,6 +184,25 @@ class VppConfigGenerator(object):
         path = ['dpdk', 'dev default', 'num-tx-queues']
         self.add_config_item(self._nodeconfig, value, path)
 
+    def add_dpdk_dev_default_rxd(self, value):
+        """Add DPDK dev default rxd configuration.
+
+        :param value: Default number of rxds.
+        :type value: str
+        """
+        path = ['dpdk', 'dev default', 'num-rx-desc']
+        self.add_config_item(self._nodeconfig, value, path)
+
+    def add_dpdk_dev_default_txd(self, value):
+        """Add DPDK dev default txd configuration.
+
+        :param value: Default number of txds.
+        :type value: str
+        """
+        path = ['dpdk', 'dev default', 'num-tx-desc']
+        self.add_config_item(self._nodeconfig, value, path)
+
+
     def add_dpdk_socketmem(self, value):
         """Add DPDK socket memory configuration.
 
@@ -262,13 +286,13 @@ class VppConfigGenerator(object):
         path = ['dpdk', 'no-multi-seg']
         self.add_config_item(self._nodeconfig, '', path)
 
-    def add_snat(self, value='deterministic'):
-        """Add SNAT configuration.
+    def add_nat(self, value='deterministic'):
+        """Add NAT configuration.
 
-        :param value: SNAT mode.
+        :param value: NAT mode.
         :type value: str
         """
-        path = ['snat']
+        path = ['nat']
         self.add_config_item(self._nodeconfig, value, path)
 
     def apply_config(self, waittime=5, retries=12):