X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=13dbdddb07f0f6e29975073429669264fde56c5d;hp=38e08d23d32ad926bfeaa9c58a140ceb6df6c4f5;hb=c7eb2002bcd007520309feb3e11a26ff847a4e05;hpb=a95c54b7821596402e0aa7136cd7d1de71a5b187 diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 38e08d23d3..13dbdddb07 100644 --- a/resources/libraries/python/topology.py +++ b/resources/libraries/python/topology.py @@ -904,6 +904,22 @@ class Topology(object): """ return node['host'] + @staticmethod + def get_node_arch(node): + """Return arch of the node. + Default to x86_64 if no arch present + + :param node: Node created from topology. + :type node: dict + :returns: Node architecture + :rtype: str + """ + try: + return node['arch'] + except KeyError: + node['arch'] = 'x86_64' + return 'x86_64' + @staticmethod def get_cryptodev(node): """Return Crytodev configuration of the node.