aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VppConfigGenerator.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-12-04 16:41:57 +0100
committerTibor Frank <tifrank@cisco.com>2018-01-10 15:35:01 +0100
commita95c54b7821596402e0aa7136cd7d1de71a5b187 (patch)
treef1c941b06bb05069af1b3f587b5bcfc8bc22ef3a /resources/libraries/python/VppConfigGenerator.py
parentec120d957cfec192d30e84a0d337198153214a70 (diff)
CSIT-866: wrk onboarding in CSIT
- CSIT-867: Low Level Description - CSIT-868: wrk traffic profile - parsing - CSIT-869: wrk implementation into CSIT Change-Id: I65e1037f5ae05b3a5b2020e4a6c54462766ae1b4 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/VppConfigGenerator.py')
-rw-r--r--resources/libraries/python/VppConfigGenerator.py92
1 files changed, 91 insertions, 1 deletions
diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py
index c1bde49742..d4fde0a6c8 100644
--- a/resources/libraries/python/VppConfigGenerator.py
+++ b/resources/libraries/python/VppConfigGenerator.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
+# Copyright (c) 2018 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:
@@ -382,6 +382,96 @@ class VppConfigGenerator(object):
path = ['nat']
self.add_config_item(self._nodeconfig, value, path)
+ def add_tcp_preallocated_connections(self, value):
+ """Add TCP pre-allocated connections.
+
+ :param value: The number of pre-allocated connections.
+ :type value: int
+ """
+ path = ['tcp', 'preallocated-connections']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_tcp_preallocated_half_open_connections(self, value):
+ """Add TCP pre-allocated half open connections.
+
+ :param value: The number of pre-allocated half open connections.
+ :type value: int
+ """
+ path = ['tcp', 'preallocated-half-open-connections']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_event_queue_length(self, value):
+ """Add session event queue length.
+
+ :param value: Session event queue length.
+ :type value: int
+ """
+ path = ['session', 'event-queue-length']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_preallocated_sessions(self, value):
+ """Add the number of pre-allocated sessions.
+
+ :param value: Number of pre-allocated sessions.
+ :type value: int
+ """
+ path = ['session', 'preallocated-sessions']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_v4_session_table_buckets(self, value):
+ """Add number of v4 session table buckets to the config.
+
+ :param value: Number of v4 session table buckets.
+ :type value: int
+ """
+ path = ['session', 'v4-session-table-buckets']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_v4_session_table_memory(self, value):
+ """Add the size of v4 session table memory.
+
+ :param value: Size of v4 session table memory.
+ :type value: str
+ """
+ path = ['session', 'v4-session-table-memory']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_v4_halfopen_table_buckets(self, value):
+ """Add the number of v4 halfopen table buckets.
+
+ :param value: Number of v4 halfopen table buckets.
+ :type value: int
+ """
+ path = ['session', 'v4-halfopen-table-buckets']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_v4_halfopen_table_memory(self, value):
+ """Add the size of v4 halfopen table memory.
+
+ :param value: Size of v4 halfopen table memory.
+ :type value: str
+ """
+ path = ['session', 'v4-halfopen-table-memory']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_local_endpoints_table_buckets(self, value):
+ """Add the number of local endpoints table buckets.
+
+ :param value: Number of local endpoints table buckets.
+ :type value: int
+ """
+ path = ['session', 'local-endpoints-table-buckets']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_session_local_endpoints_table_memory(self, value):
+ """Add the size of local endpoints table memory.
+
+ :param value: Size of local endpoints table memory.
+ :type value: str
+ """
+ path = ['session', 'local-endpoints-table-memory']
+ self.add_config_item(self._nodeconfig, value, path)
+
def apply_config(self, filename=None, waittime=5,
retries=12, restart_vpp=True):
"""Generate and apply VPP configuration for node.