"git.fd.io/govpp.git/core"
"git.fd.io/govpp.git/core/bin_api/vpe"
"git.fd.io/govpp.git/examples/bin_api/interfaces"
+ "git.fd.io/govpp.git/examples/bin_api/stats"
. "github.com/onsi/gomega"
)
vppReply := <-ctx.ch.ReplyChan
Expect(vppReply).ShouldNot(BeNil())
- received := false
+ var received bool
select {
- case vppReply = <-ctx.ch.ReplyChan:
+ case <-ctx.ch.ReplyChan:
received = true // this should not happen
default:
received = false // no reply to be received
codec := &core.MsgCodec{}
// request
- data, err := codec.EncodeMsg(&vpe.CreateLoopback{MacAddress: []byte{1, 2, 3, 4, 5, 6}}, 11)
+ data, err := codec.EncodeMsg(&interfaces.CreateLoopback{MacAddress: []byte{1, 2, 3, 4, 5, 6}}, 11)
Expect(err).ShouldNot(HaveOccurred())
Expect(data).ShouldNot(BeEmpty())
- msg1 := &vpe.CreateLoopback{}
+ msg1 := &interfaces.CreateLoopback{}
err = codec.DecodeMsg(data, msg1)
Expect(err).ShouldNot(HaveOccurred())
Expect(msg1.MacAddress).To(BeEquivalentTo([]byte{1, 2, 3, 4, 5, 6}))
Expect(msg2.Retval).To(BeEquivalentTo(55))
// other
- data, err = codec.EncodeMsg(&vpe.VnetIP4FibCounters{VrfID: 77}, 33)
+ data, err = codec.EncodeMsg(&stats.VnetIP4FibCounters{VrfID: 77}, 33)
Expect(err).ShouldNot(HaveOccurred())
Expect(data).ShouldNot(BeEmpty())
- msg3 := &vpe.VnetIP4FibCounters{}
+ msg3 := &stats.VnetIP4FibCounters{}
err = codec.DecodeMsg(data, msg3)
Expect(err).ShouldNot(HaveOccurred())
Expect(msg3.VrfID).To(BeEquivalentTo(77))