Skip to content

Commit

Permalink
spdkrpc: Add snapshot purge APIs
Browse files Browse the repository at this point in the history
Longhorn 7199

Signed-off-by: Shuo Wu <[email protected]>
  • Loading branch information
shuo-wu authored and derekbit committed Jul 25, 2024
1 parent 56701c9 commit 473d671
Show file tree
Hide file tree
Showing 5 changed files with 493 additions and 338 deletions.
4 changes: 2 additions & 2 deletions generated-py/spdkrpc/spdk_pb2.py

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions generated-py/spdkrpc/spdk_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def __init__(self, channel):
request_serializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ReplicaSnapshotPurge = channel.unary_unary(
'/spdkrpc.SPDKService/ReplicaSnapshotPurge',
request_serializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ReplicaList = channel.unary_unary(
'/spdkrpc.SPDKService/ReplicaList',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
Expand Down Expand Up @@ -185,6 +190,11 @@ def __init__(self, channel):
request_serializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.EngineSnapshotPurge = channel.unary_unary(
'/spdkrpc.SPDKService/EngineSnapshotPurge',
request_serializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.EngineList = channel.unary_unary(
'/spdkrpc.SPDKService/EngineList',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
Expand Down Expand Up @@ -316,6 +326,12 @@ def ReplicaSnapshotRevert(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ReplicaSnapshotPurge(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def ReplicaList(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand Down Expand Up @@ -484,6 +500,12 @@ def EngineSnapshotRevert(self, request, context):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def EngineSnapshotPurge(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')

def EngineList(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
Expand Down Expand Up @@ -625,6 +647,11 @@ def add_SPDKServiceServicer_to_server(servicer, server):
request_deserializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ReplicaSnapshotPurge': grpc.unary_unary_rpc_method_handler(
servicer.ReplicaSnapshotPurge,
request_deserializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ReplicaList': grpc.unary_unary_rpc_method_handler(
servicer.ReplicaList,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
Expand Down Expand Up @@ -765,6 +792,11 @@ def add_SPDKServiceServicer_to_server(servicer, server):
request_deserializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'EngineSnapshotPurge': grpc.unary_unary_rpc_method_handler(
servicer.EngineSnapshotPurge,
request_deserializer=spdkrpc_dot_spdk__pb2.SnapshotRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'EngineList': grpc.unary_unary_rpc_method_handler(
servicer.EngineList,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
Expand Down Expand Up @@ -967,6 +999,23 @@ def ReplicaSnapshotRevert(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ReplicaSnapshotPurge(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/spdkrpc.SPDKService/ReplicaSnapshotPurge',
spdkrpc_dot_spdk__pb2.SnapshotRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def ReplicaList(request,
target,
Expand Down Expand Up @@ -1443,6 +1492,23 @@ def EngineSnapshotRevert(request,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def EngineSnapshotPurge(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/spdkrpc.SPDKService/EngineSnapshotPurge',
spdkrpc_dot_spdk__pb2.SnapshotRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

@staticmethod
def EngineList(request,
target,
Expand Down
Loading

0 comments on commit 473d671

Please sign in to comment.