Skip to content

Commit

Permalink
proto tweak: nsid message and field clash when mapped to C++
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Indenbaum <[email protected]>
  • Loading branch information
Alexander Indenbaum committed Nov 7, 2023
1 parent 643879a commit d8287ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions control/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions control/proto/gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -126,7 +126,7 @@ message req_status {
bool status = 1;
}

message nsid {
message nsid_status {
int32 nsid = 1;
bool status = 2;
}
Expand Down

0 comments on commit d8287ee

Please sign in to comment.