remove .out files vz-local
authorMike Cambria <michael.cambria@one.verizon.com>
Thu, 7 Sep 2017 16:07:27 +0000 (12:07 -0400)
committerMike Cambria <michael.cambria@one.verizon.com>
Thu, 7 Sep 2017 16:07:27 +0000 (12:07 -0400)
diff-allocator.out [deleted file]
diff-config.out [deleted file]
diff.out [deleted file]

diff --git a/diff-allocator.out b/diff-allocator.out
deleted file mode 100644 (file)
index cf25050..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-26c26,30
-<      "github.com/containernetworking/plugins/plugins/ipam/host-local/backend"
----
->      "github.com/containernetworking/plugins/plugins/ipam/vz-local/backend"
-> 
->      //"github.com/vishvananda/netlink"
->      //"os"
->      //"syscall"
-69a74,75
->              log.Println("AdvRoute: BGP Advertises /32", requestedIP)
-> 
-113a120,159
-> 
-> /*
-> comment test 
->         var uplink types.UnmarshallableString
->      if a.conf.Args != nil {
->          uplink = a.conf.Args.UPLINK
->          log.Println("AdvRoute: BGP Advertises /32", requestedIP, uplink)
-> 
->           dst := &net.IPNet{
->                       IP: requestedIP,
->                       Mask: net.CIDRMask(32, 32),
->                       }
-> 
->             link, err := netlink.LinkByName(string(uplink))
->             if err != nil {
->                log.Println("Can't obtain link index for: ", uplink)
->                return nil, nil, err
->             }
-> 
->             viaIP := a.conf.Args.VIAIP
->             route := netlink.Route{
->                         Dst: dst,
->                         LinkIndex: link.Attrs().Index,
->                         Gw: viaIP,
->                         }
-> 
->             if err := netlink.RouteAdd(&route); err != nil {
->                 fmt.Fprintln(os.Stderr, "There was an error adding netlink route: ", err)
->                 if (err == syscall.EAGAIN) {
->                     log.Println("ERRNO: eagain")
->                 } else if (err == syscall.EEXIST) {
->                     log.Println("ERRNO: route already exists")
->                 } else {
->                     log.Println("ERRNO: value is: ", (int(err.(syscall.Errno))))
->                 }
->                 return nil, nil, err
->             }
->         }
-> 
-> */
-129a176,221
-> 
-> /*
->         var requestedIP net.IP
->      if a.conf.Args != nil {
->                requestedIP = a.conf.Args.IP
->      }
-> 
->      if requestedIP != nil {
->            //var uplink string
->               var uplink types.UnmarshallableString
->               if a.conf.Args != nil {
->                    uplink = a.conf.Args.UPLINK
->                    log.Println("AdvRoute: BGP Advertises /32", requestedIP, uplink)
->                 dst := &net.IPNet{
->                            // IP: net.IPv4(99, 44, 69, 3),
->                            IP: requestedIP,
->                            Mask: net.CIDRMask(32, 32),
->                            }
-> 
->                 link, err := netlink.LinkByName(string(uplink))
->                 if err != nil {
->                           log.Println("Can't obtain link index for: ", uplink)
->                           return err1
->                 }
-> 
->                    viaIP := a.conf.Args.VIAIP
->                    route := netlink.Route{
->                               Dst: dst,
->                               LinkIndex: link.Attrs().Index,
->                               Gw: viaIP,
->                               }
-> 
->                 if err := netlink.RouteDel(&route); err != nil {
->                           fmt.Fprintln(os.Stderr, "There was an error removing netlink route: ", err)
->                           if (err == syscall.EAGAIN) {
->                                   log.Println("ERRNO: eagain")
->                           } else if (err == syscall.ESRCH) {
->                                   log.Println("ERRNO: route doesn't exists")
->                           } else {
->                                      log.Println("ERRNO: value is: ", (int(err.(syscall.Errno))))
->                              }
->                              // os.Exit(1)
->                              return err
->               }
->         }
-> */
diff --git a/diff-config.out b/diff-config.out
deleted file mode 100644 (file)
index e2d7cc7..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-21a22,24
->      "log"
->      "os"
-> 
-42a46,47
->         VIAIP net.IP `json:"viaip,omitempty"`
->      UPLINK types.UnmarshallableString `json:"uplink,omitempty"`
-46a52,64
->      VIAIP net.IP `json:"viaip,omitempty"`
->      UPLINK types.UnmarshallableString `json:"uplink,omitempty"`
-> }
-> 
-> /*
->  * Add structs needed to parse labels
->  */
-> //type Args struct {
-> //     Mesos Mesos `json:"org.apache.mesos,omitempty"`
-> //}
-> 
-> type Mesos struct {
->      NetworkInfo NetworkInfo `json:"network_info"`
-48a67,86
-> type NetworkInfo struct {
->      Name   string `json:"name"`
->      Labels struct {
->               Labels []struct {
->                   Key   string `json:"key"`
->                   Value string `json:"value"`
->               } `json:"labels,omitempty"`
->      } `json:"labels,omitempty"`
-> }
-> 
-> // NetConf describes a network.
-> //type NetConf struct {
-> //       CNIVersion string `json:"cniVersion,omitempty"`
-> //       Name string `json:"name,omitempty"`
-> //       Type string `json:"type,omitempty"`
-> //       IPAM *IPAMConfig `json:"ipam"`
-> //       DNS types.DNS `json:"dns"`
-> //       ARGS *Args `json:"args,omitempty"`
-> //}
-> 
-55a94
->              Mesos Mesos `json:"org.apache.mesos,omitempty"`
-67a107
->      //n := NetConf{}
-145a186,271
-> 
->         /*
->          * Example of getting an environment variable supplied to the IPAM plugin
->          */
->         mccval := os.Getenv("MCCVAL")
->         println("mccval is: ", mccval)
-> 
->         /*
->          * Get values for supplied labels
->          * Ensure that IPAM args (e.g. CNI_ARGS) isn't confused with args passed to CNI itself
->          */
->         labels := map[string]string{}
-> 
->           if n.Args != nil {
-> 
->                 for k, label := range n.Args.Mesos.NetworkInfo.Labels.Labels {
->                     labels[label.Key] = label.Value
->                     println("Map k (for)", k)
->                     println("Map k (for)", k, label.Key, label.Value)
->                 }
-> 
->                 println("CNI Args NetworkInfo: Net Name: ", n.Args.Mesos.NetworkInfo.Name)
->           }
-> 
->         for key, value := range labels {
->             println("Key:", key, "Value:", value)
->         }
-> 
->         println("CNI IPAM Name: ", n.IPAM.Name)
-> 
->         if n.IPAM.Args != nil {
->                 var args_ip net.IP
->                 if n.IPAM.Args.IP != nil {
->                    args_ip = n.IPAM.Args.IP
->                    log.Println("IPAM args: n.IPAM.IP is:", args_ip)
->                 }
-> 
->                 var via_ip net.IP
->                 if n.IPAM.Args.VIAIP != nil {
->                    via_ip = n.IPAM.Args.VIAIP
->                    log.Println("IPAM args: n.IPAM.VIAIP is:", via_ip)
->                 }
-> 
->                 var uplink types.UnmarshallableString
->                 if n.IPAM.Args.UPLINK != "" {
->                    uplink = n.IPAM.Args.UPLINK
->                    log.Println("IPAM args: n.IPAM.UPLINK is:", uplink)
->                 }
->         }
-> 
->         staticIP, found := labels["StaticIP"]
->         if found {
->            println("StaticIP is: ", staticIP)
->            log.Println("StaticIP is: ", staticIP)
->            n.IPAM.Args.IP = net.ParseIP(staticIP)
->            log.Println("IPAM args: n.IPAM.IP is:", n.IPAM.Args.IP)
->         } else {
->            println("StaticIP label NOT set")
->         }
-> 
->         viaIP, found := labels["viaIP"]
->         if found {
->            println("viaIP is: ", viaIP)
->            log.Println("viaIP is: ", viaIP)
->            n.IPAM.Args.VIAIP = net.ParseIP(viaIP)
->            log.Println("IPAM args: n.IPAM.VIAIP is:", n.IPAM.Args.VIAIP)
->         } else {
->            println("viaIP label NOT set")
->         }
-> 
->         Uplink, found := labels["Uplink"]
->         if found {
->            println("Uplink is: ", Uplink)
->            log.Println("Uplink is: ", Uplink)
->            n.IPAM.Args.UPLINK= types.UnmarshallableString(Uplink)
->            log.Println("IPAM args: n.IPAM.UPLINK is:", n.IPAM.Args.UPLINK)
->         } else {
->            println("Uplink label NOT set")
->         }
-> 
->         bull, found := labels["bull"]
->         if !found {
->            println("Hard to believe, but bull not found")
->         } else {
->            println("Found: ", bull)
->         }
diff --git a/diff.out b/diff.out
deleted file mode 100644 (file)
index 60a805f..0000000
--- a/diff.out
+++ /dev/null
@@ -1,133 +0,0 @@
-21a22,24
->      "log"
->      "os"
-> 
-42a46,47
->         VIAIP net.IP `json:"viaip,omitempty"`
->      UPLINK types.UnmarshallableString `json:"uplink,omitempty"`
-46a52,84
->      VIAIP net.IP `json:"viaip,omitempty"`
->      UPLINK types.UnmarshallableString `json:"uplink,omitempty"`
-> }
-> 
-> /*
->  * Add structs needed to parse labels
->  */
-> type Args struct {
->      Mesos Mesos `json:"org.apache.mesos,omitempty"`
-> }
-> 
-> type Mesos struct {
->      NetworkInfo NetworkInfo `json:"network_info"`
-> }
-> 
-> type NetworkInfo struct {
->      Name   string `json:"name"`
->      Labels struct {
->               Labels []struct {
->                   Key   string `json:"key"`
->                   Value string `json:"value"`
->               } `json:"labels,omitempty"`
->      } `json:"labels,omitempty"`
-> }
-> 
-> // NetConf describes a network.
-> type NetConf struct {
->        CNIVersion string `json:"cniVersion,omitempty"`
->        Name string `json:"name,omitempty"`
->        Type string `json:"type,omitempty"`
->        IPAM *IPAMConfig `json:"ipam"`
->        DNS types.DNS `json:"dns"`
->        ARGS *Args `json:"args,omitempty"`
-68c106,107
-<      n := Net{}
----
->      //n := Net{}
->      n := NetConf{}
-145a185,270
-> 
->         /*
->          * Example of getting an environment variable supplied to the IPAM plugin
->          */
->         mccval := os.Getenv("MCCVAL")
->         println("mccval is: ", mccval)
-> 
->         /*
->          * Get values for supplied labels
->          * Ensure that IPAM args (e.g. CNI_ARGS) isn't confused with args passed to CNI itself
->          */
->         labels := map[string]string{}
-> 
->           if n.ARGS != nil {
-> 
->                 for k, label := range n.ARGS.Mesos.NetworkInfo.Labels.Labels {
->                     labels[label.Key] = label.Value
->                     println("Map k (for)", k)
->                     println("Map k (for)", k, label.Key, label.Value)
->                 }
-> 
->                 println("CNI Args NetworkInfo: Net Name: ", n.ARGS.Mesos.NetworkInfo.Name)
->           }
-> 
->         for key, value := range labels {
->             println("Key:", key, "Value:", value)
->         }
-> 
->         println("CNI IPAM Name: ", n.IPAM.Name)
-> 
->         if n.IPAM.Args != nil {
->                 var args_ip net.IP
->                 if n.IPAM.Args.IP != nil {
->                    args_ip = n.IPAM.Args.IP
->                    log.Println("IPAM args: n.IPAM.IP is:", args_ip)
->                 }
-> 
->                 var via_ip net.IP
->                 if n.IPAM.Args.VIAIP != nil {
->                    via_ip = n.IPAM.Args.VIAIP
->                    log.Println("IPAM args: n.IPAM.VIAIP is:", via_ip)
->                 }
-> 
->                 var uplink types.UnmarshallableString
->                 if n.IPAM.Args.UPLINK != "" {
->                    uplink = n.IPAM.Args.UPLINK
->                    log.Println("IPAM args: n.IPAM.UPLINK is:", uplink)
->                 }
->         }
-> 
->         staticIP, found := labels["StaticIP"]
->         if found {
->            println("StaticIP is: ", staticIP)
->            log.Println("StaticIP is: ", staticIP)
->            n.IPAM.Args.IP = net.ParseIP(staticIP)
->            log.Println("IPAM args: n.IPAM.IP is:", n.IPAM.Args.IP)
->         } else {
->            println("StaticIP label NOT set")
->         }
-> 
->         viaIP, found := labels["viaIP"]
->         if found {
->            println("viaIP is: ", viaIP)
->            log.Println("viaIP is: ", viaIP)
->            n.IPAM.Args.VIAIP = net.ParseIP(viaIP)
->            log.Println("IPAM args: n.IPAM.VIAIP is:", n.IPAM.Args.VIAIP)
->         } else {
->            println("viaIP label NOT set")
->         }
-> 
->         Uplink, found := labels["Uplink"]
->         if found {
->            println("Uplink is: ", Uplink)
->            log.Println("Uplink is: ", Uplink)
->            n.IPAM.Args.UPLINK= types.UnmarshallableString(Uplink)
->            log.Println("IPAM args: n.IPAM.UPLINK is:", n.IPAM.Args.UPLINK)
->         } else {
->            println("Uplink label NOT set")
->         }
-> 
->         bull, found := labels["bull"]
->         if !found {
->            println("Hard to believe, but bull not found")
->         } else {
->            println("Found: ", bull)
->         }