From: Michael C Cambria Date: Thu, 18 May 2017 19:46:29 +0000 (+0000) Subject: Add conflist and test scripts X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=bd5897906e82dfab29676d7bf7dfb4883ca6c56d;p=plugins.git Add conflist and test scripts --- diff --git a/anycast.conflist b/anycast.conflist new file mode 100644 index 0000000..ba2b0be --- /dev/null +++ b/anycast.conflist @@ -0,0 +1,28 @@ +{ + "name": "anycast", + "cniVersion": "0.3.1", + "plugins": [ + { + "type": "bridge", + "bridge": "mynet", + "ipMasq": true, + "isGateway": true, + "ipam": { + "type": "host-local", + "subnet": "10.244.10.0/24", + "routes": [ + { "dst": "0.0.0.0/0" } + ] + } + }, + { + "type": "anycast", + "myAwesomeFlag": true, + "anotherAwesomeArg": "172.19.0.1", + "StaticIP": "10.244.10.209", + "Uplink": "mynet", + "viaIP": "10.244.10.1" + } + ] +} + diff --git a/mcc-add-anycast.sh b/mcc-add-anycast.sh new file mode 100755 index 0000000..fd4a471 --- /dev/null +++ b/mcc-add-anycast.sh @@ -0,0 +1,18 @@ +#/bin/bash +export DEBUG=1 +export NETCONFPATH=/home/mcc/go/src/github.com/containernetworking/plugins +export CNI_PATH=/home/mcc/go/src/github.com/containernetworking/plugins/bin + +export CAP_ARGS='{ + "advertise": [ + { + "myAwesomeFlag": "true", + "anotherAwesomeArg": "172.19.0.1" + } + ] +}' + +#./cnitool add anycast /var/run/netns/test0 +/home/mcc/go/src/github.com/containernetworking/cni/cnitool/cnitool add anycast /var/run/netns/test0 + + diff --git a/mcc-del-anycast.sh b/mcc-del-anycast.sh new file mode 100755 index 0000000..95d309a --- /dev/null +++ b/mcc-del-anycast.sh @@ -0,0 +1,18 @@ +#/bin/bash +export DEBUG=1 +export NETCONFPATH=/home/mcc/go/src/github.com/containernetworking/plugins +export CNI_PATH=/home/mcc/go/src/github.com/containernetworking/plugins/bin + +export CAP_ARGS='{ + "advertise": [ + { + "myAwesomeFlag": "true", + "anotherAwesomeArg": "172.19.0.1" + } + ] +}' + +#./cnitool add anycast /var/run/netns/test0 +/home/mcc/go/src/github.com/containernetworking/cni/cnitool/cnitool del anycast /var/run/netns/test0 + +