Update vpp-agent version
[csit.git] / resources / libraries / python / VppConfigGenerator.py
index eccada9..c1bde49 100644 (file)
@@ -180,6 +180,24 @@ class VppConfigGenerator(object):
         path = ['api-segment', 'gid']
         self.add_config_item(self._nodeconfig, value, path)
 
+    def add_api_segment_global_size(self, value):
+        """Add API-SEGMENT global-size configuration.
+
+        :param value: Global size.
+        :type value: str
+        """
+        path = ['api-segment', 'global-size']
+        self.add_config_item(self._nodeconfig, value, path)
+
+    def add_api_segment_api_size(self, value):
+        """Add API-SEGMENT api-size configuration.
+
+        :param value: API size.
+        :type value: str
+        """
+        path = ['api-segment', 'api-size']
+        self.add_config_item(self._nodeconfig, value, path)
+
     def add_dpdk_dev(self, *devices):
         """Add DPDK PCI device configuration.
 
@@ -211,15 +229,19 @@ class VppConfigGenerator(object):
             self.add_config_item(self._nodeconfig, '', path)
         self.add_dpdk_uio_driver('igb_uio')
 
-    def add_dpdk_sw_cryptodev(self, count):
-        """Add DPDK Crypto SW device configuration.
+    def add_dpdk_sw_cryptodev(self, sw_pmd_type, socket_id, count):
+        """Add DPDK SW Crypto device configuration.
 
-        :param count: Number of crypto SW devices to add.
+        :param sw_pmd_type: Type of SW crypto device PMD to add.
+        :param socket_id: Socket ID.
+        :param count: Number of SW crypto devices to add.
+        :type sw_pmd_type: str
+        :type socket_id: int
         :type count: int
         """
-        for i in range(count):
-            cryptodev_config = 'vdev cryptodev_aesni_mb_pmd,socket_id={0}'.\
-                format(str(i))
+        for _ in range(count):
+            cryptodev_config = 'vdev cryptodev_{0}_pmd,socket_id={1}'.\
+                format(sw_pmd_type, str(socket_id))
             path = ['dpdk', cryptodev_config]
             self.add_config_item(self._nodeconfig, '', path)
 
@@ -327,6 +349,15 @@ class VppConfigGenerator(object):
         path = ['ip6', 'heap-size']
         self.add_config_item(self._nodeconfig, value, path)
 
+    def add_ip_heap_size(self, value):
+        """Add IP heap-size configuration.
+
+        :param value: IP Heapsize amount.
+        :type value: str
+        """
+        path = ['ip', 'heap-size']
+        self.add_config_item(self._nodeconfig, value, path)
+
     def add_plugin_disable(self, *plugins):
         """Add plugin disable for specific plugin.