diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-02-21 13:56:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-21 13:56:43 +0000 |
commit | 6c47c9cc968818819bb982000b84da095e697713 (patch) | |
tree | 813229c3b655f22d79da1554a08f321f82111fb7 /modules/opnfv | |
parent | 88c250214b1b340db72e7e1799883330aeee37fa (diff) | |
parent | a904bea097a63399426692014adc48e8cddee59d (diff) |
Merge "[deployment_handler] Opendaylight node check"
Diffstat (limited to 'modules/opnfv')
-rw-r--r-- | modules/opnfv/deployment/manager.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/opnfv/deployment/manager.py b/modules/opnfv/deployment/manager.py index e1fd9497f..efa28cea8 100644 --- a/modules/opnfv/deployment/manager.py +++ b/modules/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): ''' |