def _get_topology_with_watch(self, topologyName, callback, isWatching):
path = self.get_topology_path(topologyName)<EOL>if isWatching:<EOL><INDENT>LOG.info("<STR_LIT>" + path)<EOL><DEDENT>@self.client.DataWatch(path)<EOL>def watch_topology(data, stats):<EOL><INDENT>"""<STR_LIT>"""<EOL>if data:<EOL><INDENT>topology = Topology()<EOL>topology.ParseFromString(data)<EOL>callback(topology)<EOL><DEDENT>else:<EOL><INDENT>callback(None)<EOL><DEDENT>return isWatching<EOL><DEDENT>
Helper function to get pplan with
a callback. The future watch is placed
only if isWatching is True.