[#355] v2/refs: add subnetwork ID

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-11-17 16:58:38 +03:00 committed by LeL
parent ad6a7999cd
commit 68f28a1918
2 changed files with 26 additions and 0 deletions

View file

@ -59,6 +59,7 @@ type PlacementPolicy struct {
backupFactor uint32
selectors []*Selector
filters []*Filter
subnetID *refs.SubnetID
}
// Attribute of storage node.
@ -330,6 +331,14 @@ func (p *PlacementPolicy) SetReplicas(replicas []*Replica) {
p.replicas = replicas
}
func (p *PlacementPolicy) GetSubnetID() *refs.SubnetID {
return p.subnetID
}
func (p *PlacementPolicy) SetSubnetID(id *refs.SubnetID) {
p.subnetID = id
}
func (a *Attribute) GetKey() string {
if a != nil {
return a.key