Author: tmckay Date: 2011-08-01 20:13:05 +0000 (Mon, 01 Aug 2011) New Revision: 4899
Modified: trunk/sage/python/sage/wallaby/wallabyoperations.py Log: Replace get_nodes_by_tag(self) with get_node_names(self, tag)
Modified: trunk/sage/python/sage/wallaby/wallabyoperations.py =================================================================== --- trunk/sage/python/sage/wallaby/wallabyoperations.py 2011-08-01 19:46:49 UTC (rev 4898) +++ trunk/sage/python/sage/wallaby/wallabyoperations.py 2011-08-01 20:13:05 UTC (rev 4899) @@ -289,18 +289,23 @@ self._lock.release() return d
- def get_nodes_by_tag(self): + def get_node_names(self, tag): ''' - Return a list of node names associated with each tag. + Return a list of node names associated with the tag.
- The return result is a dictionary with tag names as keys and - lists of node names as values. The nodes listed for each tag - are members of the tag group. + The return result is a list containing the names of nodes + in the tag group. ''' + names = [] + if type(tag) in (str, unicode): + n = tag + else: + n = tag.name self._lock.acquire() - n = self._nodes_by_tag + if n in self._nodes_by_tag: + names = self._nodes_by_tag[n] self._lock.release() - return n + return names
def set_interval(self, which, refresh): '''
cumin-developers@lists.fedorahosted.org