# See the License for the specific language governing permissions and
# limitations under the License.
-"""VPP Configuration File Generator library."""
+"""VPP Configuration File Generator library.
+
+TODO: Support initialization with default values,
+so that we do not need to have block of 6 "Add Unix" commands
+in 7 various places of CSIT code.
+"""
import re
path = ['unix', 'exec']
self.add_config_item(self._nodeconfig, value, path)
+ def add_socksvr(self, socket="default"):
+ """Add socksvr configuration."""
+ path = ['socksvr', socket]
+ self.add_config_item(self._nodeconfig, '', path)
+
def add_api_segment_gid(self, value='vpp'):
"""Add API-SEGMENT gid configuration.
path = ['statseg', 'size']
self.add_config_item(self._nodeconfig, value, path)
+ def add_statseg_per_node_counters(self, value):
+ """Add stats per-node-counters configuration.
+
+ :param value: "on" to switch the counters on.
+ :type value: str
+ """
+ path = ['statseg', 'per-node-counters']
+ self.add_config_item(self._nodeconfig, value, path)
+
def add_plugin(self, state, *plugins):
"""Add plugin section for specific plugin(s).