[#189] sdk/netmap: Refactor PlacementPolicy type

Replace alias to v2 type PlacementPolicy with v2-compatible implementation.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-05 14:08:19 +03:00 committed by Alex Vanin
parent 6a29d9c360
commit 9f19139999
5 changed files with 209 additions and 13 deletions

View file

@ -239,6 +239,17 @@ func TestPlacementPolicy_ProcessSelectorsInvalid(t *testing.T) {
}
}
func testSelector() *Selector {
s := new(Selector)
s.SetName("name")
s.SetCount(3)
s.SetFilter("filter")
s.SetAttribute("attribute")
s.SetClause(ClauseDistinct)
return s
}
func TestSelectorFromV2(t *testing.T) {
sV2 := new(netmap.Selector)
sV2.SetName("name")