Skip to content

Commit

Permalink
Merge pull request #281 from nspcc-dev/deprecate-subnets
Browse files Browse the repository at this point in the history
*: deprecate subnets, fix #261
  • Loading branch information
roman-khimov authored Dec 18, 2023
2 parents 1424834 + 254b893 commit cae99c9
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
### Removed
- Redundant object system attribute `__NEOFS__UPLOAD_ID` (#271)

### Deprecated
- Subnets (#261)

## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島)

### Added
Expand Down
4 changes: 2 additions & 2 deletions container/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ message Container {
// There are some "well-known" attributes affecting system behaviour:
//
// * __NEOFS__SUBNET \
// String ID of a container's storage subnet. Any container can be attached to
// one subnet only.
// DEPRECATED. Was used for a string ID of a container's storage subnet.
// Currently doesn't affect anything.
// * __NEOFS__NAME \
// String of a human-friendly container name registered as a domain in
// NNS contract.
Expand Down
14 changes: 5 additions & 9 deletions netmap/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ message PlacementPolicy {
// List of named filters to reference in selectors
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"];
// DEPRECATED. Was used for subnetwork ID to select nodes from, currently
// ignored.
refs.SubnetID subnet_id = 5 [json_name = "subnetId", deprecated = true];
}

// NeoFS node description
Expand Down Expand Up @@ -165,12 +165,8 @@ message NodeInfo {
// point delimiter for decimal part. In the Network Map it will be saved as
// 64-bit unsigned integer representing number of minimal token fractions.
// * __NEOFS__SUBNET_%s \
// `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).
// DEPRECATED. Defined if the node is included in the `%s` subnetwork
// or not. Currently ignored.
// * UN-LOCODE \
// Node's geographic location in
// [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html)
Expand Down
4 changes: 2 additions & 2 deletions proto-docs/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ values will be considered invalid.
There are some "well-known" attributes affecting system behaviour:

* __NEOFS__SUBNET \
String ID of a container's storage subnet. Any container can be attached to
one subnet only.
DEPRECATED. Was used for a string ID of a container's storage subnet.
Currently doesn't affect anything.
* __NEOFS__NAME \
String of a human-friendly container name registered as a domain in
NNS contract.
Expand Down
10 changes: 3 additions & 7 deletions proto-docs/netmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,8 @@ explicitly set:
point delimiter for decimal part. In the Network Map it will be saved as
64-bit unsigned integer representing number of minimal token fractions.
* __NEOFS__SUBNET_%s \
`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).
DEPRECATED. Defined if the node is included in the `%s` subnetwork
or not. Currently ignored.
* UN-LOCODE \
Node's geographic location in
[UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html)
Expand Down Expand Up @@ -488,7 +484,7 @@ 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 |
| 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 |
| 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. |
| subnet_id | [neo.fs.v2.refs.SubnetID](#neo.fs.v2.refs.SubnetID) | | DEPRECATED. Was used for subnetwork ID to select nodes from, currently ignored. |


<a name="neo.fs.v2.netmap.Replica"></a>
Expand Down
2 changes: 2 additions & 0 deletions proto-docs/refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ String representation of a value is base-10 integer.

JSON representation is an object containing a single `value` number field.

DEPRECATED. Kept for compatibility only.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
Expand Down
2 changes: 2 additions & 0 deletions proto-docs/subnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
### Message SubnetInfo
NeoFS subnetwork description

DEPRECATED. Ignored and kept for compatibility only.


| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
Expand Down
2 changes: 2 additions & 0 deletions refs/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ message OwnerID {
// String representation of a value is base-10 integer.
//
// JSON representation is an object containing a single `value` number field.
//
// DEPRECATED. Kept for compatibility only.
message SubnetID {
// 4-byte integer subnetwork identifier.
fixed32 value = 1 [json_name = "value"];
Expand Down
2 changes: 2 additions & 0 deletions subnet/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ option csharp_namespace = "Neo.FileStorage.API.Subnet";
import "refs/types.proto";

// NeoFS subnetwork description
//
// DEPRECATED. Ignored and kept for compatibility only.
message SubnetInfo {
// Unique subnet identifier. Missing ID is
// equivalent to zero (default subnetwork) ID.
Expand Down

0 comments on commit cae99c9

Please sign in to comment.