def SetUniverseName(self, universe, name, callback=None): """Set the name of a universe. Args: universe: the universe to set the name of name: the new name for the universe callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.UniverseNameRequest() request.universe = universe request.name = name done = lambda x, y: self._AckMessageComplete(callback, x, y) try: self._stub.SetUniverseName(controller, request, done) except socket.error: raise OLADNotRunningException() return True
def SetUniverseName(self, universe, name, callback=None): """Set the name of a universe. Args: universe: the universe to set the name of name: the new name for the universe callback: The function to call once complete, takes one argument, a RequestStatus object. """ controller = SimpleRpcController() request = Ola_pb2.UniverseNameRequest() request.universe = universe request.name = name done = lambda x, y: self._AckMessageComplete(callback, x, y) self._stub.SetUniverseName(controller, request, done)