This project modified from cni macvlan
{
"name": "mynet",
"type": "macvtap",
"master": "eth0",
"ipam": {
"type": "dhcp"
}
}
name
(string, required): the name of the networktype
(string, required): "macvtap"master
(string, optional): name of the host interface to enslave. Defaults to default route interface.mode
(string, optional): one of "bridge", "private", "vepa", "passthru". Defaults to "bridge".mtu
(integer, optional): explicitly set MTU to the specified value. Defaults to the value chosen by the kernel. The value must be [0, master's MTU].ipam
(dictionary, required): IPAM configuration to be used for this network. For interface only without ip address, create empty dictionary.
# build this project
go build
The project needs to run test cases with root privileges.
export PATH=/opt/cni/bin/:$PATH
go test -ginkgo.v