From 879338194afa31aa96bbaed4d05885857e4564fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Fri, 28 Aug 2020 11:15:49 +0200 Subject: [PATCH] storage provider: add CreateSymlink MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- cs3/gateway/v1beta1/gateway_api.proto | 2 ++ .../provider/v1beta1/provider_api.proto | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/cs3/gateway/v1beta1/gateway_api.proto b/cs3/gateway/v1beta1/gateway_api.proto index 0e486338..51e162ca 100644 --- a/cs3/gateway/v1beta1/gateway_api.proto +++ b/cs3/gateway/v1beta1/gateway_api.proto @@ -140,6 +140,8 @@ service GatewayAPI { // Returns the resource information at the provided reference. // MUST return CODE_NOT_FOUND if the reference does not exist. rpc Stat(cs3.storage.provider.v1beta1.StatRequest) returns (cs3.storage.provider.v1beta1.StatResponse); + // Creates a symlink to another resource. + rpc CreateSymlink(cs3.storage.provider.v1beta1.CreateSymlinkRequest) returns (cs3.storage.provider.v1beta1.CreateSymlinkResponse); // Sets arbitrary metadata into a storage resource. // Arbitrary metadata is returned in a cs3.storage.provider.v1beta1.ResourceInfo. rpc SetArbitraryMetadata(cs3.storage.provider.v1beta1.SetArbitraryMetadataRequest) returns (cs3.storage.provider.v1beta1.SetArbitraryMetadataResponse); diff --git a/cs3/storage/provider/v1beta1/provider_api.proto b/cs3/storage/provider/v1beta1/provider_api.proto index 436b4c21..0302bd31 100644 --- a/cs3/storage/provider/v1beta1/provider_api.proto +++ b/cs3/storage/provider/v1beta1/provider_api.proto @@ -129,6 +129,8 @@ service ProviderAPI { // MUST return CODE_NOT_FOUND if the reference does not exist. // MUST return CODE_PRECONDITION_FAILED if the acl does not exist. rpc UpdateGrant(UpdateGrantRequest) returns (UpdateGrantResponse); + // Creates a symlink to another resource. + rpc CreateSymlink(CreateSymlinkRequest) returns (CreateSymlinkResponse); // Creates a reference to another resource in the same cluster or another domain (OCM shares). // The references resource can be accessed by the protocol specificied in the request message. rpc CreateReference(CreateReferenceRequest) returns (CreateReferenceResponse); @@ -623,6 +625,27 @@ message UpdateGrantResponse { cs3.types.v1beta1.Opaque opaque = 2; } +message CreateSymlinkRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The location where to store the symlink. + string path = 2; + // REQUIRED. + // The link target can hold arbitrary text; if later resolved, + // a relative link is interpreted in relation to its parent directory + string target = 3; +} + +message CreateSymlinkResponse { + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 1; + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 2; +} message CreateReferenceRequest { // OPTIONAL. // Opaque information.