summaryrefslogtreecommitdiffstats
path: root/modules/opnfv/deployment/manager.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2017-02-20 20:22:47 +0100
committerAric Gardner <agardner@linuxfoundation.org>2017-02-21 20:25:45 +0000
commit06d6ffe6456e2cfd993fdf138551e4601c3c86ab (patch)
treedd53777fe01aaa6409e52fa8b86ab10eb57e21c8 /modules/opnfv/deployment/manager.py
parentc88a035890338b9cd1a78766bcddfe6c95fad963 (diff)
[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 <jose.lausuch@ericsson.com>
Diffstat (limited to 'modules/opnfv/deployment/manager.py')
-rw-r--r--modules/opnfv/deployment/manager.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/opnfv/deployment/manager.py b/modules/opnfv/deployment/manager.py
index 1dfbb09e4..7047a4dd3 100644
--- a/modules/opnfv/deployment/manager.py
+++ b/modules/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