def report_up(self, service, port):
wait_on_any(self.connected, self.shutdown)<EOL>node = Node.current(service, port)<EOL>path = self.path_of(service, node)<EOL>data = node.serialize().encode()<EOL>znode = self.client.exists(path)<EOL>if not znode:<EOL><INDENT>logger.debug("<STR_LIT>", path)<EOL>self.client.create(path, value=data, ephemeral=True, makepath=True)<EOL><DEDENT>elif znode.owner_session_id != self.client.client_id[<NUM_LIT:0>]:<EOL><INDENT>logger.debug("<STR_LIT>", path)<EOL>txn = self.client.transaction()<EOL>txn.delete(path)<EOL>txn.create(path, value=data, ephemeral=True)<EOL>txn.commit()<EOL><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>", data)<EOL>self.client.set(path, data)<EOL><DEDENT>
Report the given service's present node as up by creating/updating
its respective znode in Zookeeper and setting the znode's data to
the serialized representation of the node.

Waits for zookeeper to be connected before taking any action.