+ def removechild(self, targetname: str) -> object:\r
+ return self.children.pop(targetname)\r
+\r
+ # probe all resources by parent, depth = 0 for indefinite recursive\r
+ def probe(self, parentresource=None, depth: int = 0):\r
+ logger.debug("probe resources with watcher: "\r
+ + self.watcher.targetname())\r
+ childdepth = depth - 1 if depth > 0 else 0\r
+ resources = self.watcher.probe(parentresource)\r
+ logger.debug("probe returns " + str(len(resources)) + "resources")\r
+\r
+ if depth == 1:\r
+ # stop recursive\r
+ return\r
+\r
+ for res in resources:\r
+ for node in self.children:\r
+ node.probe(res, childdepth)\r