[#70] netmap: Regenerate protobuf for Replica

* Since EC field tags are renumerated, it is required
  to regenerate netmap grpc.
* Add a generator with EC replica to check it with
  unit-test.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-03-27 12:56:03 +03:00
parent 6e9d385f3c
commit 491a47e7fe
2 changed files with 12 additions and 0 deletions

BIN
netmap/grpc/types.pb.go generated

Binary file not shown.

View file

@ -81,6 +81,17 @@ func GenerateReplica(empty bool) *netmap.Replica {
return m
}
func GenerateEC(empty bool) *netmap.Replica {
m := new(netmap.Replica)
if !empty {
m.SetECDataCount(4)
m.SetECParityCount(2)
}
return m
}
func GenerateReplicas(empty bool) []netmap.Replica {
var res []netmap.Replica
@ -88,6 +99,7 @@ func GenerateReplicas(empty bool) []netmap.Replica {
res = append(res,
*GenerateReplica(false),
*GenerateReplica(false),
*GenerateEC(false),
)
}