def children_nodes(self): children = CompositeNode.children_nodes(self) stats = get_c_stat_names() # remove all nodes that do not have a stat nodeNameList = [] for c in children: if c.name not in stats: c.prune() else: nodeNameList.append( c.name) # add all stats to node tree (unless already there) for stat in stats: if stat not in nodeNameList: n = CStatNode(stat) cd = { 'name' : stat, 'parent' : self, 'log_on_change': -1, 'time_last_changed': ''} n.configure( cd) return CompositeNode.children_nodes(self)
def children_nodes(self): children = CompositeNode.children_nodes(self) stats = get_c_stat_names() # remove all nodes that do not have a stat nodeNameList = [] for c in children: if c.name not in stats: c.prune() else: nodeNameList.append(c.name) # add all stats to node tree (unless already there) for stat in stats: if stat not in nodeNameList: n = CStatNode(stat) cd = { 'name': stat, 'parent': self, 'log_on_change': -1, 'time_last_changed': '' } n.configure(cd) return CompositeNode.children_nodes(self)
def children_nodes(self,**options): nodes = CompositeNode.children_nodes(self, **options) nodes.sort(lambda x,y: cmp(x.name, y.name)) return nodes
def children_nodes(self, **options): nodes = CompositeNode.children_nodes(self, **options) nodes.sort(lambda x, y: cmp(x.name, y.name)) return nodes
def children_nodes(self, **options): return self._alias_root.children_nodes(**options) + \ CompositeNode.children_nodes(self, **options)
def children_nodes(self, **options): return self._alias_root.children_nodes(**options) + \ CompositeNode.children_nodes(self, **options)