From ce38fb01e5b179214573b66ffb6ce6c23fa8525c Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Mon, 20 Feb 2017 20:22:47 +0100 Subject: [deployment_handler] Add get_arch function This function will be used by ARM project to detect the architecture of the compute nodes. Example: http://paste.openstack.org/raw/599722/ Change-Id: Ic76f291468998d3a3d9e7df507a146da44f2f7f9 Signed-off-by: jose.lausuch --- opnfv/deployment/manager.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/opnfv/deployment/manager.py b/opnfv/deployment/manager.py index 1dfbb09..7047a4d 100644 --- a/opnfv/deployment/manager.py +++ b/opnfv/deployment/manager.py @@ -359,6 +359,18 @@ class DeploymentHandler(object): ''' return self.installer_node + def get_arch(self): + ''' + Returns the architecture of the first compute node found + ''' + arch = None + for node in self.nodes: + if node.is_compute(): + arch = node.cpu_info.get('arch', None) + if arch: + break + return arch + def get_deployment_info(self): ''' Returns an object of type Deployment -- cgit 1.2.3-korg