- if node['type'] != NodeType.DUT:
- raise ValueError('Node type is not a DUT')
- hostname = Topology.get_node_hostname(node)
- if hostname in self._nodeconfig:
- self._nodeconfig[hostname]['rss_config'] = []
- logger.debug('Clearing RSS config for hostname {}.'.\
- format(hostname))
-
- def apply_config(self, node, waittime=5, retries=12):
+ path = ['heapsize']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_api_trace(self):
+ """Add API trace configuration."""
+ path = ['api-trace', 'on']
+ self.add_config_item(self._nodeconfig, '', path)
+
+ def add_ip6_hash_buckets(self, value):
+ """Add IP6 hash buckets configuration.
+
+ :param value: Number of IP6 hash buckets.
+ :type value: str
+ """
+ path = ['ip6', 'hash-buckets']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_ip6_heap_size(self, value):
+ """Add IP6 heap-size configuration.
+
+ :param value: IP6 Heapsize amount.
+ :type value: str
+ """
+ path = ['ip6', 'heap-size']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def add_plugin_disable(self, *plugins):
+ """Add plugin disable for specific plugin.
+
+ :param plugins: Plugin(s) to disable.
+ :type plugins: list
+ """
+ for plugin in plugins:
+ path = ['plugins', 'plugin {0}'.format(plugin), 'disable']
+ self.add_config_item(self._nodeconfig, ' ', path)
+
+ def add_dpdk_no_multi_seg(self):
+ """Add DPDK no-multi-seg configuration."""
+ path = ['dpdk', 'no-multi-seg']
+ self.add_config_item(self._nodeconfig, '', path)
+
+ def add_nat(self, value='deterministic'):
+ """Add NAT configuration.
+
+ :param value: NAT mode.
+ :type value: str
+ """
+ path = ['nat']
+ self.add_config_item(self._nodeconfig, value, path)
+
+ def apply_config(self, filename=None, waittime=5,
+ retries=12, restart_vpp=True):