Merge "Update docstring for get_traits virt driver method"

This commit is contained in:
Zuul 2018-02-20 00:51:36 +00:00 committed by Gerrit Code Review
commit ca6f5031e7
2 changed files with 7 additions and 3 deletions

View File

@ -869,10 +869,11 @@ class ComputeDriver(object):
def get_traits(self, nodename):
"""Get the traits for a given node.
Returns an iterable of traits for the supplied node.
Any custom traits returned are not required to exist in the placement
service - the caller will ensure their existence.
:param nodename: the name of the node.
:returns: an iterable of traits for the supplied node.
:returns: an iterable of string trait names for the supplied node.
"""
raise NotImplementedError()

View File

@ -816,8 +816,11 @@ class IronicDriver(virt_driver.ComputeDriver):
def get_traits(self, nodename):
"""Get the traits for a given node.
Any custom traits returned are not required to exist in the placement
service - the caller will ensure their existence.
:param nodename: the UUID of the node.
:returns: an iterable of traits for the supplied node.
:returns: an iterable of string trait names for the supplied node.
"""
node = self._node_from_cache(nodename)
return list(node.traits)