Skip to content

Commit

Permalink
[#179] netmap: add subnet id to placement policy
Browse files Browse the repository at this point in the history
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
  • Loading branch information
fyrchik authored and alexvanin committed Nov 17, 2021
1 parent 7ea5a1d commit c6691c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions netmap/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package neo.fs.v2.netmap;
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc;netmap";
option csharp_namespace = "Neo.FileStorage.API.Netmap";

import "refs/types.proto";

// Operations on filters
enum Operation {
// No Operation defined
Expand Down Expand Up @@ -119,6 +121,10 @@ 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"];
}

// NeoFS node description
Expand Down
10 changes: 10 additions & 0 deletions refs/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ message OwnerID {
bytes value = 1 [json_name = "value"];
}

// NeoFS subnetwork identifier.
//
// String representation of a value is base-10 integer.
//
// JSON representation is an object containing single `value` number field.
message SubnetID {
// 4-byte integer subnetwork identifier.
fixed32 value = 1 [json_name = "value"];
}

// API version used by a node.
//
// String presentation is a Semantic Versioning 2.0.0 compatible version string
Expand Down

0 comments on commit c6691c4

Please sign in to comment.