From: VZ Cambria Date: Wed, 28 Dec 2016 21:42:33 +0000 (-0500) Subject: Sample env variable access for tc rules X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=357191bf2ffe33ca457f0dd653fe0917b645087f;p=cni.git Sample env variable access for tc rules --- diff --git a/pkg/ipam/ipam.go b/pkg/ipam/ipam.go index 09b167e..8d3fe05 100644 --- a/pkg/ipam/ipam.go +++ b/pkg/ipam/ipam.go @@ -94,6 +94,11 @@ func ConfigureIface(ifName string, res *types.Result) error { result = string(cmdOut) fmt.Println("The result of show filter is: ", result) + /* + * Example of getting an environment variable supplied to plugin + */ + mccval := os.Getenv("MCCVAL") + fmt.Println("mccval is: ", mccval) /* * End */