[#25] subnet: Drop fields and types

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-17 10:32:18 +03:00
parent b5be17014e
commit 7f59b8aaeb
9 changed files with 93 additions and 229 deletions

View file

@ -8,6 +8,7 @@
### Removed ### Removed
- Reputation system (#22) - Reputation system (#22)
- All `subnet` related fields and types (#25)
## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島)

View file

@ -37,10 +37,6 @@ message Container {
// //
// There are some "well-known" attributes affecting system behaviour: // There are some "well-known" attributes affecting system behaviour:
// //
// * [ __SYSTEM__SUBNET ] \
// (`__NEOFS__SUBNET` is deprecated) \
// String ID of a container's storage subnet. Any container can be attached to
// one subnet only.
// * [ __SYSTEM__NAME ] \ // * [ __SYSTEM__NAME ] \
// (`__NEOFS__NAME` is deprecated) \ // (`__NEOFS__NAME` is deprecated) \
// String of a human-friendly container name registered as a domain in // String of a human-friendly container name registered as a domain in

View file

@ -5,8 +5,6 @@ package neo.fs.v2.netmap;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap"; option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap";
option csharp_namespace = "Neo.FileStorage.API.Netmap"; option csharp_namespace = "Neo.FileStorage.API.Netmap";
import "refs/types.proto";
// Operations on filters // Operations on filters
enum Operation { enum Operation {
// No Operation defined // No Operation defined
@ -121,10 +119,6 @@ message PlacementPolicy {
// List of named filters to reference in selectors // List of named filters to reference in selectors
repeated Filter filters = 4 [json_name = "filters"]; repeated Filter filters = 4 [json_name = "filters"];
// Subnetwork ID to select nodes from. Zero subnet (default) represents
// all of the nodes which didn't explicitly opt out of membership.
refs.SubnetID subnet_id = 5 [json_name = "subnetId"];
} }
// NeoFS node description // NeoFS node description
@ -164,14 +158,6 @@ message NodeInfo {
// attributes it's a string presenting floating point number with comma or // attributes it's a string presenting floating point number with comma or
// point delimiter for decimal part. In the Network Map it will be saved as // point delimiter for decimal part. In the Network Map it will be saved as
// 64-bit unsigned integer representing number of minimal token fractions. // 64-bit unsigned integer representing number of minimal token fractions.
// * [ __SYSTEM__SUBNET_%s ] \
// (`__NEOFS__SUBNET_%s` is deprecated) \
// `True` or `False`. Defines if the node is included in the `%s` subnetwork
// or not. `%s` must be an existing subnetwork's ID (non-negative integer number).
// A node can be included in more than one subnetwork and, therefore, can contain
// more than one subnet attribute. A missing attribute is equivalent to the
// presence of the attribute with `False` value (except default zero subnetwork
// (with `%s` == 0) for which missing attribute means inclusion in that network).
// * UN-LOCODE \ // * UN-LOCODE \
// Node's geographic location in // Node's geographic location in
// [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) // [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html)

View file

@ -3,50 +3,50 @@
## Table of Contents ## Table of Contents
- [container/service.proto](#container/service.proto) - [Protocol Documentation](#protocol-documentation)
- Services - [Table of Contents](#table-of-contents)
- [ContainerService](#neo.fs.v2.container.ContainerService) - [container/service.proto](#containerserviceproto)
- [Service "neo.fs.v2.container.ContainerService"](#service-neofsv2containercontainerservice)
- Messages - [Method Put](#method-put)
- [AnnounceUsedSpaceRequest](#neo.fs.v2.container.AnnounceUsedSpaceRequest) - [Method Delete](#method-delete)
- [AnnounceUsedSpaceRequest.Body](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body) - [Method Get](#method-get)
- [AnnounceUsedSpaceRequest.Body.Announcement](#neo.fs.v2.container.AnnounceUsedSpaceRequest.Body.Announcement) - [Method List](#method-list)
- [AnnounceUsedSpaceResponse](#neo.fs.v2.container.AnnounceUsedSpaceResponse) - [Method SetExtendedACL](#method-setextendedacl)
- [AnnounceUsedSpaceResponse.Body](#neo.fs.v2.container.AnnounceUsedSpaceResponse.Body) - [Method GetExtendedACL](#method-getextendedacl)
- [DeleteRequest](#neo.fs.v2.container.DeleteRequest) - [Method AnnounceUsedSpace](#method-announceusedspace)
- [DeleteRequest.Body](#neo.fs.v2.container.DeleteRequest.Body) - [Message AnnounceUsedSpaceRequest](#message-announceusedspacerequest)
- [DeleteResponse](#neo.fs.v2.container.DeleteResponse) - [Message AnnounceUsedSpaceRequest.Body](#message-announceusedspacerequestbody)
- [DeleteResponse.Body](#neo.fs.v2.container.DeleteResponse.Body) - [Message AnnounceUsedSpaceRequest.Body.Announcement](#message-announceusedspacerequestbodyannouncement)
- [GetExtendedACLRequest](#neo.fs.v2.container.GetExtendedACLRequest) - [Message AnnounceUsedSpaceResponse](#message-announceusedspaceresponse)
- [GetExtendedACLRequest.Body](#neo.fs.v2.container.GetExtendedACLRequest.Body) - [Message AnnounceUsedSpaceResponse.Body](#message-announceusedspaceresponsebody)
- [GetExtendedACLResponse](#neo.fs.v2.container.GetExtendedACLResponse) - [Message DeleteRequest](#message-deleterequest)
- [GetExtendedACLResponse.Body](#neo.fs.v2.container.GetExtendedACLResponse.Body) - [Message DeleteRequest.Body](#message-deleterequestbody)
- [GetRequest](#neo.fs.v2.container.GetRequest) - [Message DeleteResponse](#message-deleteresponse)
- [GetRequest.Body](#neo.fs.v2.container.GetRequest.Body) - [Message DeleteResponse.Body](#message-deleteresponsebody)
- [GetResponse](#neo.fs.v2.container.GetResponse) - [Message GetExtendedACLRequest](#message-getextendedaclrequest)
- [GetResponse.Body](#neo.fs.v2.container.GetResponse.Body) - [Message GetExtendedACLRequest.Body](#message-getextendedaclrequestbody)
- [ListRequest](#neo.fs.v2.container.ListRequest) - [Message GetExtendedACLResponse](#message-getextendedaclresponse)
- [ListRequest.Body](#neo.fs.v2.container.ListRequest.Body) - [Message GetExtendedACLResponse.Body](#message-getextendedaclresponsebody)
- [ListResponse](#neo.fs.v2.container.ListResponse) - [Message GetRequest](#message-getrequest)
- [ListResponse.Body](#neo.fs.v2.container.ListResponse.Body) - [Message GetRequest.Body](#message-getrequestbody)
- [PutRequest](#neo.fs.v2.container.PutRequest) - [Message GetResponse](#message-getresponse)
- [PutRequest.Body](#neo.fs.v2.container.PutRequest.Body) - [Message GetResponse.Body](#message-getresponsebody)
- [PutResponse](#neo.fs.v2.container.PutResponse) - [Message ListRequest](#message-listrequest)
- [PutResponse.Body](#neo.fs.v2.container.PutResponse.Body) - [Message ListRequest.Body](#message-listrequestbody)
- [SetExtendedACLRequest](#neo.fs.v2.container.SetExtendedACLRequest) - [Message ListResponse](#message-listresponse)
- [SetExtendedACLRequest.Body](#neo.fs.v2.container.SetExtendedACLRequest.Body) - [Message ListResponse.Body](#message-listresponsebody)
- [SetExtendedACLResponse](#neo.fs.v2.container.SetExtendedACLResponse) - [Message PutRequest](#message-putrequest)
- [SetExtendedACLResponse.Body](#neo.fs.v2.container.SetExtendedACLResponse.Body) - [Message PutRequest.Body](#message-putrequestbody)
- [Message PutResponse](#message-putresponse)
- [Message PutResponse.Body](#message-putresponsebody)
- [container/types.proto](#container/types.proto) - [Message SetExtendedACLRequest](#message-setextendedaclrequest)
- [Message SetExtendedACLRequest.Body](#message-setextendedaclrequestbody)
- Messages - [Message SetExtendedACLResponse](#message-setextendedaclresponse)
- [Container](#neo.fs.v2.container.Container) - [Message SetExtendedACLResponse.Body](#message-setextendedaclresponsebody)
- [Container.Attribute](#neo.fs.v2.container.Container.Attribute) - [container/types.proto](#containertypesproto)
- [Message Container](#message-container)
- [Message Container.Attribute](#message-containerattribute)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
@ -587,10 +587,6 @@ values will be considered invalid.
There are some "well-known" attributes affecting system behaviour: There are some "well-known" attributes affecting system behaviour:
* [ __SYSTEM__SUBNET ] \
(`__NEOFS__SUBNET` is deprecated) \
String ID of a container's storage subnet. Any container can be attached to
one subnet only.
* [ __SYSTEM__NAME ] \ * [ __SYSTEM__NAME ] \
(`__NEOFS__NAME` is deprecated) \ (`__NEOFS__NAME` is deprecated) \
String of a human-friendly container name registered as a domain in String of a human-friendly container name registered as a domain in

View file

@ -3,41 +3,40 @@
## Table of Contents ## Table of Contents
- [netmap/service.proto](#netmap/service.proto) - [Protocol Documentation](#protocol-documentation)
- Services - [Table of Contents](#table-of-contents)
- [NetmapService](#neo.fs.v2.netmap.NetmapService) - [netmap/service.proto](#netmapserviceproto)
- [Service "neo.fs.v2.netmap.NetmapService"](#service-neofsv2netmapnetmapservice)
- Messages - [Method LocalNodeInfo](#method-localnodeinfo)
- [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) - [Method NetworkInfo](#method-networkinfo)
- [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body) - [Method NetmapSnapshot](#method-netmapsnapshot)
- [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) - [Message LocalNodeInfoRequest](#message-localnodeinforequest)
- [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) - [Message LocalNodeInfoRequest.Body](#message-localnodeinforequestbody)
- [NetmapSnapshotRequest](#neo.fs.v2.netmap.NetmapSnapshotRequest) - [Message LocalNodeInfoResponse](#message-localnodeinforesponse)
- [NetmapSnapshotRequest.Body](#neo.fs.v2.netmap.NetmapSnapshotRequest.Body) - [Message LocalNodeInfoResponse.Body](#message-localnodeinforesponsebody)
- [NetmapSnapshotResponse](#neo.fs.v2.netmap.NetmapSnapshotResponse) - [Message NetmapSnapshotRequest](#message-netmapsnapshotrequest)
- [NetmapSnapshotResponse.Body](#neo.fs.v2.netmap.NetmapSnapshotResponse.Body) - [Message NetmapSnapshotRequest.Body](#message-netmapsnapshotrequestbody)
- [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) - [Message NetmapSnapshotResponse](#message-netmapsnapshotresponse)
- [NetworkInfoRequest.Body](#neo.fs.v2.netmap.NetworkInfoRequest.Body) - [Message NetmapSnapshotResponse.Body](#message-netmapsnapshotresponsebody)
- [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) - [Message NetworkInfoRequest](#message-networkinforequest)
- [NetworkInfoResponse.Body](#neo.fs.v2.netmap.NetworkInfoResponse.Body) - [Message NetworkInfoRequest.Body](#message-networkinforequestbody)
- [Message NetworkInfoResponse](#message-networkinforesponse)
- [Message NetworkInfoResponse.Body](#message-networkinforesponsebody)
- [netmap/types.proto](#netmap/types.proto) - [netmap/types.proto](#netmaptypesproto)
- [Message Filter](#message-filter)
- Messages - [Message Netmap](#message-netmap)
- [Filter](#neo.fs.v2.netmap.Filter) - [Message NetworkConfig](#message-networkconfig)
- [Netmap](#neo.fs.v2.netmap.Netmap) - [Message NetworkConfig.Parameter](#message-networkconfigparameter)
- [NetworkConfig](#neo.fs.v2.netmap.NetworkConfig) - [Message NetworkInfo](#message-networkinfo)
- [NetworkConfig.Parameter](#neo.fs.v2.netmap.NetworkConfig.Parameter) - [Message NodeInfo](#message-nodeinfo)
- [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) - [Message NodeInfo.Attribute](#message-nodeinfoattribute)
- [NodeInfo](#neo.fs.v2.netmap.NodeInfo) - [Message PlacementPolicy](#message-placementpolicy)
- [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) - [Message Replica](#message-replica)
- [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) - [Message Selector](#message-selector)
- [Replica](#neo.fs.v2.netmap.Replica) - [Clause](#clause)
- [Selector](#neo.fs.v2.netmap.Selector) - [NodeInfo.State](#nodeinfostate)
- [Operation](#operation)
- [Scalar Value Types](#scalar-value-types)
- [Scalar Value Types](#scalar-value-types)
@ -399,14 +398,6 @@ explicitly set:
attributes it's a string presenting floating point number with comma or attributes it's a string presenting floating point number with comma or
point delimiter for decimal part. In the Network Map it will be saved as point delimiter for decimal part. In the Network Map it will be saved as
64-bit unsigned integer representing number of minimal token fractions. 64-bit unsigned integer representing number of minimal token fractions.
* [ __SYSTEM__SUBNET_%s ] \
(`__NEOFS__SUBNET_%s` is deprecated) \
`True` or `False`. Defines if the node is included in the `%s` subnetwork
or not. `%s` must be an existing subnetwork's ID (non-negative integer number).
A node can be included in more than one subnetwork and, therefore, can contain
more than one subnet attribute. A missing attribute is equivalent to the
presence of the attribute with `False` value (except default zero subnetwork
(with `%s` == 0) for which missing attribute means inclusion in that network).
* UN-LOCODE \ * UN-LOCODE \
Node's geographic location in Node's geographic location in
[UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html)
@ -468,7 +459,6 @@ storage policy definition languages.
| container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS will search for nodes alternatives to include into container's nodes subset | | container_backup_factor | [uint32](#uint32) | | Container backup factor controls how deep NeoFS will search for nodes alternatives to include into container's nodes subset |
| selectors | [Selector](#neo.fs.v2.netmap.Selector) | repeated | Set of Selectors to form the container's nodes subset | | selectors | [Selector](#neo.fs.v2.netmap.Selector) | repeated | Set of Selectors to form the container's nodes subset |
| filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of named filters to reference in selectors | | filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of named filters to reference in selectors |
| subnet_id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | Subnetwork ID to select nodes from. Zero subnet (default) represents all of the nodes which didn't explicitly opt out of membership. |
<a name="neo.fs.v2.netmap.Replica"></a> <a name="neo.fs.v2.netmap.Replica"></a>

View file

@ -3,21 +3,20 @@
## Table of Contents ## Table of Contents
- [refs/types.proto](#refs/types.proto) - [Protocol Documentation](#protocol-documentation)
- [Table of Contents](#table-of-contents)
- Messages - [refs/types.proto](#refstypesproto)
- [Address](#neo.fs.v2.refs.Address) - [Message Address](#message-address)
- [Checksum](#neo.fs.v2.refs.Checksum) - [Message Checksum](#message-checksum)
- [ContainerID](#neo.fs.v2.refs.ContainerID) - [Message ContainerID](#message-containerid)
- [ObjectID](#neo.fs.v2.refs.ObjectID) - [Message ObjectID](#message-objectid)
- [OwnerID](#neo.fs.v2.refs.OwnerID) - [Message OwnerID](#message-ownerid)
- [Signature](#neo.fs.v2.refs.Signature) - [Message Signature](#message-signature)
- [SignatureRFC6979](#neo.fs.v2.refs.SignatureRFC6979) - [Message SignatureRFC6979](#message-signaturerfc6979)
- [SubnetID](#neo.fs.v2.refs.SubnetID) - [Message Version](#message-version)
- [Version](#neo.fs.v2.refs.Version) - [ChecksumType](#checksumtype)
- [SignatureScheme](#signaturescheme)
- [Scalar Value Types](#scalar-value-types)
- [Scalar Value Types](#scalar-value-types)
@ -164,21 +163,6 @@ RFC 6979 signature.
| sign | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing | | sign | [bytes](#bytes) | | Deterministic ECDSA with SHA-256 hashing |
<a name="neo.fs.v2.refs.SubnetID"></a>
### Message SubnetID
NeoFS subnetwork identifier.
String representation of a value is base-10 integer.
JSON representation is an object containing a single `value` number field.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [fixed32](#fixed32) | | 4-byte integer subnetwork identifier. |
<a name="neo.fs.v2.refs.Version"></a> <a name="neo.fs.v2.refs.Version"></a>
### Message Version ### Message Version

View file

@ -1,61 +0,0 @@
# Protocol Documentation
<a name="top"></a>
## Table of Contents
- [subnet/types.proto](#subnet/types.proto)
- Messages
- [SubnetInfo](#neo.fs.v2.subnet.SubnetInfo)
- [Scalar Value Types](#scalar-value-types)
<a name="subnet/types.proto"></a>
<p align="right"><a href="#top">Top</a></p>
## subnet/types.proto
<!-- end services -->
<a name="neo.fs.v2.subnet.SubnetInfo"></a>
### Message SubnetInfo
NeoFS subnetwork description
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | Unique subnet identifier. Missing ID is equivalent to zero (default subnetwork) ID. |
| owner | [neo.fs.v2.refs.OwnerID](#neo.fs.v2.refs.OwnerID) | | Identifier of the subnetwork owner |
<!-- end messages -->
<!-- end enums -->
## Scalar Value Types
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
| <a name="double" /> double | | double | double | float |
| <a name="float" /> float | | float | float | float |
| <a name="int32" /> int32 | Uses variable-length encoding. Inefficient for encoding negative numbers if your field is likely to have negative values, use sint32 instead. | int32 | int | int |
| <a name="int64" /> int64 | Uses variable-length encoding. Inefficient for encoding negative numbers if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long |
| <a name="uint32" /> uint32 | Uses variable-length encoding. | uint32 | int | int/long |
| <a name="uint64" /> uint64 | Uses variable-length encoding. | uint64 | long | int/long |
| <a name="sint32" /> sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int |
| <a name="sint64" /> sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long |
| <a name="fixed32" /> fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int |
| <a name="fixed64" /> fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long |
| <a name="sfixed32" /> sfixed32 | Always four bytes. | int32 | int | int |
| <a name="sfixed64" /> sfixed64 | Always eight bytes. | int64 | long | int/long |
| <a name="bool" /> bool | | bool | boolean | boolean |
| <a name="string" /> string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode |
| <a name="bytes" /> bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str |

View file

@ -77,16 +77,6 @@ message OwnerID {
bytes value = 1 [json_name = "value"]; bytes value = 1 [json_name = "value"];
} }
// NeoFS subnetwork identifier.
//
// String representation of a value is base-10 integer.
//
// JSON representation is an object containing a single `value` number field.
message SubnetID {
// 4-byte integer subnetwork identifier.
fixed32 value = 1 [json_name = "value"];
}
// API version used by a node. // API version used by a node.
// //
// String presentation is a Semantic Versioning 2.0.0 compatible version string // String presentation is a Semantic Versioning 2.0.0 compatible version string

View file

@ -1,18 +0,0 @@
syntax = "proto3";
package neo.fs.v2.subnet;
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/subnet/grpc;subnet";
option csharp_namespace = "Neo.FileStorage.API.Subnet";
import "refs/types.proto";
// NeoFS subnetwork description
message SubnetInfo {
// Unique subnet identifier. Missing ID is
// equivalent to zero (default subnetwork) ID.
neo.fs.v2.refs.SubnetID id = 1;
// Identifier of the subnetwork owner
neo.fs.v2.refs.OwnerID owner = 2;
}