diff --git a/labgrid/remote/common.py b/labgrid/remote/common.py index 93b6b22e7..1072f75fc 100644 --- a/labgrid/remote/common.py +++ b/labgrid/remote/common.py @@ -7,6 +7,7 @@ import logging from datetime import datetime from fnmatch import fnmatchcase +from typing import Any import attr @@ -27,34 +28,48 @@ def set_map_from_dict(m, d): - for k, v in d.items(): - assert isinstance(k, str) + def mapval_from_val(mapval: labgrid_coordinator_pb2.MapValue, v): if v is None: - m[k].Clear() + mapval.Clear() elif isinstance(v, bool): - m[k].bool_value = v + mapval.bool_value = v elif isinstance(v, int): if v < 0: - m[k].int_value = v + mapval.int_value = v else: - m[k].uint_value = v + mapval.uint_value = v elif isinstance(v, float): - m[k].float_value = v + mapval.float_value = v elif isinstance(v, str): - m[k].string_value = v + mapval.string_value = v + elif isinstance(v, list): + for listval in v: + mv = labgrid_coordinator_pb2.MapValue() + mapval_from_val(mv, listval) + mapval.array_value.values.append(mv) else: raise ValueError(f"cannot translate {repr(v)} to MapValue") + for k, v in d.items(): + assert isinstance(k, str) + mapval_from_val(m[k], v) def build_dict_from_map(m): - d = {} - for k, v in m.items(): - v: labgrid_coordinator_pb2.MapValue - kind = v.WhichOneof("kind") + def val_from_mapval(mapval: labgrid_coordinator_pb2.MapValue) -> Any: + kind = mapval.WhichOneof("kind") if kind is None: - d[k] = None + return None + elif kind == "array_value": + lv = list() + for mv in mapval.array_value.values: + lv.append(val_from_mapval(mv)) + return lv else: - d[k] = getattr(v, kind) + return getattr(mapval, kind) + + d = {} + for k, v in m.items(): + d[k] = val_from_mapval(v) return d diff --git a/labgrid/remote/generated/labgrid_coordinator_pb2.py b/labgrid/remote/generated/labgrid_coordinator_pb2.py index 37652bff7..dfad6612e 100644 --- a/labgrid/remote/generated/labgrid_coordinator_pb2.py +++ b/labgrid/remote/generated/labgrid_coordinator_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: labgrid-coordinator.proto -# Protobuf Python Version: 4.25.1 +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -14,28 +14,28 @@ -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\"g\n\x10\x43lientOutMessage\x12 \n\x04sync\x18\x01 \x01(\x0b\x32\r.labgrid.SyncH\x00\x88\x01\x01\x12(\n\x07updates\x18\x02 \x03(\x0b\x32\x17.labgrid.UpdateResponseB\x07\n\x05_sync\"\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\"C\n\x10\x45xporterResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x06reason\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_reason\"\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\"\xb6\x01\n\x18\x43reateReservationRequest\x12?\n\x07\x66ilters\x18\x01 \x03(\x0b\x32..labgrid.CreateReservationRequest.FiltersEntry\x12\x0c\n\x04prio\x18\x02 \x01(\x01\x1aK\n\x0c\x46iltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.labgrid.Reservation.Filter:\x02\x38\x01\"F\n\x19\x43reateReservationResponse\x12)\n\x0breservation\x18\x01 \x01(\x0b\x32\x14.labgrid.Reservation\"\xcd\x03\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\x1ap\n\x06\x46ilter\x12\x37\n\x06\x66ilter\x18\x01 \x03(\x0b\x32\'.labgrid.Reservation.Filter.FilterEntry\x1a-\n\x0b\x46ilterEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aK\n\x0c\x46iltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.labgrid.Reservation.Filter:\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\"D\n\x17PollReservationResponse\x12)\n\x0breservation\x18\x01 \x01(\x0b\x32\x14.labgrid.Reservation\"E\n\x17GetReservationsResponse\x12*\n\x0creservations\x18\x01 \x03(\x0b\x32\x14.labgrid.Reservation\"\x18\n\x16GetReservationsRequest2\xd2\x0b\n\x0b\x43oordinator\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\"g\n\x10\x43lientOutMessage\x12 \n\x04sync\x18\x01 \x01(\x0b\x32\r.labgrid.SyncH\x00\x88\x01\x01\x12(\n\x07updates\x18\x02 \x03(\x0b\x32\x17.labgrid.UpdateResponseB\x07\n\x05_sync\"\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\"\xb1\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\x12-\n\x0b\x61rray_value\x18\x06 \x01(\x0b\x32\x16.labgrid.MapValueArrayH\x00\x42\x06\n\x04kind\"2\n\rMapValueArray\x12!\n\x06values\x18\x01 \x03(\x0b\x32\x11.labgrid.MapValue\"C\n\x10\x45xporterResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x13\n\x06reason\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\t\n\x07_reason\"\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\"\xb6\x01\n\x18\x43reateReservationRequest\x12?\n\x07\x66ilters\x18\x01 \x03(\x0b\x32..labgrid.CreateReservationRequest.FiltersEntry\x12\x0c\n\x04prio\x18\x02 \x01(\x01\x1aK\n\x0c\x46iltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.labgrid.Reservation.Filter:\x02\x38\x01\"F\n\x19\x43reateReservationResponse\x12)\n\x0breservation\x18\x01 \x01(\x0b\x32\x14.labgrid.Reservation\"\xcd\x03\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\x1ap\n\x06\x46ilter\x12\x37\n\x06\x66ilter\x18\x01 \x03(\x0b\x32\'.labgrid.Reservation.Filter.FilterEntry\x1a-\n\x0b\x46ilterEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aK\n\x0c\x46iltersEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12*\n\x05value\x18\x02 \x01(\x0b\x32\x1b.labgrid.Reservation.Filter:\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\"D\n\x17PollReservationResponse\x12)\n\x0breservation\x18\x01 \x01(\x0b\x32\x14.labgrid.Reservation\"E\n\x17GetReservationsResponse\x12*\n\x0creservations\x18\x01 \x03(\x0b\x32\x14.labgrid.Reservation\"\x18\n\x16GetReservationsRequest2\xd2\x0b\n\x0b\x43oordinator\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) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'labgrid_coordinator_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - DESCRIPTOR._options = None - _globals['_RESOURCE_PARAMSENTRY']._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None + _globals['_RESOURCE_PARAMSENTRY']._loaded_options = None _globals['_RESOURCE_PARAMSENTRY']._serialized_options = b'8\001' - _globals['_RESOURCE_EXTRAENTRY']._options = None + _globals['_RESOURCE_EXTRAENTRY']._loaded_options = None _globals['_RESOURCE_EXTRAENTRY']._serialized_options = b'8\001' - _globals['_PLACE_TAGSENTRY']._options = None + _globals['_PLACE_TAGSENTRY']._loaded_options = None _globals['_PLACE_TAGSENTRY']._serialized_options = b'8\001' - _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._options = None + _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._loaded_options = None _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_options = b'8\001' - _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._options = None + _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._loaded_options = None _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._serialized_options = b'8\001' - _globals['_RESERVATION_FILTER_FILTERENTRY']._options = None + _globals['_RESERVATION_FILTER_FILTERENTRY']._loaded_options = None _globals['_RESERVATION_FILTER_FILTERENTRY']._serialized_options = b'8\001' - _globals['_RESERVATION_FILTERSENTRY']._options = None + _globals['_RESERVATION_FILTERSENTRY']._loaded_options = None _globals['_RESERVATION_FILTERSENTRY']._serialized_options = b'8\001' - _globals['_RESERVATION_ALLOCATIONSENTRY']._options = None + _globals['_RESERVATION_ALLOCATIONSENTRY']._loaded_options = None _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_options = b'8\001' _globals['_CLIENTINMESSAGE']._serialized_start=39 _globals['_CLIENTINMESSAGE']._serialized_end=177 @@ -60,99 +60,101 @@ _globals['_RESOURCE_EXTRAENTRY']._serialized_start=1143 _globals['_RESOURCE_EXTRAENTRY']._serialized_end=1206 _globals['_MAPVALUE']._serialized_start=1209 - _globals['_MAPVALUE']._serialized_end=1339 - _globals['_EXPORTERRESPONSE']._serialized_start=1341 - _globals['_EXPORTERRESPONSE']._serialized_end=1408 - _globals['_HELLO']._serialized_start=1410 - _globals['_HELLO']._serialized_end=1434 - _globals['_EXPORTEROUTMESSAGE']._serialized_start=1437 - _globals['_EXPORTEROUTMESSAGE']._serialized_end=1567 - _globals['_EXPORTERSETACQUIREDREQUEST']._serialized_start=1569 - _globals['_EXPORTERSETACQUIREDREQUEST']._serialized_end=1680 - _globals['_ADDPLACEREQUEST']._serialized_start=1682 - _globals['_ADDPLACEREQUEST']._serialized_end=1713 - _globals['_ADDPLACERESPONSE']._serialized_start=1715 - _globals['_ADDPLACERESPONSE']._serialized_end=1733 - _globals['_DELETEPLACEREQUEST']._serialized_start=1735 - _globals['_DELETEPLACEREQUEST']._serialized_end=1769 - _globals['_DELETEPLACERESPONSE']._serialized_start=1771 - _globals['_DELETEPLACERESPONSE']._serialized_end=1792 - _globals['_GETPLACESREQUEST']._serialized_start=1794 - _globals['_GETPLACESREQUEST']._serialized_end=1812 - _globals['_GETPLACESRESPONSE']._serialized_start=1814 - _globals['_GETPLACESRESPONSE']._serialized_end=1865 - _globals['_PLACE']._serialized_start=1868 - _globals['_PLACE']._serialized_end=2206 - _globals['_PLACE_TAGSENTRY']._serialized_start=2134 - _globals['_PLACE_TAGSENTRY']._serialized_end=2177 - _globals['_RESOURCEMATCH']._serialized_start=2208 - _globals['_RESOURCEMATCH']._serialized_end=2329 - _globals['_ADDPLACEALIASREQUEST']._serialized_start=2331 - _globals['_ADDPLACEALIASREQUEST']._serialized_end=2387 - _globals['_ADDPLACEALIASRESPONSE']._serialized_start=2389 - _globals['_ADDPLACEALIASRESPONSE']._serialized_end=2412 - _globals['_DELETEPLACEALIASREQUEST']._serialized_start=2414 - _globals['_DELETEPLACEALIASREQUEST']._serialized_end=2473 - _globals['_DELETEPLACEALIASRESPONSE']._serialized_start=2475 - _globals['_DELETEPLACEALIASRESPONSE']._serialized_end=2501 - _globals['_SETPLACETAGSREQUEST']._serialized_start=2504 - _globals['_SETPLACETAGSREQUEST']._serialized_end=2643 - _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_start=2134 - _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_end=2177 - _globals['_SETPLACETAGSRESPONSE']._serialized_start=2645 - _globals['_SETPLACETAGSRESPONSE']._serialized_end=2667 - _globals['_SETPLACECOMMENTREQUEST']._serialized_start=2669 - _globals['_SETPLACECOMMENTREQUEST']._serialized_end=2729 - _globals['_SETPLACECOMMENTRESPONSE']._serialized_start=2731 - _globals['_SETPLACECOMMENTRESPONSE']._serialized_end=2756 - _globals['_ADDPLACEMATCHREQUEST']._serialized_start=2758 - _globals['_ADDPLACEMATCHREQUEST']._serialized_end=2848 - _globals['_ADDPLACEMATCHRESPONSE']._serialized_start=2850 - _globals['_ADDPLACEMATCHRESPONSE']._serialized_end=2873 - _globals['_DELETEPLACEMATCHREQUEST']._serialized_start=2875 - _globals['_DELETEPLACEMATCHREQUEST']._serialized_end=2968 - _globals['_DELETEPLACEMATCHRESPONSE']._serialized_start=2970 - _globals['_DELETEPLACEMATCHRESPONSE']._serialized_end=2996 - _globals['_ACQUIREPLACEREQUEST']._serialized_start=2998 - _globals['_ACQUIREPLACEREQUEST']._serialized_end=3038 - _globals['_ACQUIREPLACERESPONSE']._serialized_start=3040 - _globals['_ACQUIREPLACERESPONSE']._serialized_end=3062 - _globals['_RELEASEPLACEREQUEST']._serialized_start=3064 - _globals['_RELEASEPLACEREQUEST']._serialized_end=3140 - _globals['_RELEASEPLACERESPONSE']._serialized_start=3142 - _globals['_RELEASEPLACERESPONSE']._serialized_end=3164 - _globals['_ALLOWPLACEREQUEST']._serialized_start=3166 - _globals['_ALLOWPLACEREQUEST']._serialized_end=3218 - _globals['_ALLOWPLACERESPONSE']._serialized_start=3220 - _globals['_ALLOWPLACERESPONSE']._serialized_end=3240 - _globals['_CREATERESERVATIONREQUEST']._serialized_start=3243 - _globals['_CREATERESERVATIONREQUEST']._serialized_end=3425 - _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._serialized_start=3350 - _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._serialized_end=3425 - _globals['_CREATERESERVATIONRESPONSE']._serialized_start=3427 - _globals['_CREATERESERVATIONRESPONSE']._serialized_end=3497 - _globals['_RESERVATION']._serialized_start=3500 - _globals['_RESERVATION']._serialized_end=3961 - _globals['_RESERVATION_FILTER']._serialized_start=3720 - _globals['_RESERVATION_FILTER']._serialized_end=3832 - _globals['_RESERVATION_FILTER_FILTERENTRY']._serialized_start=3787 - _globals['_RESERVATION_FILTER_FILTERENTRY']._serialized_end=3832 - _globals['_RESERVATION_FILTERSENTRY']._serialized_start=3350 - _globals['_RESERVATION_FILTERSENTRY']._serialized_end=3425 - _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_start=3911 - _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_end=3961 - _globals['_CANCELRESERVATIONREQUEST']._serialized_start=3963 - _globals['_CANCELRESERVATIONREQUEST']._serialized_end=4004 - _globals['_CANCELRESERVATIONRESPONSE']._serialized_start=4006 - _globals['_CANCELRESERVATIONRESPONSE']._serialized_end=4033 - _globals['_POLLRESERVATIONREQUEST']._serialized_start=4035 - _globals['_POLLRESERVATIONREQUEST']._serialized_end=4074 - _globals['_POLLRESERVATIONRESPONSE']._serialized_start=4076 - _globals['_POLLRESERVATIONRESPONSE']._serialized_end=4144 - _globals['_GETRESERVATIONSRESPONSE']._serialized_start=4146 - _globals['_GETRESERVATIONSRESPONSE']._serialized_end=4215 - _globals['_GETRESERVATIONSREQUEST']._serialized_start=4217 - _globals['_GETRESERVATIONSREQUEST']._serialized_end=4241 - _globals['_COORDINATOR']._serialized_start=4244 - _globals['_COORDINATOR']._serialized_end=5734 + _globals['_MAPVALUE']._serialized_end=1386 + _globals['_MAPVALUEARRAY']._serialized_start=1388 + _globals['_MAPVALUEARRAY']._serialized_end=1438 + _globals['_EXPORTERRESPONSE']._serialized_start=1440 + _globals['_EXPORTERRESPONSE']._serialized_end=1507 + _globals['_HELLO']._serialized_start=1509 + _globals['_HELLO']._serialized_end=1533 + _globals['_EXPORTEROUTMESSAGE']._serialized_start=1536 + _globals['_EXPORTEROUTMESSAGE']._serialized_end=1666 + _globals['_EXPORTERSETACQUIREDREQUEST']._serialized_start=1668 + _globals['_EXPORTERSETACQUIREDREQUEST']._serialized_end=1779 + _globals['_ADDPLACEREQUEST']._serialized_start=1781 + _globals['_ADDPLACEREQUEST']._serialized_end=1812 + _globals['_ADDPLACERESPONSE']._serialized_start=1814 + _globals['_ADDPLACERESPONSE']._serialized_end=1832 + _globals['_DELETEPLACEREQUEST']._serialized_start=1834 + _globals['_DELETEPLACEREQUEST']._serialized_end=1868 + _globals['_DELETEPLACERESPONSE']._serialized_start=1870 + _globals['_DELETEPLACERESPONSE']._serialized_end=1891 + _globals['_GETPLACESREQUEST']._serialized_start=1893 + _globals['_GETPLACESREQUEST']._serialized_end=1911 + _globals['_GETPLACESRESPONSE']._serialized_start=1913 + _globals['_GETPLACESRESPONSE']._serialized_end=1964 + _globals['_PLACE']._serialized_start=1967 + _globals['_PLACE']._serialized_end=2305 + _globals['_PLACE_TAGSENTRY']._serialized_start=2233 + _globals['_PLACE_TAGSENTRY']._serialized_end=2276 + _globals['_RESOURCEMATCH']._serialized_start=2307 + _globals['_RESOURCEMATCH']._serialized_end=2428 + _globals['_ADDPLACEALIASREQUEST']._serialized_start=2430 + _globals['_ADDPLACEALIASREQUEST']._serialized_end=2486 + _globals['_ADDPLACEALIASRESPONSE']._serialized_start=2488 + _globals['_ADDPLACEALIASRESPONSE']._serialized_end=2511 + _globals['_DELETEPLACEALIASREQUEST']._serialized_start=2513 + _globals['_DELETEPLACEALIASREQUEST']._serialized_end=2572 + _globals['_DELETEPLACEALIASRESPONSE']._serialized_start=2574 + _globals['_DELETEPLACEALIASRESPONSE']._serialized_end=2600 + _globals['_SETPLACETAGSREQUEST']._serialized_start=2603 + _globals['_SETPLACETAGSREQUEST']._serialized_end=2742 + _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_start=2233 + _globals['_SETPLACETAGSREQUEST_TAGSENTRY']._serialized_end=2276 + _globals['_SETPLACETAGSRESPONSE']._serialized_start=2744 + _globals['_SETPLACETAGSRESPONSE']._serialized_end=2766 + _globals['_SETPLACECOMMENTREQUEST']._serialized_start=2768 + _globals['_SETPLACECOMMENTREQUEST']._serialized_end=2828 + _globals['_SETPLACECOMMENTRESPONSE']._serialized_start=2830 + _globals['_SETPLACECOMMENTRESPONSE']._serialized_end=2855 + _globals['_ADDPLACEMATCHREQUEST']._serialized_start=2857 + _globals['_ADDPLACEMATCHREQUEST']._serialized_end=2947 + _globals['_ADDPLACEMATCHRESPONSE']._serialized_start=2949 + _globals['_ADDPLACEMATCHRESPONSE']._serialized_end=2972 + _globals['_DELETEPLACEMATCHREQUEST']._serialized_start=2974 + _globals['_DELETEPLACEMATCHREQUEST']._serialized_end=3067 + _globals['_DELETEPLACEMATCHRESPONSE']._serialized_start=3069 + _globals['_DELETEPLACEMATCHRESPONSE']._serialized_end=3095 + _globals['_ACQUIREPLACEREQUEST']._serialized_start=3097 + _globals['_ACQUIREPLACEREQUEST']._serialized_end=3137 + _globals['_ACQUIREPLACERESPONSE']._serialized_start=3139 + _globals['_ACQUIREPLACERESPONSE']._serialized_end=3161 + _globals['_RELEASEPLACEREQUEST']._serialized_start=3163 + _globals['_RELEASEPLACEREQUEST']._serialized_end=3239 + _globals['_RELEASEPLACERESPONSE']._serialized_start=3241 + _globals['_RELEASEPLACERESPONSE']._serialized_end=3263 + _globals['_ALLOWPLACEREQUEST']._serialized_start=3265 + _globals['_ALLOWPLACEREQUEST']._serialized_end=3317 + _globals['_ALLOWPLACERESPONSE']._serialized_start=3319 + _globals['_ALLOWPLACERESPONSE']._serialized_end=3339 + _globals['_CREATERESERVATIONREQUEST']._serialized_start=3342 + _globals['_CREATERESERVATIONREQUEST']._serialized_end=3524 + _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._serialized_start=3449 + _globals['_CREATERESERVATIONREQUEST_FILTERSENTRY']._serialized_end=3524 + _globals['_CREATERESERVATIONRESPONSE']._serialized_start=3526 + _globals['_CREATERESERVATIONRESPONSE']._serialized_end=3596 + _globals['_RESERVATION']._serialized_start=3599 + _globals['_RESERVATION']._serialized_end=4060 + _globals['_RESERVATION_FILTER']._serialized_start=3819 + _globals['_RESERVATION_FILTER']._serialized_end=3931 + _globals['_RESERVATION_FILTER_FILTERENTRY']._serialized_start=3886 + _globals['_RESERVATION_FILTER_FILTERENTRY']._serialized_end=3931 + _globals['_RESERVATION_FILTERSENTRY']._serialized_start=3449 + _globals['_RESERVATION_FILTERSENTRY']._serialized_end=3524 + _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_start=4010 + _globals['_RESERVATION_ALLOCATIONSENTRY']._serialized_end=4060 + _globals['_CANCELRESERVATIONREQUEST']._serialized_start=4062 + _globals['_CANCELRESERVATIONREQUEST']._serialized_end=4103 + _globals['_CANCELRESERVATIONRESPONSE']._serialized_start=4105 + _globals['_CANCELRESERVATIONRESPONSE']._serialized_end=4132 + _globals['_POLLRESERVATIONREQUEST']._serialized_start=4134 + _globals['_POLLRESERVATIONREQUEST']._serialized_end=4173 + _globals['_POLLRESERVATIONRESPONSE']._serialized_start=4175 + _globals['_POLLRESERVATIONRESPONSE']._serialized_end=4243 + _globals['_GETRESERVATIONSRESPONSE']._serialized_start=4245 + _globals['_GETRESERVATIONSRESPONSE']._serialized_end=4314 + _globals['_GETRESERVATIONSREQUEST']._serialized_start=4316 + _globals['_GETRESERVATIONSREQUEST']._serialized_end=4340 + _globals['_COORDINATOR']._serialized_start=4343 + _globals['_COORDINATOR']._serialized_end=5833 # @@protoc_insertion_point(module_scope) diff --git a/labgrid/remote/generated/labgrid_coordinator_pb2.pyi b/labgrid/remote/generated/labgrid_coordinator_pb2.pyi index 366f4e438..0754bec8c 100644 --- a/labgrid/remote/generated/labgrid_coordinator_pb2.pyi +++ b/labgrid/remote/generated/labgrid_coordinator_pb2.pyi @@ -109,18 +109,26 @@ class Resource(_message.Message): def __init__(self, path: _Optional[_Union[Resource.Path, _Mapping]] = ..., cls: _Optional[str] = ..., params: _Optional[_Mapping[str, MapValue]] = ..., extra: _Optional[_Mapping[str, MapValue]] = ..., acquired: _Optional[str] = ..., avail: bool = ...) -> None: ... class MapValue(_message.Message): - __slots__ = ("bool_value", "int_value", "uint_value", "float_value", "string_value") + __slots__ = ("bool_value", "int_value", "uint_value", "float_value", "string_value", "array_value") BOOL_VALUE_FIELD_NUMBER: _ClassVar[int] INT_VALUE_FIELD_NUMBER: _ClassVar[int] UINT_VALUE_FIELD_NUMBER: _ClassVar[int] FLOAT_VALUE_FIELD_NUMBER: _ClassVar[int] STRING_VALUE_FIELD_NUMBER: _ClassVar[int] + ARRAY_VALUE_FIELD_NUMBER: _ClassVar[int] bool_value: bool int_value: int uint_value: int float_value: float string_value: str - def __init__(self, bool_value: bool = ..., int_value: _Optional[int] = ..., uint_value: _Optional[int] = ..., float_value: _Optional[float] = ..., string_value: _Optional[str] = ...) -> None: ... + array_value: MapValueArray + def __init__(self, bool_value: bool = ..., int_value: _Optional[int] = ..., uint_value: _Optional[int] = ..., float_value: _Optional[float] = ..., string_value: _Optional[str] = ..., array_value: _Optional[_Union[MapValueArray, _Mapping]] = ...) -> None: ... + +class MapValueArray(_message.Message): + __slots__ = ("values",) + VALUES_FIELD_NUMBER: _ClassVar[int] + values: _containers.RepeatedCompositeFieldContainer[MapValue] + def __init__(self, values: _Optional[_Iterable[_Union[MapValue, _Mapping]]] = ...) -> None: ... class ExporterResponse(_message.Message): __slots__ = ("success", "reason") diff --git a/labgrid/remote/generated/labgrid_coordinator_pb2_grpc.py b/labgrid/remote/generated/labgrid_coordinator_pb2_grpc.py index debfb24f2..ddd612e1b 100644 --- a/labgrid/remote/generated/labgrid_coordinator_pb2_grpc.py +++ b/labgrid/remote/generated/labgrid_coordinator_pb2_grpc.py @@ -1,9 +1,34 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings from . import labgrid_coordinator_pb2 as labgrid__coordinator__pb2 +GRPC_GENERATED_VERSION = '1.64.1' +GRPC_VERSION = grpc.__version__ +EXPECTED_ERROR_RELEASE = '1.65.0' +SCHEDULED_RELEASE_DATE = 'June 25, 2024' +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + warnings.warn( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in labgrid_coordinator_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},' + + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.', + RuntimeWarning + ) + class CoordinatorStub(object): """Missing associated documentation comment in .proto file.""" @@ -18,92 +43,92 @@ def __init__(self, channel): '/labgrid.Coordinator/ClientStream', request_serializer=labgrid__coordinator__pb2.ClientInMessage.SerializeToString, response_deserializer=labgrid__coordinator__pb2.ClientOutMessage.FromString, - ) + _registered_method=True) self.ExporterStream = channel.stream_stream( '/labgrid.Coordinator/ExporterStream', request_serializer=labgrid__coordinator__pb2.ExporterInMessage.SerializeToString, response_deserializer=labgrid__coordinator__pb2.ExporterOutMessage.FromString, - ) + _registered_method=True) self.AddPlace = channel.unary_unary( '/labgrid.Coordinator/AddPlace', request_serializer=labgrid__coordinator__pb2.AddPlaceRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.AddPlaceResponse.FromString, - ) + _registered_method=True) self.DeletePlace = channel.unary_unary( '/labgrid.Coordinator/DeletePlace', request_serializer=labgrid__coordinator__pb2.DeletePlaceRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.DeletePlaceResponse.FromString, - ) + _registered_method=True) self.GetPlaces = channel.unary_unary( '/labgrid.Coordinator/GetPlaces', request_serializer=labgrid__coordinator__pb2.GetPlacesRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.GetPlacesResponse.FromString, - ) + _registered_method=True) self.AddPlaceAlias = channel.unary_unary( '/labgrid.Coordinator/AddPlaceAlias', request_serializer=labgrid__coordinator__pb2.AddPlaceAliasRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.AddPlaceAliasResponse.FromString, - ) + _registered_method=True) self.DeletePlaceAlias = channel.unary_unary( '/labgrid.Coordinator/DeletePlaceAlias', request_serializer=labgrid__coordinator__pb2.DeletePlaceAliasRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.DeletePlaceAliasResponse.FromString, - ) + _registered_method=True) self.SetPlaceTags = channel.unary_unary( '/labgrid.Coordinator/SetPlaceTags', request_serializer=labgrid__coordinator__pb2.SetPlaceTagsRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.SetPlaceTagsResponse.FromString, - ) + _registered_method=True) self.SetPlaceComment = channel.unary_unary( '/labgrid.Coordinator/SetPlaceComment', request_serializer=labgrid__coordinator__pb2.SetPlaceCommentRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.SetPlaceCommentResponse.FromString, - ) + _registered_method=True) self.AddPlaceMatch = channel.unary_unary( '/labgrid.Coordinator/AddPlaceMatch', request_serializer=labgrid__coordinator__pb2.AddPlaceMatchRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.AddPlaceMatchResponse.FromString, - ) + _registered_method=True) self.DeletePlaceMatch = channel.unary_unary( '/labgrid.Coordinator/DeletePlaceMatch', request_serializer=labgrid__coordinator__pb2.DeletePlaceMatchRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.DeletePlaceMatchResponse.FromString, - ) + _registered_method=True) self.AcquirePlace = channel.unary_unary( '/labgrid.Coordinator/AcquirePlace', request_serializer=labgrid__coordinator__pb2.AcquirePlaceRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.AcquirePlaceResponse.FromString, - ) + _registered_method=True) self.ReleasePlace = channel.unary_unary( '/labgrid.Coordinator/ReleasePlace', request_serializer=labgrid__coordinator__pb2.ReleasePlaceRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.ReleasePlaceResponse.FromString, - ) + _registered_method=True) self.AllowPlace = channel.unary_unary( '/labgrid.Coordinator/AllowPlace', request_serializer=labgrid__coordinator__pb2.AllowPlaceRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.AllowPlaceResponse.FromString, - ) + _registered_method=True) self.CreateReservation = channel.unary_unary( '/labgrid.Coordinator/CreateReservation', request_serializer=labgrid__coordinator__pb2.CreateReservationRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.CreateReservationResponse.FromString, - ) + _registered_method=True) self.CancelReservation = channel.unary_unary( '/labgrid.Coordinator/CancelReservation', request_serializer=labgrid__coordinator__pb2.CancelReservationRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.CancelReservationResponse.FromString, - ) + _registered_method=True) self.PollReservation = channel.unary_unary( '/labgrid.Coordinator/PollReservation', request_serializer=labgrid__coordinator__pb2.PollReservationRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.PollReservationResponse.FromString, - ) + _registered_method=True) self.GetReservations = channel.unary_unary( '/labgrid.Coordinator/GetReservations', request_serializer=labgrid__coordinator__pb2.GetReservationsRequest.SerializeToString, response_deserializer=labgrid__coordinator__pb2.GetReservationsResponse.FromString, - ) + _registered_method=True) class CoordinatorServicer(object): @@ -314,6 +339,7 @@ def add_CoordinatorServicer_to_server(servicer, server): generic_handler = grpc.method_handlers_generic_handler( 'labgrid.Coordinator', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('labgrid.Coordinator', rpc_method_handlers) # This class is part of an EXPERIMENTAL API. @@ -331,11 +357,21 @@ def ClientStream(request_iterator, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/labgrid.Coordinator/ClientStream', + return grpc.experimental.stream_stream( + request_iterator, + target, + '/labgrid.Coordinator/ClientStream', labgrid__coordinator__pb2.ClientInMessage.SerializeToString, labgrid__coordinator__pb2.ClientOutMessage.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def ExporterStream(request_iterator, @@ -348,11 +384,21 @@ def ExporterStream(request_iterator, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/labgrid.Coordinator/ExporterStream', + return grpc.experimental.stream_stream( + request_iterator, + target, + '/labgrid.Coordinator/ExporterStream', labgrid__coordinator__pb2.ExporterInMessage.SerializeToString, labgrid__coordinator__pb2.ExporterOutMessage.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def AddPlace(request, @@ -365,11 +411,21 @@ def AddPlace(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/AddPlace', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/AddPlace', labgrid__coordinator__pb2.AddPlaceRequest.SerializeToString, labgrid__coordinator__pb2.AddPlaceResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def DeletePlace(request, @@ -382,11 +438,21 @@ def DeletePlace(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/DeletePlace', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/DeletePlace', labgrid__coordinator__pb2.DeletePlaceRequest.SerializeToString, labgrid__coordinator__pb2.DeletePlaceResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def GetPlaces(request, @@ -399,11 +465,21 @@ def GetPlaces(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/GetPlaces', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/GetPlaces', labgrid__coordinator__pb2.GetPlacesRequest.SerializeToString, labgrid__coordinator__pb2.GetPlacesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def AddPlaceAlias(request, @@ -416,11 +492,21 @@ def AddPlaceAlias(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/AddPlaceAlias', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/AddPlaceAlias', labgrid__coordinator__pb2.AddPlaceAliasRequest.SerializeToString, labgrid__coordinator__pb2.AddPlaceAliasResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def DeletePlaceAlias(request, @@ -433,11 +519,21 @@ def DeletePlaceAlias(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/DeletePlaceAlias', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/DeletePlaceAlias', labgrid__coordinator__pb2.DeletePlaceAliasRequest.SerializeToString, labgrid__coordinator__pb2.DeletePlaceAliasResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def SetPlaceTags(request, @@ -450,11 +546,21 @@ def SetPlaceTags(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/SetPlaceTags', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/SetPlaceTags', labgrid__coordinator__pb2.SetPlaceTagsRequest.SerializeToString, labgrid__coordinator__pb2.SetPlaceTagsResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def SetPlaceComment(request, @@ -467,11 +573,21 @@ def SetPlaceComment(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/SetPlaceComment', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/SetPlaceComment', labgrid__coordinator__pb2.SetPlaceCommentRequest.SerializeToString, labgrid__coordinator__pb2.SetPlaceCommentResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def AddPlaceMatch(request, @@ -484,11 +600,21 @@ def AddPlaceMatch(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/AddPlaceMatch', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/AddPlaceMatch', labgrid__coordinator__pb2.AddPlaceMatchRequest.SerializeToString, labgrid__coordinator__pb2.AddPlaceMatchResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def DeletePlaceMatch(request, @@ -501,11 +627,21 @@ def DeletePlaceMatch(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/DeletePlaceMatch', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/DeletePlaceMatch', labgrid__coordinator__pb2.DeletePlaceMatchRequest.SerializeToString, labgrid__coordinator__pb2.DeletePlaceMatchResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def AcquirePlace(request, @@ -518,11 +654,21 @@ def AcquirePlace(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/AcquirePlace', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/AcquirePlace', labgrid__coordinator__pb2.AcquirePlaceRequest.SerializeToString, labgrid__coordinator__pb2.AcquirePlaceResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def ReleasePlace(request, @@ -535,11 +681,21 @@ def ReleasePlace(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/ReleasePlace', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/ReleasePlace', labgrid__coordinator__pb2.ReleasePlaceRequest.SerializeToString, labgrid__coordinator__pb2.ReleasePlaceResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def AllowPlace(request, @@ -552,11 +708,21 @@ def AllowPlace(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/AllowPlace', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/AllowPlace', labgrid__coordinator__pb2.AllowPlaceRequest.SerializeToString, labgrid__coordinator__pb2.AllowPlaceResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def CreateReservation(request, @@ -569,11 +735,21 @@ def CreateReservation(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/CreateReservation', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/CreateReservation', labgrid__coordinator__pb2.CreateReservationRequest.SerializeToString, labgrid__coordinator__pb2.CreateReservationResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def CancelReservation(request, @@ -586,11 +762,21 @@ def CancelReservation(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/CancelReservation', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/CancelReservation', labgrid__coordinator__pb2.CancelReservationRequest.SerializeToString, labgrid__coordinator__pb2.CancelReservationResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def PollReservation(request, @@ -603,11 +789,21 @@ def PollReservation(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/PollReservation', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/PollReservation', labgrid__coordinator__pb2.PollReservationRequest.SerializeToString, labgrid__coordinator__pb2.PollReservationResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) @staticmethod def GetReservations(request, @@ -620,8 +816,18 @@ def GetReservations(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/labgrid.Coordinator/GetReservations', + return grpc.experimental.unary_unary( + request, + target, + '/labgrid.Coordinator/GetReservations', labgrid__coordinator__pb2.GetReservationsRequest.SerializeToString, labgrid__coordinator__pb2.GetReservationsResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/labgrid/remote/proto/labgrid-coordinator.proto b/labgrid/remote/proto/labgrid-coordinator.proto index e0585f7e1..d697ec038 100644 --- a/labgrid/remote/proto/labgrid-coordinator.proto +++ b/labgrid/remote/proto/labgrid-coordinator.proto @@ -108,10 +108,14 @@ message MapValue { uint64 uint_value = 3; double float_value = 4; string string_value = 5; - // FIXME do we need arrays? + MapValueArray array_value = 6; } }; +message MapValueArray { + repeated MapValue values = 1; +} + message ExporterResponse { bool success = 1; optional string reason = 2; diff --git a/tests/test_pb2.py b/tests/test_pb2.py index d1340ab45..6a7590950 100644 --- a/tests/test_pb2.py +++ b/tests/test_pb2.py @@ -125,6 +125,7 @@ def test_resource_dict(): 'model_id': 2277, 'vendor_id': 1133, 'path': None, + "list": ["one", "two"] } resource = labgrid_coordinator_pb2.Resource() @@ -143,6 +144,7 @@ def test_map_serialize(benchmark): 'model_id': 2277, 'vendor_id': 1133, 'path': None, + "list": ["one", "two"] } def run(): @@ -158,6 +160,7 @@ def test_map_deser(benchmark): 'model_id': 2277, 'vendor_id': 1133, 'path': None, + "list": ["one", "two"] } resource = labgrid_coordinator_pb2.Resource()