Skip to content

Commit

Permalink
[bugfix] Addition of annotation field in the vnscif file
Browse files Browse the repository at this point in the history
  • Loading branch information
shrsr authored and lhercot committed May 26, 2022
1 parent be1cf19 commit cadec7e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions models/vns_c_if.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ type ConcreteInterface struct {
}

type ConcreteInterfaceAttributes struct {
Encap string `json:",omitempty"`
Name string `json:",omitempty"`
VnicName string `json:",omitempty"`
Encap string `json:",omitempty"`
Name string `json:",omitempty"`
VnicName string `json:",omitempty"`
Annotation string `json:",omitempty"`
}

func NewConcreteInterface(vnsCIfRn, parentDn, nameAlias string, vnsCIfAttr ConcreteInterfaceAttributes) *ConcreteInterface {
Expand Down Expand Up @@ -59,6 +60,7 @@ func (vnsCIf *ConcreteInterface) ToMap() (map[string]string, error) {
A(vnsCIfMap, "encap", vnsCIf.Encap)
A(vnsCIfMap, "name", vnsCIf.Name)
A(vnsCIfMap, "vnicName", vnsCIf.VnicName)
A(vnsCIfMap, "annotation", vnsCIf.Annotation)
return vnsCIfMap, err
}

Expand All @@ -75,9 +77,10 @@ func ConcreteInterfaceFromContainerList(cont *container.Container, index int) *C
NameAlias: G(ConcreteInterfaceCont, "nameAlias"),
},
ConcreteInterfaceAttributes{
Encap: G(ConcreteInterfaceCont, "encap"),
Name: G(ConcreteInterfaceCont, "name"),
VnicName: G(ConcreteInterfaceCont, "vnicName"),
Encap: G(ConcreteInterfaceCont, "encap"),
Name: G(ConcreteInterfaceCont, "name"),
VnicName: G(ConcreteInterfaceCont, "vnicName"),
Annotation: G(ConcreteInterfaceCont, "annotation"),
},
}
}
Expand Down

0 comments on commit cadec7e

Please sign in to comment.