diff --git a/cs3/admin/v1beta1/admin_api.proto b/cs3/admin/v1beta1/admin_api.proto new file mode 100644 index 00000000..2bca2cf1 --- /dev/null +++ b/cs3/admin/v1beta1/admin_api.proto @@ -0,0 +1,92 @@ +// Copyright 2020 CERN +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// In applying this license, CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +syntax = "proto3"; + +package cs3.admin.v1beta1; + +option csharp_namespace = "Cs3.Admin.V1Beta1"; +option go_package = "adminv1beta1"; +option java_multiple_files = true; +option java_outer_classname = "AdminApiProto"; +option java_package = "com.cs3.admin.v1beta1"; +option objc_class_prefix = "CAX"; +option php_namespace = "Cs3\\Admin\\V1Beta1"; + +import "cs3/identity/user/v1beta1/resources.proto"; +import "cs3/rpc/v1beta1/status.proto"; +import "cs3/types/v1beta1/types.proto"; + +// Admin API +// +// The Admin API is meant to be used to execute administrative tasks +// for users. +// +// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL +// NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and +// "OPTIONAL" in this document are to be interpreted as described in +// RFC 2119. +// +// The following are global requirements that apply to all methods: +// Any method MUST return CODE_OK on a succesful operation. +// Any method MAY return NOT_IMPLEMENTED. +// Any method MAY return INTERNAL. +// Any method MAY return UNKNOWN. +// Any method MAY return UNAUTHENTICATED. +service AdminAPI { + // Provisions a user. + rpc ProvisionUser(ProvisionUserRequest) returns (ProvisionUserResponse); + // Deprovisions a user. + rpc DeprovisionUser(DeprovisionUserRequest) returns (DeprovisionUserResponse); +} + +message ProvisionUserRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The user for which the action should be performed. + cs3.identity.user.v1beta1.User user = 2; +} + +message ProvisionUserResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; +} + +message DeprovisionUserRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The user for which the action should be performed. + cs3.identity.user.v1beta1.User user = 2; +} + +message DeprovisionUserResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; +} diff --git a/cs3/storage/provider/v1beta1/provider_api.proto b/cs3/storage/provider/v1beta1/provider_api.proto index f07b8b57..cdf46371 100644 --- a/cs3/storage/provider/v1beta1/provider_api.proto +++ b/cs3/storage/provider/v1beta1/provider_api.proto @@ -28,6 +28,7 @@ option java_package = "com.cs3.storage.provider.v1beta1"; option objc_class_prefix = "CSP"; option php_namespace = "Cs3\\Storage\\Provider\\V1Beta1"; +import "cs3/identity/user/v1beta1/resources.proto"; import "cs3/rpc/v1beta1/status.proto"; import "cs3/storage/provider/v1beta1/resources.proto"; import "cs3/types/v1beta1/types.proto"; @@ -144,6 +145,10 @@ service ProviderAPI { rpc CreateHome(CreateHomeRequest) returns (CreateHomeResponse); // Gets the home path for the user. rpc GetHome(GetHomeRequest) returns (GetHomeResponse); + // Provisions the storage for a user. + rpc ProvisionStorage(ProvisionStorageRequest) returns (ProvisionStorageResponse); + // Deprovisions the storage for a user. + rpc DeprovisionStorage(DeprovisionStorageRequest) returns (DeprovisionStorageResponse); } message GetHomeRequest { @@ -709,3 +714,45 @@ message CreateHomeResponse { // Opaque information. cs3.types.v1beta1.Opaque opaque = 2; } + +message ProvisionStorageRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The owner of the storage. + cs3.identity.user.v1beta1.User owner = 2; + // REQUIRED. + // The bytes quota for the user. + uint64 quota_max_bytes = 3; + // REQUIRED. + // The files quota for the user. + uint64 quota_max_files = 4; +} + +message ProvisionStorageResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; +} + +message DeprovisionStorageRequest { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The owner of the storage. + cs3.identity.user.v1beta1.UserId owner = 2; +} + +message DeprovisionStorageResponse { + // OPTIONAL. + // Opaque information. + cs3.types.v1beta1.Opaque opaque = 1; + // REQUIRED. + // The response status. + cs3.rpc.v1beta1.Status status = 2; +} diff --git a/docs/index.html b/docs/index.html index 6cefdc13..eb6148ed 100644 --- a/docs/index.html +++ b/docs/index.html @@ -174,6 +174,37 @@
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
user | +cs3.identity.user.v1beta1.User | ++ | REQUIRED. +The user for which the action should be performed. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
user | +cs3.identity.user.v1beta1.User | ++ | REQUIRED. +The user for which the action should be performed. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
Admin API
The Admin API is meant to be used to execute administrative tasks
for users.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
RFC 2119.
The following are global requirements that apply to all methods:
Any method MUST return CODE_OK on a succesful operation.
Any method MAY return NOT_IMPLEMENTED.
Any method MAY return INTERNAL.
Any method MAY return UNKNOWN.
Any method MAY return UNAUTHENTICATED.
+Method Name | Request Type | Response Type | Description |
ProvisionUser | +ProvisionUserRequest | +ProvisionUserResponse | +Provisions a user. |
+
DeprovisionUser | +DeprovisionUserRequest | +DeprovisionUserResponse | +Deprovisions a user. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
owner | +cs3.identity.user.v1beta1.UserId | ++ | REQUIRED. +The owner of the storage. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
owner | +cs3.identity.user.v1beta1.User | ++ | REQUIRED. +The owner of the storage. |
+
quota_max_bytes | +uint64 | ++ | REQUIRED. +The bytes quota for the user. |
+
quota_max_files | +uint64 | ++ | REQUIRED. +The files quota for the user. |
+
Field | Type | Label | Description |
opaque | +cs3.types.v1beta1.Opaque | ++ | OPTIONAL. +Opaque information. |
+
status | +cs3.rpc.v1beta1.Status | ++ | REQUIRED. +The response status. |
+
Gets the home path for the user.
Provisions the storage for a user.
Deprovisions the storage for a user.