From d8287ee9c5642029030d7c47f20fad52b7fefbd0 Mon Sep 17 00:00:00 2001 From: Alexander Indenbaum Date: Wed, 8 Nov 2023 00:14:28 +0200 Subject: [PATCH] proto tweak: nsid message and field clash when mapped to C++ Signed-off-by: Alexander Indenbaum --- control/grpc.py | 4 ++-- control/proto/gateway.proto | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/control/grpc.py b/control/grpc.py index 782089dc8..aa25dce31 100644 --- a/control/grpc.py +++ b/control/grpc.py @@ -397,7 +397,7 @@ def add_namespace_safe(self, request, context=None): if context: context.set_code(grpc.StatusCode.INTERNAL) context.set_details(f"{ex}") - return pb2.nsid() + return pb2.nsid_status() if context: # Update gateway state @@ -413,7 +413,7 @@ def add_namespace_safe(self, request, context=None): f"Error persisting add_namespace {nsid}: {ex}") raise - return pb2.nsid(nsid=nsid, status=True) + return pb2.nsid_status(nsid=nsid, status=True) def add_namespace(self, request, context=None): with self.rpc_lock: diff --git a/control/proto/gateway.proto b/control/proto/gateway.proto index 0fdd72dae..83feb6dc2 100644 --- a/control/proto/gateway.proto +++ b/control/proto/gateway.proto @@ -24,7 +24,7 @@ service Gateway { rpc delete_subsystem(delete_subsystem_req) returns(req_status) {} // Adds a namespace to a subsystem - rpc add_namespace(add_namespace_req) returns(nsid) {} + rpc add_namespace(add_namespace_req) returns(nsid_status) {} // Removes a namespace from a subsystem rpc remove_namespace(remove_namespace_req) returns(req_status) {} @@ -76,7 +76,7 @@ message add_namespace_req { string subsystem_nqn = 1; string bdev_name = 2; optional int32 nsid = 3; - optional int32 anagrpid = 4; + optional int32 anagrpid = 4; } message remove_namespace_req { @@ -126,7 +126,7 @@ message req_status { bool status = 1; } -message nsid { +message nsid_status { int32 nsid = 1; bool status = 2; }