From 612b1ebdf974cc771b640edbbc1ed7301e5e2796 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Thu, 13 Jun 2024 11:54:05 +0200 Subject: [PATCH] remote: implement acquire and release from coordinator to exporter Signed-off-by: Jan Luebbe --- labgrid/remote/coordinator.py | 68 +++++-- labgrid/remote/exporter.py | 43 ++--- .../generated/labgrid_coordinator_pb2.py | 176 +++++++++--------- .../generated/labgrid_coordinator_pb2.pyi | 18 +- .../remote/proto/labgrid-coordinator.proto | 6 +- 5 files changed, 172 insertions(+), 139 deletions(-) diff --git a/labgrid/remote/coordinator.py b/labgrid/remote/coordinator.py index 95d9d8183..bd4add12e 100644 --- a/labgrid/remote/coordinator.py +++ b/labgrid/remote/coordinator.py @@ -142,6 +142,23 @@ class ResourceImport(ResourceEntry): path = attr.ib(kw_only=True, validator=attr.validators.instance_of(tuple)) +class ExporterCommand: + def __init__(self, request) -> None: + self.request = request + self.response = None + self.completed = asyncio.Event() + + def complete(self, response) -> None: + self.response = response + self.completed.set() + + async def wait(self): + await asyncio.wait_for(self.completed.wait(), 10) + +class ExporterError(Exception): + pass + + class Coordinator(labgrid_coordinator_pb2_grpc.LabgridServicer): def __init__(self) -> None: self.places = {} @@ -462,9 +479,12 @@ def schedule_reservations(self): if old_map.get(name) != new_map.get(name): self._publish_place(place) + def get_exporter_by_name(self, name): + for exporter in self.exporters.values(): + if exporter.name == name: + return exporter + async def _acquire_resources(self, place, resources): - #FIXME fix implementation - return True resources = resources.copy() # we may modify the list # all resources need to be free for resource in resources: @@ -475,13 +495,21 @@ async def _acquire_resources(self, place, resources): acquired = [] try: for resource in resources: + print(f"foo {resource}") # this triggers an update from the exporter which is published # to the clients - await self.call(f'org.labgrid.exporter.{resource.path[0]}.acquire', - resource.path[1], resource.path[3], place.name) + request = labgrid_coordinator_pb2.ExporterSetAcquiredRequest() + request.group_name = resource.path[1] + request.resource_name = resource.path[3] + request.place_name = place.name + cmd = ExporterCommand(request) + self.get_exporter_by_name(resource.path[0]).queue.put_nowait(cmd) + await cmd.wait() + if not cmd.response.success: + raise ExporterError("failed to acquire {resource}") acquired.append(resource) - except: - print(f"failed to acquire {resource}", file=sys.stderr) + except Exception as e: + logging.exception("failed to acquire %s", resource) # cleanup await self._release_resources(place, acquired) return False @@ -525,9 +553,6 @@ def _publish_place(self, place): client.queue.put_nowait(msg) async def _release_resources(self, place, resources, callback=True): - # FIXME: use the internal queue to push this to the correct resources - return - resources = resources.copy() # we may modify the list for resource in resources: @@ -541,10 +566,17 @@ async def _release_resources(self, place, resources, callback=True): # this triggers an update from the exporter which is published # to the clients if callback: - await self.call(f'org.labgrid.exporter.{resource.path[0]}.release', - resource.path[1], resource.path[3]) - except: - print(f"failed to release {resource}", file=sys.stderr) + request = labgrid_coordinator_pb2.ExporterSetAcquiredRequest() + request.group_name = resource.path[1] + request.resource_name = resource.path[3] + # request.place_name is left unset to indicate release + cmd = ExporterCommand(request) + self.get_exporter_by_name(resource.path[0]).queue.put_nowait(cmd) + await cmd.wait() + if not cmd.response.success: + raise ExporterError(f"failed to release {resource}") + except (ExporterError, TimeoutError): + logging.exception("failed to release %s", resource) # at leaset try to notify the clients try: self._publish_resource(resource) @@ -570,9 +602,9 @@ async def request_task(): in_msg: labgrid_coordinator_pb2.ExporterInMessage logging.debug(f"exporter in_msg %s", in_msg) kind = in_msg.WhichOneof("kind") - if kind == "response": + if kind in "response": cmd = pending_commands.pop(0) - cmd.set() # set event flag + cmd.complete(in_msg.response) logging.debug(f"Command %s is done", cmd) elif kind == "startup": version = in_msg.startup.version @@ -607,13 +639,13 @@ async def request_task(): async for cmd in queue_as_aiter(command_queue): logging.debug(f"exporter cmd {cmd}") out_msg = labgrid_coordinator_pb2.ExporterOutMessage() - out_msg.request.group_name = "foo-group" - out_msg.request.resource_name = "foo-resource" - out_msg.request.place_name = "foo-place" + out_msg.set_acquired_request.CopyFrom(cmd.request) pending_commands.append(cmd) yield out_msg except asyncio.exceptions.CancelledError: logging.info(f"exporter disconnected {context.peer()}") + except Exception: + logging.exception("error in exporter command handler") finally: runnning_request_task.cancel() await runnning_request_task diff --git a/labgrid/remote/exporter.py b/labgrid/remote/exporter.py index 35278d59d..f4ed0cd37 100755 --- a/labgrid/remote/exporter.py +++ b/labgrid/remote/exporter.py @@ -805,27 +805,28 @@ async def message_pump(self): kind = out_message.WhichOneof("kind") if kind == "hello": logging.info("connected to exporter version %s", out_message.hello.version) - elif kind == "request": - logging.debug(f"aquire request") - if out_message.request.place_name: - await self.acquire( - out_message.request.group_name, - out_message.request.resource_name, - out_message.request.place_name - ) - else: - await self.release( - out_message.request.group_name, - out_message.request.resource_name - ) - in_message = labgrid_coordinator_pb2.ExporterInMessage() - in_message.response.status = 1 - # FIXME update acquired status - # FIXME flush resource updates - logging.debug(f"queing {in_message}") - #await self.out_queue.join() - self.out_queue.put_nowait(in_message) - logging.debug(f"queued {in_message}") + elif kind == "set_acquired_request": + logging.debug(f"acquire request") + try: + success = False + if out_message.set_acquired_request.place_name: + await self.acquire( + out_message.set_acquired_request.group_name, + out_message.set_acquired_request.resource_name, + out_message.set_acquired_request.place_name + ) + else: + await self.release( + out_message.set_acquired_request.group_name, + out_message.set_acquired_request.resource_name + ) + success = True + finally: + in_message = labgrid_coordinator_pb2.ExporterInMessage() + in_message.response.success = success + logging.debug(f"queing {in_message}") + self.out_queue.put_nowait(in_message) + logging.debug(f"queued {in_message}") else: logging.debug(f"unknown request: {kind}") except grpc.aio.AioRpcError as e: diff --git a/labgrid/remote/generated/labgrid_coordinator_pb2.py b/labgrid/remote/generated/labgrid_coordinator_pb2.py index 08aecdaa3..a8f7bcb6d 100644 --- a/labgrid/remote/generated/labgrid_coordinator_pb2.py +++ b/labgrid/remote/generated/labgrid_coordinator_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19labgrid-coordinator.proto\x12\x07labgrid\"\x8a\x01\n\x0f\x43lientInMessage\x12\x1d\n\x04sync\x18\x01 \x01(\x0b\x32\r.labgrid.SyncH\x00\x12\'\n\x07startup\x18\x02 \x01(\x0b\x32\x14.labgrid.StartupDoneH\x00\x12\'\n\tsubscribe\x18\x03 \x01(\x0b\x32\x12.labgrid.SubscribeH\x00\x42\x06\n\x04kind\"\x12\n\x04Sync\x12\n\n\x02id\x18\x01 \x01(\x04\",\n\x0bStartupDone\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"r\n\tSubscribe\x12\x1b\n\x0eis_unsubscribe\x18\x01 \x01(\x08H\x01\x88\x01\x01\x12\x14\n\nall_places\x18\x02 \x01(\x08H\x00\x12\x17\n\rall_resources\x18\x03 \x01(\x08H\x00\x42\x06\n\x04kindB\x11\n\x0f_is_unsubscribe\"d\n\x10\x43lientOutMessage\x12\x1d\n\x04sync\x18\x01 \x01(\x0b\x32\r.labgrid.SyncH\x00\x12)\n\x06update\x18\x02 \x01(\x0b\x32\x17.labgrid.UpdateResponseH\x00\x42\x06\n\x04kind\"\xa5\x01\n\x0eUpdateResponse\x12%\n\x08resource\x18\x01 \x01(\x0b\x32\x11.labgrid.ResourceH\x00\x12.\n\x0c\x64\x65l_resource\x18\x02 \x01(\x0b\x32\x16.labgrid.Resource.PathH\x00\x12\x1f\n\x05place\x18\x03 \x01(\x0b\x32\x0e.labgrid.PlaceH\x00\x12\x13\n\tdel_place\x18\x04 \x01(\tH\x00\x42\x06\n\x04kind\"\x9a\x01\n\x11\x45xporterInMessage\x12%\n\x08resource\x18\x01 \x01(\x0b\x32\x11.labgrid.ResourceH\x00\x12\'\n\x07startup\x18\x02 \x01(\x0b\x32\x14.labgrid.StartupDoneH\x00\x12-\n\x08response\x18\x03 \x01(\x0b\x32\x19.labgrid.ExporterResponseH\x00\x42\x06\n\x04kind\"\x9e\x03\n\x08Resource\x12$\n\x04path\x18\x01 \x01(\x0b\x32\x16.labgrid.Resource.Path\x12\x0b\n\x03\x63ls\x18\x02 \x01(\t\x12-\n\x06params\x18\x03 \x03(\x0b\x32\x1d.labgrid.Resource.ParamsEntry\x12+\n\x05\x65xtra\x18\x04 \x03(\x0b\x32\x1c.labgrid.Resource.ExtraEntry\x12\x10\n\x08\x61\x63quired\x18\x05 \x01(\t\x12\r\n\x05\x61vail\x18\x06 \x01(\x08\x1a_\n\x04Path\x12\x1a\n\rexporter_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ngroup_name\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\tB\x10\n\x0e_exporter_name\x1a@\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.labgrid.MapValue:\x02\x38\x01\x1a?\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.labgrid.MapValue:\x02\x38\x01\"\x82\x01\n\x08MapValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12\x14\n\nuint_value\x18\x03 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x04 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x05 \x01(\tH\x00\x42\x06\n\x04kind\"\"\n\x10\x45xporterResponse\x12\x0e\n\x06status\x18\x01 \x01(\x04\"\x18\n\x05Hello\x12\x0f\n\x07version\x18\x01 \x01(\t\"t\n\x12\x45xporterOutMessage\x12\x1f\n\x05hello\x18\x01 \x01(\x0b\x32\x0e.labgrid.HelloH\x00\x12\x35\n\x07request\x18\x02 \x01(\x0b\x32\".labgrid.ExporterSetAquiredRequestH\x00\x42\x06\n\x04kind\"n\n\x19\x45xporterSetAquiredRequest\x12\x12\n\ngroup_name\x18\x01 \x01(\t\x12\x15\n\rresource_name\x18\x02 \x01(\t\x12\x17\n\nplace_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_place_name\"\x1f\n\x0f\x41\x64\x64PlaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x12\n\x10\x41\x64\x64PlaceResponse\"\"\n\x12\x44\x65letePlaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x15\n\x13\x44\x65letePlaceResponse\"\x12\n\x10GetPlacesRequest\"3\n\x11GetPlacesResponse\x12\x1e\n\x06places\x18\x01 \x03(\x0b\x32\x0e.labgrid.Place\"\xd2\x02\n\x05Place\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61liases\x18\x02 \x03(\t\x12\x0f\n\x07\x63omment\x18\x03 \x01(\t\x12&\n\x04tags\x18\x04 \x03(\x0b\x32\x18.labgrid.Place.TagsEntry\x12\'\n\x07matches\x18\x05 \x03(\x0b\x32\x16.labgrid.ResourceMatch\x12\x15\n\x08\x61\x63quired\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\x12\x61\x63quired_resources\x18\x07 \x03(\t\x12\x0f\n\x07\x61llowed\x18\x08 \x03(\t\x12\x0f\n\x07\x63reated\x18\t \x01(\x01\x12\x0f\n\x07\x63hanged\x18\n \x01(\x01\x12\x18\n\x0breservation\x18\x0b \x01(\tH\x01\x88\x01\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\t_acquiredB\x0e\n\x0c_reservation\"y\n\rResourceMatch\x12\x10\n\x08\x65xporter\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\t\x12\x0b\n\x03\x63ls\x18\x03 \x01(\t\x12\x11\n\x04name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06rename\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_rename\"8\n\x14\x41\x64\x64PlaceAliasRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\t\"\x17\n\x15\x41\x64\x64PlaceAliasResponse\";\n\x17\x44\x65letePlaceAliasRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\t\"\x1a\n\x18\x44\x65letePlaceAliasResponse\"\x8b\x01\n\x13SetPlaceTagsRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x34\n\x04tags\x18\x02 \x03(\x0b\x32&.labgrid.SetPlaceTagsRequest.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x16\n\x14SetPlaceTagsResponse\"<\n\x16SetPlaceCommentRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\"\x19\n\x17SetPlaceCommentResponse\"Z\n\x14\x41\x64\x64PlaceMatchRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0f\n\x07pattern\x18\x02 \x01(\t\x12\x13\n\x06rename\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_rename\"\x17\n\x15\x41\x64\x64PlaceMatchResponse\"]\n\x17\x44\x65letePlaceMatchRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0f\n\x07pattern\x18\x02 \x01(\t\x12\x13\n\x06rename\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_rename\"\x1a\n\x18\x44\x65letePlaceMatchResponse\"(\n\x13\x41\x63quirePlaceRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\"\x16\n\x14\x41\x63quirePlaceResponse\"L\n\x13ReleasePlaceRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x15\n\x08\x66romuser\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_fromuser\"\x16\n\x14ReleasePlaceResponse\"4\n\x11\x41llowPlaceRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0c\n\x04user\x18\x02 \x01(\t\"\x14\n\x12\x41llowPlaceResponse\"6\n\x18\x43reateReservationRequest\x12\x0c\n\x04spec\x18\x01 \x01(\t\x12\x0c\n\x04prio\x18\x02 \x01(\x01\"F\n\x19\x43reateReservationResponse\x12)\n\x0breservation\x18\x01 \x01(\x0b\x32\x14.labgrid.Reservation\"\xbe\x02\n\x0bReservation\x12\r\n\x05owner\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\x05\x12\x0c\n\x04prio\x18\x04 \x01(\x01\x12\x32\n\x07\x66ilters\x18\x05 \x03(\x0b\x32!.labgrid.Reservation.FiltersEntry\x12:\n\x0b\x61llocations\x18\x06 \x03(\x0b\x32%.labgrid.Reservation.AllocationsEntry\x12\x0f\n\x07\x63reated\x18\x07 \x01(\x01\x12\x0f\n\x07timeout\x18\x08 \x01(\x01\x1a.\n\x0c\x46iltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41llocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\")\n\x18\x43\x61ncelReservationRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x1b\n\x19\x43\x61ncelReservationResponse\"\'\n\x16PollReservationRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x19\n\x17PollReservationResponse\"\x19\n\x17GetReservationsResponse\"\x18\n\x16GetReservationsRequest2\xce\x0b\n\x07Labgrid\x12I\n\x0c\x43lientStream\x12\x18.labgrid.ClientInMessage\x1a\x19.labgrid.ClientOutMessage\"\x00(\x01\x30\x01\x12O\n\x0e\x45xporterStream\x12\x1a.labgrid.ExporterInMessage\x1a\x1b.labgrid.ExporterOutMessage\"\x00(\x01\x30\x01\x12\x41\n\x08\x41\x64\x64Place\x12\x18.labgrid.AddPlaceRequest\x1a\x19.labgrid.AddPlaceResponse\"\x00\x12J\n\x0b\x44\x65letePlace\x12\x1b.labgrid.DeletePlaceRequest\x1a\x1c.labgrid.DeletePlaceResponse\"\x00\x12\x44\n\tGetPlaces\x12\x19.labgrid.GetPlacesRequest\x1a\x1a.labgrid.GetPlacesResponse\"\x00\x12P\n\rAddPlaceAlias\x12\x1d.labgrid.AddPlaceAliasRequest\x1a\x1e.labgrid.AddPlaceAliasResponse\"\x00\x12Y\n\x10\x44\x65letePlaceAlias\x12 .labgrid.DeletePlaceAliasRequest\x1a!.labgrid.DeletePlaceAliasResponse\"\x00\x12M\n\x0cSetPlaceTags\x12\x1c.labgrid.SetPlaceTagsRequest\x1a\x1d.labgrid.SetPlaceTagsResponse\"\x00\x12V\n\x0fSetPlaceComment\x12\x1f.labgrid.SetPlaceCommentRequest\x1a .labgrid.SetPlaceCommentResponse\"\x00\x12P\n\rAddPlaceMatch\x12\x1d.labgrid.AddPlaceMatchRequest\x1a\x1e.labgrid.AddPlaceMatchResponse\"\x00\x12Y\n\x10\x44\x65letePlaceMatch\x12 .labgrid.DeletePlaceMatchRequest\x1a!.labgrid.DeletePlaceMatchResponse\"\x00\x12M\n\x0c\x41\x63quirePlace\x12\x1c.labgrid.AcquirePlaceRequest\x1a\x1d.labgrid.AcquirePlaceResponse\"\x00\x12M\n\x0cReleasePlace\x12\x1c.labgrid.ReleasePlaceRequest\x1a\x1d.labgrid.ReleasePlaceResponse\"\x00\x12G\n\nAllowPlace\x12\x1a.labgrid.AllowPlaceRequest\x1a\x1b.labgrid.AllowPlaceResponse\"\x00\x12\\\n\x11\x43reateReservation\x12!.labgrid.CreateReservationRequest\x1a\".labgrid.CreateReservationResponse\"\x00\x12\\\n\x11\x43\x61ncelReservation\x12!.labgrid.CancelReservationRequest\x1a\".labgrid.CancelReservationResponse\"\x00\x12V\n\x0fPollReservation\x12\x1f.labgrid.PollReservationRequest\x1a .labgrid.PollReservationResponse\"\x00\x12V\n\x0fGetReservations\x12\x1f.labgrid.GetReservationsRequest\x1a .labgrid.GetReservationsResponse\"\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19labgrid-coordinator.proto\x12\x07labgrid\"\x8a\x01\n\x0f\x43lientInMessage\x12\x1d\n\x04sync\x18\x01 \x01(\x0b\x32\r.labgrid.SyncH\x00\x12\'\n\x07startup\x18\x02 \x01(\x0b\x32\x14.labgrid.StartupDoneH\x00\x12\'\n\tsubscribe\x18\x03 \x01(\x0b\x32\x12.labgrid.SubscribeH\x00\x42\x06\n\x04kind\"\x12\n\x04Sync\x12\n\n\x02id\x18\x01 \x01(\x04\",\n\x0bStartupDone\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"r\n\tSubscribe\x12\x1b\n\x0eis_unsubscribe\x18\x01 \x01(\x08H\x01\x88\x01\x01\x12\x14\n\nall_places\x18\x02 \x01(\x08H\x00\x12\x17\n\rall_resources\x18\x03 \x01(\x08H\x00\x42\x06\n\x04kindB\x11\n\x0f_is_unsubscribe\"d\n\x10\x43lientOutMessage\x12\x1d\n\x04sync\x18\x01 \x01(\x0b\x32\r.labgrid.SyncH\x00\x12)\n\x06update\x18\x02 \x01(\x0b\x32\x17.labgrid.UpdateResponseH\x00\x42\x06\n\x04kind\"\xa5\x01\n\x0eUpdateResponse\x12%\n\x08resource\x18\x01 \x01(\x0b\x32\x11.labgrid.ResourceH\x00\x12.\n\x0c\x64\x65l_resource\x18\x02 \x01(\x0b\x32\x16.labgrid.Resource.PathH\x00\x12\x1f\n\x05place\x18\x03 \x01(\x0b\x32\x0e.labgrid.PlaceH\x00\x12\x13\n\tdel_place\x18\x04 \x01(\tH\x00\x42\x06\n\x04kind\"\x9a\x01\n\x11\x45xporterInMessage\x12%\n\x08resource\x18\x01 \x01(\x0b\x32\x11.labgrid.ResourceH\x00\x12\'\n\x07startup\x18\x02 \x01(\x0b\x32\x14.labgrid.StartupDoneH\x00\x12-\n\x08response\x18\x03 \x01(\x0b\x32\x19.labgrid.ExporterResponseH\x00\x42\x06\n\x04kind\"\x9e\x03\n\x08Resource\x12$\n\x04path\x18\x01 \x01(\x0b\x32\x16.labgrid.Resource.Path\x12\x0b\n\x03\x63ls\x18\x02 \x01(\t\x12-\n\x06params\x18\x03 \x03(\x0b\x32\x1d.labgrid.Resource.ParamsEntry\x12+\n\x05\x65xtra\x18\x04 \x03(\x0b\x32\x1c.labgrid.Resource.ExtraEntry\x12\x10\n\x08\x61\x63quired\x18\x05 \x01(\t\x12\r\n\x05\x61vail\x18\x06 \x01(\x08\x1a_\n\x04Path\x12\x1a\n\rexporter_name\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\ngroup_name\x18\x02 \x01(\t\x12\x15\n\rresource_name\x18\x03 \x01(\tB\x10\n\x0e_exporter_name\x1a@\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.labgrid.MapValue:\x02\x38\x01\x1a?\n\nExtraEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12 \n\x05value\x18\x02 \x01(\x0b\x32\x11.labgrid.MapValue:\x02\x38\x01\"\x82\x01\n\x08MapValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x13\n\tint_value\x18\x02 \x01(\x03H\x00\x12\x14\n\nuint_value\x18\x03 \x01(\x04H\x00\x12\x15\n\x0b\x66loat_value\x18\x04 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x05 \x01(\tH\x00\x42\x06\n\x04kind\"#\n\x10\x45xporterResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\x18\n\x05Hello\x12\x0f\n\x07version\x18\x01 \x01(\t\"\x82\x01\n\x12\x45xporterOutMessage\x12\x1f\n\x05hello\x18\x01 \x01(\x0b\x32\x0e.labgrid.HelloH\x00\x12\x43\n\x14set_acquired_request\x18\x02 \x01(\x0b\x32#.labgrid.ExporterSetAcquiredRequestH\x00\x42\x06\n\x04kind\"o\n\x1a\x45xporterSetAcquiredRequest\x12\x12\n\ngroup_name\x18\x01 \x01(\t\x12\x15\n\rresource_name\x18\x02 \x01(\t\x12\x17\n\nplace_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_place_name\"\x1f\n\x0f\x41\x64\x64PlaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x12\n\x10\x41\x64\x64PlaceResponse\"\"\n\x12\x44\x65letePlaceRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x15\n\x13\x44\x65letePlaceResponse\"\x12\n\x10GetPlacesRequest\"3\n\x11GetPlacesResponse\x12\x1e\n\x06places\x18\x01 \x03(\x0b\x32\x0e.labgrid.Place\"\xd2\x02\n\x05Place\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x61liases\x18\x02 \x03(\t\x12\x0f\n\x07\x63omment\x18\x03 \x01(\t\x12&\n\x04tags\x18\x04 \x03(\x0b\x32\x18.labgrid.Place.TagsEntry\x12\'\n\x07matches\x18\x05 \x03(\x0b\x32\x16.labgrid.ResourceMatch\x12\x15\n\x08\x61\x63quired\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\x12\x61\x63quired_resources\x18\x07 \x03(\t\x12\x0f\n\x07\x61llowed\x18\x08 \x03(\t\x12\x0f\n\x07\x63reated\x18\t \x01(\x01\x12\x0f\n\x07\x63hanged\x18\n \x01(\x01\x12\x18\n\x0breservation\x18\x0b \x01(\tH\x01\x88\x01\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0b\n\t_acquiredB\x0e\n\x0c_reservation\"y\n\rResourceMatch\x12\x10\n\x08\x65xporter\x18\x01 \x01(\t\x12\r\n\x05group\x18\x02 \x01(\t\x12\x0b\n\x03\x63ls\x18\x03 \x01(\t\x12\x11\n\x04name\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x06rename\x18\x05 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_nameB\t\n\x07_rename\"8\n\x14\x41\x64\x64PlaceAliasRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\t\"\x17\n\x15\x41\x64\x64PlaceAliasResponse\";\n\x17\x44\x65letePlaceAliasRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\r\n\x05\x61lias\x18\x02 \x01(\t\"\x1a\n\x18\x44\x65letePlaceAliasResponse\"\x8b\x01\n\x13SetPlaceTagsRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x34\n\x04tags\x18\x02 \x03(\x0b\x32&.labgrid.SetPlaceTagsRequest.TagsEntry\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x16\n\x14SetPlaceTagsResponse\"<\n\x16SetPlaceCommentRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\"\x19\n\x17SetPlaceCommentResponse\"Z\n\x14\x41\x64\x64PlaceMatchRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0f\n\x07pattern\x18\x02 \x01(\t\x12\x13\n\x06rename\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_rename\"\x17\n\x15\x41\x64\x64PlaceMatchResponse\"]\n\x17\x44\x65letePlaceMatchRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0f\n\x07pattern\x18\x02 \x01(\t\x12\x13\n\x06rename\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_rename\"\x1a\n\x18\x44\x65letePlaceMatchResponse\"(\n\x13\x41\x63quirePlaceRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\"\x16\n\x14\x41\x63quirePlaceResponse\"L\n\x13ReleasePlaceRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x15\n\x08\x66romuser\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0b\n\t_fromuser\"\x16\n\x14ReleasePlaceResponse\"4\n\x11\x41llowPlaceRequest\x12\x11\n\tplacename\x18\x01 \x01(\t\x12\x0c\n\x04user\x18\x02 \x01(\t\"\x14\n\x12\x41llowPlaceResponse\"6\n\x18\x43reateReservationRequest\x12\x0c\n\x04spec\x18\x01 \x01(\t\x12\x0c\n\x04prio\x18\x02 \x01(\x01\"F\n\x19\x43reateReservationResponse\x12)\n\x0breservation\x18\x01 \x01(\x0b\x32\x14.labgrid.Reservation\"\xbe\x02\n\x0bReservation\x12\r\n\x05owner\x18\x01 \x01(\t\x12\r\n\x05token\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\x05\x12\x0c\n\x04prio\x18\x04 \x01(\x01\x12\x32\n\x07\x66ilters\x18\x05 \x03(\x0b\x32!.labgrid.Reservation.FiltersEntry\x12:\n\x0b\x61llocations\x18\x06 \x03(\x0b\x32%.labgrid.Reservation.AllocationsEntry\x12\x0f\n\x07\x63reated\x18\x07 \x01(\x01\x12\x0f\n\x07timeout\x18\x08 \x01(\x01\x1a.\n\x0c\x46iltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x32\n\x10\x41llocationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\")\n\x18\x43\x61ncelReservationRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x1b\n\x19\x43\x61ncelReservationResponse\"\'\n\x16PollReservationRequest\x12\r\n\x05token\x18\x01 \x01(\t\"\x19\n\x17PollReservationResponse\"\x19\n\x17GetReservationsResponse\"\x18\n\x16GetReservationsRequest2\xce\x0b\n\x07Labgrid\x12I\n\x0c\x43lientStream\x12\x18.labgrid.ClientInMessage\x1a\x19.labgrid.ClientOutMessage\"\x00(\x01\x30\x01\x12O\n\x0e\x45xporterStream\x12\x1a.labgrid.ExporterInMessage\x1a\x1b.labgrid.ExporterOutMessage\"\x00(\x01\x30\x01\x12\x41\n\x08\x41\x64\x64Place\x12\x18.labgrid.AddPlaceRequest\x1a\x19.labgrid.AddPlaceResponse\"\x00\x12J\n\x0b\x44\x65letePlace\x12\x1b.labgrid.DeletePlaceRequest\x1a\x1c.labgrid.DeletePlaceResponse\"\x00\x12\x44\n\tGetPlaces\x12\x19.labgrid.GetPlacesRequest\x1a\x1a.labgrid.GetPlacesResponse\"\x00\x12P\n\rAddPlaceAlias\x12\x1d.labgrid.AddPlaceAliasRequest\x1a\x1e.labgrid.AddPlaceAliasResponse\"\x00\x12Y\n\x10\x44\x65letePlaceAlias\x12 .labgrid.DeletePlaceAliasRequest\x1a!.labgrid.DeletePlaceAliasResponse\"\x00\x12M\n\x0cSetPlaceTags\x12\x1c.labgrid.SetPlaceTagsRequest\x1a\x1d.labgrid.SetPlaceTagsResponse\"\x00\x12V\n\x0fSetPlaceComment\x12\x1f.labgrid.SetPlaceCommentRequest\x1a .labgrid.SetPlaceCommentResponse\"\x00\x12P\n\rAddPlaceMatch\x12\x1d.labgrid.AddPlaceMatchRequest\x1a\x1e.labgrid.AddPlaceMatchResponse\"\x00\x12Y\n\x10\x44\x65letePlaceMatch\x12 .labgrid.DeletePlaceMatchRequest\x1a!.labgrid.DeletePlaceMatchResponse\"\x00\x12M\n\x0c\x41\x63quirePlace\x12\x1c.labgrid.AcquirePlaceRequest\x1a\x1d.labgrid.AcquirePlaceResponse\"\x00\x12M\n\x0cReleasePlace\x12\x1c.labgrid.ReleasePlaceRequest\x1a\x1d.labgrid.ReleasePlaceResponse\"\x00\x12G\n\nAllowPlace\x12\x1a.labgrid.AllowPlaceRequest\x1a\x1b.labgrid.AllowPlaceResponse\"\x00\x12\\\n\x11\x43reateReservation\x12!.labgrid.CreateReservationRequest\x1a\".labgrid.CreateReservationResponse\"\x00\x12\\\n\x11\x43\x61ncelReservation\x12!.labgrid.CancelReservationRequest\x1a\".labgrid.CancelReservationResponse\"\x00\x12V\n\x0fPollReservation\x12\x1f.labgrid.PollReservationRequest\x1a .labgrid.PollReservationResponse\"\x00\x12V\n\x0fGetReservations\x12\x1f.labgrid.GetReservationsRequest\x1a .labgrid.GetReservationsResponse\"\x00\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -58,91 +58,91 @@ _globals['_MAPVALUE']._serialized_start=1206 _globals['_MAPVALUE']._serialized_end=1336 _globals['_EXPORTERRESPONSE']._serialized_start=1338 - _globals['_EXPORTERRESPONSE']._serialized_end=1372 - _globals['_HELLO']._serialized_start=1374 - _globals['_HELLO']._serialized_end=1398 - _globals['_EXPORTEROUTMESSAGE']._serialized_start=1400 - _globals['_EXPORTEROUTMESSAGE']._serialized_end=1516 - _globals['_EXPORTERSETAQUIREDREQUEST']._serialized_start=1518 - _globals['_EXPORTERSETAQUIREDREQUEST']._serialized_end=1628 - _globals['_ADDPLACEREQUEST']._serialized_start=1630 - _globals['_ADDPLACEREQUEST']._serialized_end=1661 - _globals['_ADDPLACERESPONSE']._serialized_start=1663 - _globals['_ADDPLACERESPONSE']._serialized_end=1681 - _globals['_DELETEPLACEREQUEST']._serialized_start=1683 - _globals['_DELETEPLACEREQUEST']._serialized_end=1717 - _globals['_DELETEPLACERESPONSE']._serialized_start=1719 - _globals['_DELETEPLACERESPONSE']._serialized_end=1740 - _globals['_GETPLACESREQUEST']._serialized_start=1742 - _globals['_GETPLACESREQUEST']._serialized_end=1760 - _globals['_GETPLACESRESPONSE']._serialized_start=1762 - _globals['_GETPLACESRESPONSE']._serialized_end=1813 - _globals['_PLACE']._serialized_start=1816 - _globals['_PLACE']._serialized_end=2154 - _globals['_PLACE_TAGSENTRY']._serialized_start=2082 - _globals['_PLACE_TAGSENTRY']._serialized_end=2125 - _globals['_RESOURCEMATCH']._serialized_start=2156 - _globals['_RESOURCEMATCH']._serialized_end=2277 - _globals['_ADDPLACEALIASREQUEST']._serialized_start=2279 - _globals['_ADDPLACEALIASREQUEST']._serialized_end=2335 - _globals['_ADDPLACEALIASRESPONSE']._serialized_start=2337 - _globals['_ADDPLACEALIASRESPONSE']._serialized_end=2360 - _globals['_DELETEPLACEALIASREQUEST']._serialized_start=2362 - _globals['_DELETEPLACEALIASREQUEST']._serialized_end=2421 - _globals['_DELETEPLACEALIASRESPONSE']._serialized_start=2423 - _globals['_DELETEPLACEALIASRESPONSE']._serialized_end=2449 - _globals['_SETPLACETAGSREQUEST']._serialized_start=2452 - _globals['_SETPLACETAGSREQUEST']._serialized_end=2591 - _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_start=2082 - _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_end=2125 - _globals['_SETPLACETAGSRESPONSE']._serialized_start=2593 - _globals['_SETPLACETAGSRESPONSE']._serialized_end=2615 - _globals['_SETPLACECOMMENTREQUEST']._serialized_start=2617 - _globals['_SETPLACECOMMENTREQUEST']._serialized_end=2677 - _globals['_SETPLACECOMMENTRESPONSE']._serialized_start=2679 - _globals['_SETPLACECOMMENTRESPONSE']._serialized_end=2704 - _globals['_ADDPLACEMATCHREQUEST']._serialized_start=2706 - _globals['_ADDPLACEMATCHREQUEST']._serialized_end=2796 - _globals['_ADDPLACEMATCHRESPONSE']._serialized_start=2798 - _globals['_ADDPLACEMATCHRESPONSE']._serialized_end=2821 - _globals['_DELETEPLACEMATCHREQUEST']._serialized_start=2823 - _globals['_DELETEPLACEMATCHREQUEST']._serialized_end=2916 - _globals['_DELETEPLACEMATCHRESPONSE']._serialized_start=2918 - _globals['_DELETEPLACEMATCHRESPONSE']._serialized_end=2944 - _globals['_ACQUIREPLACEREQUEST']._serialized_start=2946 - _globals['_ACQUIREPLACEREQUEST']._serialized_end=2986 - _globals['_ACQUIREPLACERESPONSE']._serialized_start=2988 - _globals['_ACQUIREPLACERESPONSE']._serialized_end=3010 - _globals['_RELEASEPLACEREQUEST']._serialized_start=3012 - _globals['_RELEASEPLACEREQUEST']._serialized_end=3088 - _globals['_RELEASEPLACERESPONSE']._serialized_start=3090 - _globals['_RELEASEPLACERESPONSE']._serialized_end=3112 - _globals['_ALLOWPLACEREQUEST']._serialized_start=3114 - _globals['_ALLOWPLACEREQUEST']._serialized_end=3166 - _globals['_ALLOWPLACERESPONSE']._serialized_start=3168 - _globals['_ALLOWPLACERESPONSE']._serialized_end=3188 - _globals['_CREATERESERVATIONREQUEST']._serialized_start=3190 - _globals['_CREATERESERVATIONREQUEST']._serialized_end=3244 - _globals['_CREATERESERVATIONRESPONSE']._serialized_start=3246 - _globals['_CREATERESERVATIONRESPONSE']._serialized_end=3316 - _globals['_RESERVATION']._serialized_start=3319 - _globals['_RESERVATION']._serialized_end=3637 - _globals['_RESERVATION_FILTERSENTRY']._serialized_start=3539 - _globals['_RESERVATION_FILTERSENTRY']._serialized_end=3585 - _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_start=3587 - _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_end=3637 - _globals['_CANCELRESERVATIONREQUEST']._serialized_start=3639 - _globals['_CANCELRESERVATIONREQUEST']._serialized_end=3680 - _globals['_CANCELRESERVATIONRESPONSE']._serialized_start=3682 - _globals['_CANCELRESERVATIONRESPONSE']._serialized_end=3709 - _globals['_POLLRESERVATIONREQUEST']._serialized_start=3711 - _globals['_POLLRESERVATIONREQUEST']._serialized_end=3750 - _globals['_POLLRESERVATIONRESPONSE']._serialized_start=3752 - _globals['_POLLRESERVATIONRESPONSE']._serialized_end=3777 - _globals['_GETRESERVATIONSRESPONSE']._serialized_start=3779 - _globals['_GETRESERVATIONSRESPONSE']._serialized_end=3804 - _globals['_GETRESERVATIONSREQUEST']._serialized_start=3806 - _globals['_GETRESERVATIONSREQUEST']._serialized_end=3830 - _globals['_LABGRID']._serialized_start=3833 - _globals['_LABGRID']._serialized_end=5319 + _globals['_EXPORTERRESPONSE']._serialized_end=1373 + _globals['_HELLO']._serialized_start=1375 + _globals['_HELLO']._serialized_end=1399 + _globals['_EXPORTEROUTMESSAGE']._serialized_start=1402 + _globals['_EXPORTEROUTMESSAGE']._serialized_end=1532 + _globals['_EXPORTERSETACQUIREDREQUEST']._serialized_start=1534 + _globals['_EXPORTERSETACQUIREDREQUEST']._serialized_end=1645 + _globals['_ADDPLACEREQUEST']._serialized_start=1647 + _globals['_ADDPLACEREQUEST']._serialized_end=1678 + _globals['_ADDPLACERESPONSE']._serialized_start=1680 + _globals['_ADDPLACERESPONSE']._serialized_end=1698 + _globals['_DELETEPLACEREQUEST']._serialized_start=1700 + _globals['_DELETEPLACEREQUEST']._serialized_end=1734 + _globals['_DELETEPLACERESPONSE']._serialized_start=1736 + _globals['_DELETEPLACERESPONSE']._serialized_end=1757 + _globals['_GETPLACESREQUEST']._serialized_start=1759 + _globals['_GETPLACESREQUEST']._serialized_end=1777 + _globals['_GETPLACESRESPONSE']._serialized_start=1779 + _globals['_GETPLACESRESPONSE']._serialized_end=1830 + _globals['_PLACE']._serialized_start=1833 + _globals['_PLACE']._serialized_end=2171 + _globals['_PLACE_TAGSENTRY']._serialized_start=2099 + _globals['_PLACE_TAGSENTRY']._serialized_end=2142 + _globals['_RESOURCEMATCH']._serialized_start=2173 + _globals['_RESOURCEMATCH']._serialized_end=2294 + _globals['_ADDPLACEALIASREQUEST']._serialized_start=2296 + _globals['_ADDPLACEALIASREQUEST']._serialized_end=2352 + _globals['_ADDPLACEALIASRESPONSE']._serialized_start=2354 + _globals['_ADDPLACEALIASRESPONSE']._serialized_end=2377 + _globals['_DELETEPLACEALIASREQUEST']._serialized_start=2379 + _globals['_DELETEPLACEALIASREQUEST']._serialized_end=2438 + _globals['_DELETEPLACEALIASRESPONSE']._serialized_start=2440 + _globals['_DELETEPLACEALIASRESPONSE']._serialized_end=2466 + _globals['_SETPLACETAGSREQUEST']._serialized_start=2469 + _globals['_SETPLACETAGSREQUEST']._serialized_end=2608 + _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_start=2099 + _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_end=2142 + _globals['_SETPLACETAGSRESPONSE']._serialized_start=2610 + _globals['_SETPLACETAGSRESPONSE']._serialized_end=2632 + _globals['_SETPLACECOMMENTREQUEST']._serialized_start=2634 + _globals['_SETPLACECOMMENTREQUEST']._serialized_end=2694 + _globals['_SETPLACECOMMENTRESPONSE']._serialized_start=2696 + _globals['_SETPLACECOMMENTRESPONSE']._serialized_end=2721 + _globals['_ADDPLACEMATCHREQUEST']._serialized_start=2723 + _globals['_ADDPLACEMATCHREQUEST']._serialized_end=2813 + _globals['_ADDPLACEMATCHRESPONSE']._serialized_start=2815 + _globals['_ADDPLACEMATCHRESPONSE']._serialized_end=2838 + _globals['_DELETEPLACEMATCHREQUEST']._serialized_start=2840 + _globals['_DELETEPLACEMATCHREQUEST']._serialized_end=2933 + _globals['_DELETEPLACEMATCHRESPONSE']._serialized_start=2935 + _globals['_DELETEPLACEMATCHRESPONSE']._serialized_end=2961 + _globals['_ACQUIREPLACEREQUEST']._serialized_start=2963 + _globals['_ACQUIREPLACEREQUEST']._serialized_end=3003 + _globals['_ACQUIREPLACERESPONSE']._serialized_start=3005 + _globals['_ACQUIREPLACERESPONSE']._serialized_end=3027 + _globals['_RELEASEPLACEREQUEST']._serialized_start=3029 + _globals['_RELEASEPLACEREQUEST']._serialized_end=3105 + _globals['_RELEASEPLACERESPONSE']._serialized_start=3107 + _globals['_RELEASEPLACERESPONSE']._serialized_end=3129 + _globals['_ALLOWPLACEREQUEST']._serialized_start=3131 + _globals['_ALLOWPLACEREQUEST']._serialized_end=3183 + _globals['_ALLOWPLACERESPONSE']._serialized_start=3185 + _globals['_ALLOWPLACERESPONSE']._serialized_end=3205 + _globals['_CREATERESERVATIONREQUEST']._serialized_start=3207 + _globals['_CREATERESERVATIONREQUEST']._serialized_end=3261 + _globals['_CREATERESERVATIONRESPONSE']._serialized_start=3263 + _globals['_CREATERESERVATIONRESPONSE']._serialized_end=3333 + _globals['_RESERVATION']._serialized_start=3336 + _globals['_RESERVATION']._serialized_end=3654 + _globals['_RESERVATION_FILTERSENTRY']._serialized_start=3556 + _globals['_RESERVATION_FILTERSENTRY']._serialized_end=3602 + _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_start=3604 + _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_end=3654 + _globals['_CANCELRESERVATIONREQUEST']._serialized_start=3656 + _globals['_CANCELRESERVATIONREQUEST']._serialized_end=3697 + _globals['_CANCELRESERVATIONRESPONSE']._serialized_start=3699 + _globals['_CANCELRESERVATIONRESPONSE']._serialized_end=3726 + _globals['_POLLRESERVATIONREQUEST']._serialized_start=3728 + _globals['_POLLRESERVATIONREQUEST']._serialized_end=3767 + _globals['_POLLRESERVATIONRESPONSE']._serialized_start=3769 + _globals['_POLLRESERVATIONRESPONSE']._serialized_end=3794 + _globals['_GETRESERVATIONSRESPONSE']._serialized_start=3796 + _globals['_GETRESERVATIONSRESPONSE']._serialized_end=3821 + _globals['_GETRESERVATIONSREQUEST']._serialized_start=3823 + _globals['_GETRESERVATIONSREQUEST']._serialized_end=3847 + _globals['_LABGRID']._serialized_start=3850 + _globals['_LABGRID']._serialized_end=5336 # @@protoc_insertion_point(module_scope) diff --git a/labgrid/remote/generated/labgrid_coordinator_pb2.pyi b/labgrid/remote/generated/labgrid_coordinator_pb2.pyi index 0047bad7a..6ed2e11f1 100644 --- a/labgrid/remote/generated/labgrid_coordinator_pb2.pyi +++ b/labgrid/remote/generated/labgrid_coordinator_pb2.pyi @@ -123,10 +123,10 @@ class MapValue(_message.Message): def __init__(self, bool_value: bool = ..., int_value: _Optional[int] = ..., uint_value: _Optional[int] = ..., float_value: _Optional[float] = ..., string_value: _Optional[str] = ...) -> None: ... class ExporterResponse(_message.Message): - __slots__ = ("status",) - STATUS_FIELD_NUMBER: _ClassVar[int] - status: int - def __init__(self, status: _Optional[int] = ...) -> None: ... + __slots__ = ("success",) + SUCCESS_FIELD_NUMBER: _ClassVar[int] + success: bool + def __init__(self, success: bool = ...) -> None: ... class Hello(_message.Message): __slots__ = ("version",) @@ -135,14 +135,14 @@ class Hello(_message.Message): def __init__(self, version: _Optional[str] = ...) -> None: ... class ExporterOutMessage(_message.Message): - __slots__ = ("hello", "request") + __slots__ = ("hello", "set_acquired_request") HELLO_FIELD_NUMBER: _ClassVar[int] - REQUEST_FIELD_NUMBER: _ClassVar[int] + SET_ACQUIRED_REQUEST_FIELD_NUMBER: _ClassVar[int] hello: Hello - request: ExporterSetAquiredRequest - def __init__(self, hello: _Optional[_Union[Hello, _Mapping]] = ..., request: _Optional[_Union[ExporterSetAquiredRequest, _Mapping]] = ...) -> None: ... + set_acquired_request: ExporterSetAcquiredRequest + def __init__(self, hello: _Optional[_Union[Hello, _Mapping]] = ..., set_acquired_request: _Optional[_Union[ExporterSetAcquiredRequest, _Mapping]] = ...) -> None: ... -class ExporterSetAquiredRequest(_message.Message): +class ExporterSetAcquiredRequest(_message.Message): __slots__ = ("group_name", "resource_name", "place_name") GROUP_NAME_FIELD_NUMBER: _ClassVar[int] RESOURCE_NAME_FIELD_NUMBER: _ClassVar[int] diff --git a/labgrid/remote/proto/labgrid-coordinator.proto b/labgrid/remote/proto/labgrid-coordinator.proto index f26b1710d..1130a4343 100644 --- a/labgrid/remote/proto/labgrid-coordinator.proto +++ b/labgrid/remote/proto/labgrid-coordinator.proto @@ -116,7 +116,7 @@ message MapValue { }; message ExporterResponse { - uint64 status = 1; + bool success = 1; }; message Hello { @@ -126,11 +126,11 @@ message Hello { message ExporterOutMessage { oneof kind { Hello hello = 1; - ExporterSetAquiredRequest request = 2; + ExporterSetAcquiredRequest set_acquired_request = 2; }; }; -message ExporterSetAquiredRequest { +message ExporterSetAcquiredRequest { string group_name = 1; string resource_name = 2; optional string place_name = 3;