aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv/deployment
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-21 13:56:43 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-21 13:56:43 +0000
commit1bac154de0093d594dac97f54f6df89243ac06a6 (patch)
treed2772a4f389c29c32e05d49dae18ed1cf83cf1d9 /opnfv/deployment
parent5578128a47232c3be5c7b810530167b3ba346ecc (diff)
parent5f92f97d630c24c0eead0992c9a0cf5dc538d3dd (diff)
Merge "[deployment_handler] Opendaylight node check"
Diffstat (limited to 'opnfv/deployment')
-rw-r--r--opnfv/deployment/manager.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/opnfv/deployment/manager.py b/opnfv/deployment/manager.py
index e1fd949..efa28ce 100644
--- a/opnfv/deployment/manager.py
+++ b/opnfv/deployment/manager.py
@@ -204,17 +204,19 @@ class Node(object):
'''
Returns if the node is a controller
'''
- if 'controller' in self.roles:
- return True
- return False
+ return Role.CONTROLLER in self.roles
def is_compute(self):
'''
Returns if the node is a compute
'''
- if 'compute' in self.roles:
- return True
- return False
+ return Role.COMPUTE in self.roles
+
+ def is_odl(self):
+ '''
+ Returns if the node is an opendaylight
+ '''
+ return Role.ODL in self.roles
def get_ovs_info(self):
'''