From c1c66fddf7460d7d8815c02726cd4a10f8957edd Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Wed, 17 Mar 2021 15:41:23 +0100 Subject: [PATCH] Match multiple storage providers in registry --- cs3/gateway/v1beta1/resources.proto | 1 - cs3/ocm/invite/v1beta1/resources.proto | 1 - .../registry/v1beta1/registry_api.proto | 10 +++--- docs/index.html | 20 +++++------ proto.lock | 36 ++++++++++++------- 5 files changed, 38 insertions(+), 30 deletions(-) diff --git a/cs3/gateway/v1beta1/resources.proto b/cs3/gateway/v1beta1/resources.proto index a10ed69e..2cf2edba 100644 --- a/cs3/gateway/v1beta1/resources.proto +++ b/cs3/gateway/v1beta1/resources.proto @@ -28,7 +28,6 @@ option java_package = "com.cs3.gateway.v1beta1"; option objc_class_prefix = "CGX"; option php_namespace = "Cs3\\Gateway\\V1Beta1"; -import "cs3/rpc/v1beta1/status.proto"; import "cs3/storage/provider/v1beta1/resources.proto"; import "cs3/types/v1beta1/types.proto"; diff --git a/cs3/ocm/invite/v1beta1/resources.proto b/cs3/ocm/invite/v1beta1/resources.proto index dbe282c0..398f470b 100644 --- a/cs3/ocm/invite/v1beta1/resources.proto +++ b/cs3/ocm/invite/v1beta1/resources.proto @@ -29,7 +29,6 @@ option objc_class_prefix = "COI"; option php_namespace = "Cs3\\Ocm\\Invite\\V1Beta1"; import "cs3/identity/user/v1beta1/resources.proto"; -import "cs3/storage/provider/v1beta1/resources.proto"; import "cs3/types/v1beta1/types.proto"; // InviteToken is used to invite users and groups from other sync'n'share diff --git a/cs3/storage/registry/v1beta1/registry_api.proto b/cs3/storage/registry/v1beta1/registry_api.proto index d743b05b..db918765 100644 --- a/cs3/storage/registry/v1beta1/registry_api.proto +++ b/cs3/storage/registry/v1beta1/registry_api.proto @@ -53,7 +53,7 @@ service RegistryAPI { // Returns the storage provider that is reponsible for the given // resource reference. // MUST return CODE_NOT_FOUND if the reference does not exist. - rpc GetStorageProvider(GetStorageProviderRequest) returns (GetStorageProviderResponse); + rpc GetStorageProviders(GetStorageProvidersRequest) returns (GetStorageProvidersResponse); // Returns a list of the available storage providers known by this registry. rpc ListStorageProviders(ListStorageProvidersRequest) returns (ListStorageProvidersResponse); // Gets the user home storage provider. @@ -81,7 +81,7 @@ message GetHomeResponse { cs3.storage.registry.v1beta1.ProviderInfo provider = 3; } -message GetStorageProviderRequest { +message GetStorageProvidersRequest { // OPTIONAL. // Opaque information. cs3.types.v1beta1.Opaque opaque = 1; @@ -90,7 +90,7 @@ message GetStorageProviderRequest { cs3.storage.provider.v1beta1.Reference ref = 2; } -message GetStorageProviderResponse { +message GetStorageProvidersResponse { // REQUIRED. // The response status. cs3.rpc.v1beta1.Status status = 1; @@ -98,8 +98,8 @@ message GetStorageProviderResponse { // Opaque information. cs3.types.v1beta1.Opaque opaque = 2; // REQUIRED. - // The storage provider handling the requested storage resource. - cs3.storage.registry.v1beta1.ProviderInfo provider = 3; + // The storage providers handling the requested storage resource. + repeated cs3.storage.registry.v1beta1.ProviderInfo providers = 3; } message ListStorageProvidersRequest { diff --git a/docs/index.html b/docs/index.html index d082755c..47db8e25 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1635,11 +1635,11 @@

Table of Contents

  • - MGetStorageProviderRequest + MGetStorageProvidersRequest
  • - MGetStorageProviderResponse + MGetStorageProvidersResponse
  • @@ -14353,7 +14353,7 @@

    GetHomeResponse

    -

    GetStorageProviderRequest

    +

    GetStorageProvidersRequest

    @@ -14386,7 +14386,7 @@

    GetStorageProvid -

    GetStorageProviderResponse

    +

    GetStorageProvidersResponse

    @@ -14413,11 +14413,11 @@

    GetStorageProvi - provider + providers ProviderInfo - + repeated

    REQUIRED. -The storage provider handling the requested storage resource.

    +The storage providers handling the requested storage resource.

    @@ -14510,9 +14510,9 @@

    RegistryAPI

    - GetStorageProvider - GetStorageProviderRequest - GetStorageProviderResponse + GetStorageProviders + GetStorageProvidersRequest + GetStorageProvidersResponse

    Returns the storage provider that is reponsible for the given resource reference. MUST return CODE_NOT_FOUND if the reference does not exist.

    diff --git a/proto.lock b/proto.lock index 0a23fe36..7a236817 100644 --- a/proto.lock +++ b/proto.lock @@ -1461,9 +1461,6 @@ } ], "imports": [ - { - "path": "cs3/rpc/v1beta1/status.proto" - }, { "path": "cs3/storage/provider/v1beta1/resources.proto" }, @@ -2709,9 +2706,6 @@ { "path": "cs3/identity/user/v1beta1/resources.proto" }, - { - "path": "cs3/storage/provider/v1beta1/resources.proto" - }, { "path": "cs3/types/v1beta1/types.proto" } @@ -4344,6 +4338,11 @@ "id": 3, "name": "share", "type": "PublicShare" + }, + { + "id": 4, + "name": "password_hash", + "type": "string" } ] }, @@ -4384,6 +4383,11 @@ "id": 3, "name": "share", "type": "PublicShare" + }, + { + "id": 4, + "name": "password_hash", + "type": "string" } ] } @@ -7089,6 +7093,11 @@ "id": 5, "name": "mtime", "type": "uint64" + }, + { + "id": 6, + "name": "etag", + "type": "string" } ] }, @@ -7340,7 +7349,7 @@ ] }, { - "name": "GetStorageProviderRequest", + "name": "GetStorageProvidersRequest", "fields": [ { "id": 1, @@ -7355,7 +7364,7 @@ ] }, { - "name": "GetStorageProviderResponse", + "name": "GetStorageProvidersResponse", "fields": [ { "id": 1, @@ -7369,8 +7378,9 @@ }, { "id": 3, - "name": "provider", - "type": "cs3.storage.registry.v1beta1.ProviderInfo" + "name": "providers", + "type": "cs3.storage.registry.v1beta1.ProviderInfo", + "is_repeated": true } ] }, @@ -7411,9 +7421,9 @@ "name": "RegistryAPI", "rpcs": [ { - "name": "GetStorageProvider", - "in_type": "GetStorageProviderRequest", - "out_type": "GetStorageProviderResponse" + "name": "GetStorageProviders", + "in_type": "GetStorageProvidersRequest", + "out_type": "GetStorageProvidersResponse" }, { "name": "ListStorageProviders",