forked from TrueCloudLab/frostfs-api
[#73] Add JSON field names to netmap package
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
d0d74c3a2f
commit
6ea8bc3214
1 changed files with 23 additions and 23 deletions
|
@ -56,39 +56,39 @@ message Filter {
|
|||
// application to the whole unfiltered NetworkMap. At top level it's used as a
|
||||
// filter name. At lower levels it's considered to be a reference to another
|
||||
// named filter
|
||||
string name = 1;
|
||||
string name = 1 [json_name = "name"];
|
||||
|
||||
// Key to filter
|
||||
string key = 2;
|
||||
string key = 2 [json_name = "key"];
|
||||
|
||||
// Filtering operation
|
||||
Operation op = 3;
|
||||
Operation op = 3 [json_name = "op"];
|
||||
|
||||
// Value to match
|
||||
string value = 4;
|
||||
string value = 4 [json_name = "value"];
|
||||
|
||||
// List of inner filters. Top level operation will be applied to the whole
|
||||
// list.
|
||||
repeated Filter filters = 5;
|
||||
repeated Filter filters = 5 [json_name = "filters"];
|
||||
}
|
||||
|
||||
// Selector chooses a number of nodes from the bucket taking the nearest nodes
|
||||
// to the provided `ContainerID` by hash distance.
|
||||
message Selector {
|
||||
// Selector name to reference in object placement section
|
||||
string name = 1;
|
||||
string name = 1 [json_name = "name"];
|
||||
|
||||
// How many nodes to select from the bucket
|
||||
uint32 count = 2;
|
||||
uint32 count = 2 [json_name = "count"];
|
||||
|
||||
// Selector modifier showing how to form a bucket
|
||||
Clause clause = 3;
|
||||
Clause clause = 3 [json_name = "clause"];
|
||||
|
||||
// Attribute bucket to select from
|
||||
string attribute = 4;
|
||||
string attribute = 4 [json_name = "attribute"];
|
||||
|
||||
// Filter reference to select from
|
||||
string filter = 5;
|
||||
string filter = 5 [json_name = "filter"];
|
||||
}
|
||||
|
||||
// Number of object replicas in a set of nodes from the defined selector. If no
|
||||
|
@ -96,10 +96,10 @@ message Selector {
|
|||
// default.
|
||||
message Replica {
|
||||
// How many object replicas to put
|
||||
uint32 count = 1;
|
||||
uint32 count = 1 [json_name = "count"];
|
||||
|
||||
// Named selector bucket to put replicas
|
||||
string selector = 2;
|
||||
string selector = 2 [json_name = "selector"];
|
||||
}
|
||||
|
||||
// Set of rules to select a subset of nodes from `NetworkMap` able to store
|
||||
|
@ -108,26 +108,26 @@ message Replica {
|
|||
message PlacementPolicy {
|
||||
// Rules to set number of object replicas and place each one into a named
|
||||
// bucket
|
||||
repeated Replica replicas = 1;
|
||||
repeated Replica replicas = 1 [json_name = "replicas"];
|
||||
|
||||
// Container backup factor controls how deep NeoFS will search for nodes
|
||||
// alternatives to include into container's nodes subset
|
||||
uint32 container_backup_factor = 2;
|
||||
uint32 container_backup_factor = 2 [json_name = "containerBackupFactor"];
|
||||
|
||||
// Set of Selectors to form the container's nodes subset
|
||||
repeated Selector selectors = 3;
|
||||
repeated Selector selectors = 3 [json_name = "selectors"];
|
||||
|
||||
// List of named filters to reference in selectors
|
||||
repeated Filter filters = 4;
|
||||
repeated Filter filters = 4 [json_name = "filters"];
|
||||
}
|
||||
|
||||
// NeoFS node description
|
||||
message NodeInfo {
|
||||
// Public key of the NeoFS node in a binary format.
|
||||
bytes public_key = 1;
|
||||
bytes public_key = 1 [json_name = "publicKey"];
|
||||
|
||||
// Ways to connect to a node
|
||||
string address = 2;
|
||||
string address = 2 [json_name = "address"];
|
||||
|
||||
// Administrator-defined Attributes of the NeoFS Storage Node.
|
||||
//
|
||||
|
@ -167,17 +167,17 @@ message NodeInfo {
|
|||
// corresponding section in NeoFS Technical specification.
|
||||
message Attribute {
|
||||
// Key of the node attribute.
|
||||
string key = 1;
|
||||
string key = 1 [json_name = "key"];
|
||||
|
||||
// Value of the node attribute.
|
||||
string value = 2;
|
||||
string value = 2 [json_name = "value"];
|
||||
|
||||
// Parent keys, if any. For example for `City` it could be `Region` and
|
||||
// `Country`.
|
||||
repeated string parents = 3;
|
||||
repeated string parents = 3 [json_name = "parents"];
|
||||
}
|
||||
// Carries list of the NeoFS node attributes in a string key-value format.
|
||||
repeated Attribute attributes = 3;
|
||||
repeated Attribute attributes = 3 [json_name = "attributes"];
|
||||
|
||||
// Represents the enumeration of various states of the NeoFS node.
|
||||
enum State {
|
||||
|
@ -192,5 +192,5 @@ message NodeInfo {
|
|||
}
|
||||
|
||||
// Carries state of the NeoFS node.
|
||||
State state = 4;
|
||||
State state = 4 [json_name = "state"];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue