X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=791b07053c2a7ae3180e4e970acaad5bc6cf593f;hp=8a591dfd140a3b7d6564e15094344934dc1a1e4e;hb=9a261ea61549fc6a5c23369d2e236b002dc35038;hpb=cf561a6e3d4c4fbd78ab6c9d0a9aa817bb3300fc diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 8a591dfd14..791b07053c 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -39,6 +39,7 @@ def load_topo_from_yaml(): # pylint: disable=invalid-name + class NodeType(object): """Defines node types used in topology dictionaries.""" # Device Under Test (this node has VPP running on it) @@ -804,6 +805,34 @@ class Topology(object): """ return node['host'] + @staticmethod + def get_cryptodev(node): + """Return Crytodev configuration of the node. + + :param node: Node created from topology. + :type node: dict + :return: Cryptodev configuration string. + :rtype: str + """ + try: + return node['cryptodev'] + except KeyError: + return None + + @staticmethod + def get_uio_driver(node): + """Return uio-driver configuration of the node. + + :param node: Node created from topology. + :type node: dict + :return: uio-driver configuration string. + :rtype: str + """ + try: + return node['uio_driver'] + except KeyError: + return None + @staticmethod def set_interface_numa_node(node, iface_key, numa_node_id): """Set interface numa_node location.