X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;fp=resources%2Flibraries%2Fpython%2FVppConfigGenerator.py;h=f19294965a90ce0326409540126e0b54017c29bd;hp=b769b89acd688b494f6cf85b38d321df5d9dc0f4;hb=b9457dab3abab7b16f5766c93de6d4d3ca0d03c2;hpb=4cbb1b7c9aa616e377b73b9d22ed2b5ac1735b65 diff --git a/resources/libraries/python/VppConfigGenerator.py b/resources/libraries/python/VppConfigGenerator.py index b769b89acd..f19294965a 100644 --- a/resources/libraries/python/VppConfigGenerator.py +++ b/resources/libraries/python/VppConfigGenerator.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 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: @@ -205,6 +205,20 @@ class VppConfigGenerator: path = [u"socksvr", u"socket-name"] self.add_config_item(self._nodeconfig, socket, path) + def add_graph_node_variant(self, variant=Constants.GRAPH_NODE_VARIANT): + """Add default graph node variant. + + :param value: Graph node variant default value. + :type value: str + """ + if variant == u"": + return + variant_list = [u"hsw", u"skx", u"icl"] + if variant not in variant_list: + raise ValueError("Invalid graph node variant value") + path = [u"node", u"default", u"variant"] + self.add_config_item(self._nodeconfig, variant, path) + def add_api_segment_gid(self, value=u"vpp"): """Add API-SEGMENT gid configuration.