[#311] control: Fix loss of parent attribute keys in netmap converter
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
6c9dab481c
commit
c75a828adf
1 changed files with 9 additions and 0 deletions
|
@ -82,6 +82,15 @@ func attributesFromAPI(apiAttrs []*netmapAPI.NodeAttribute) []*control.NodeInfo_
|
|||
a.SetKey(apiAttr.Key())
|
||||
a.SetValue(apiAttr.Value())
|
||||
|
||||
apiParents := apiAttr.ParentKeys()
|
||||
parents := make([]string, 0, len(apiParents))
|
||||
|
||||
for i := range apiParents {
|
||||
parents = append(parents, apiParents[i])
|
||||
}
|
||||
|
||||
a.SetParents(parents)
|
||||
|
||||
attrs = append(attrs, a)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue