All checks were successful
DCO / DCO (pull_request) Successful in 41s
Signed-off-by: Pavel Gross <p.gross@yadro.com>
15 lines
No EOL
427 B
C#
15 lines
No EOL
427 B
C#
using System.Linq;
|
|
using FrostFS.Netmap;
|
|
using FrostFS.SDK.ModelsV2.Netmap;
|
|
|
|
namespace FrostFS.SDK.ClientV2.Mappers.GRPC.Netmap;
|
|
|
|
public static class NetmapMapper
|
|
{
|
|
public static NetmapSnapshot ToModel(this NetmapSnapshotResponse netmap)
|
|
{
|
|
return new NetmapSnapshot(
|
|
netmap.Body.Netmap.Epoch,
|
|
netmap.Body.Netmap.Nodes.Select(n => n.ToModel(netmap.MetaHeader.Version)).ToArray());
|
|
}
|
|
} |