From 063ec430d181a07132f5e58147370cf3b6c2270b Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Tue, 8 Dec 2020 13:48:51 +0300 Subject: [PATCH] [#86] Clarify that Attributes can't have empty values In case there is a need to set flag-like attributes, the value should be set to something like `true` or `1`. Signed-off-by: Stanislav Bogatyrev --- container/types.proto | 6 ++++-- netmap/types.proto | 3 +++ object/types.proto | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/container/types.proto b/container/types.proto index 2de3713..b098680 100644 --- a/container/types.proto +++ b/container/types.proto @@ -28,8 +28,10 @@ message Container { uint32 basic_acl = 4 [json_name = "basicACL"]; // `Attribute` is a user-defined Key-Value metadata pair attached to the - // container. Container attribute are immutable. They are set at container - // creation and cna never be added or updated. + // container. Container attributes are immutable. They are set at container + // creation and can never be added or updated. + // + // Key name must be a valid UTF-8 string. Value can't be empty. // // There are some "well-known" attributes affecting system behaviour: // diff --git a/netmap/types.proto b/netmap/types.proto index d15342b..d470bb5 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -131,6 +131,9 @@ message NodeInfo { // Administrator-defined Attributes of the NeoFS Storage Node. // + // `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8 + // string. Value can't be empty. + // // Node's attributes are mostly used during Storage Policy evaluation to // calculate object's placement and find a set of nodes satisfying policy // requirements. There are some "well-known" node attributes common to all the diff --git a/object/types.proto b/object/types.proto index f8119ca..6c4eb56 100644 --- a/object/types.proto +++ b/object/types.proto @@ -86,6 +86,8 @@ message Header { // `Attribute` is a user-defined Key-Value metadata pair attached to the // object. // + // Key name must be a valid UTF-8 string. Value can't be empty. + // // There are some "well-known" attributes starting with `__NEOFS__` prefix // that affect system behaviour: //