From 012726db1a1bd7f2476e6497232f98ca35057416 Mon Sep 17 00:00:00 2001 From: networkop Date: Wed, 5 May 2021 11:34:28 +0100 Subject: [PATCH 01/11] Moved docker behind a new runtime interface --- clab/ceos.go | 22 ++-- clab/cert.go | 8 +- clab/clab.go | 66 ++++------ clab/config.go | 102 ++++----------- clab/config_test.go | 3 +- clab/crpd.go | 7 +- clab/file.go | 42 +----- clab/inventory.go | 6 +- clab/linux.go | 8 +- clab/mysocketio.go | 11 +- clab/netlink.go | 19 +-- clab/sonic.go | 4 +- clab/srl.go | 7 +- clab/vr-csr.go | 8 +- clab/vr-ros.go | 8 +- clab/vr-sros.go | 7 +- clab/vr-veos.go | 8 +- clab/vr-vmx.go | 8 +- clab/vr-xrv.go | 8 +- clab/vr-xrv9k.go | 8 +- cmd/deploy.go | 52 ++++---- cmd/destroy.go | 20 +-- cmd/disableTxOffload.go | 9 +- cmd/exec.go | 6 +- cmd/graph.go | 10 +- cmd/inspect.go | 46 ++----- cmd/root.go | 3 + cmd/save.go | 12 +- cmd/tools_veth.go | 11 +- {clab => runtime/docker}/docker.go | 197 +++++++++++++++++++---------- runtime/runtime.go | 58 +++++++++ types/types.go | 111 ++++++++++++++++ utils/env.go | 10 ++ {clab => utils}/ethtool.go | 2 +- utils/file.go | 103 +++++++++++++++ utils/netlink.go | 19 +++ 36 files changed, 652 insertions(+), 377 deletions(-) rename {clab => runtime/docker}/docker.go (61%) create mode 100644 runtime/runtime.go create mode 100644 types/types.go create mode 100644 utils/env.go rename {clab => utils}/ethtool.go (98%) create mode 100644 utils/file.go create mode 100644 utils/netlink.go diff --git a/clab/ceos.go b/clab/ceos.go index ef3ea9ba4..1f4c3ed32 100644 --- a/clab/ceos.go +++ b/clab/ceos.go @@ -9,20 +9,20 @@ import ( "strconv" "time" - "github.com/docker/docker/api/types" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" ) -func ceosPostDeploy(ctx context.Context, c *CLab, node *Node, lworkers uint) error { +func ceosPostDeploy(ctx context.Context, c *CLab, node *types.Node, lworkers uint) error { // regenerate ceos config since it is now known which IP address docker assigned to this container - err := node.generateConfig(node.ResConfig) + err := node.GenerateConfig(node.ResConfig, defaultConfigTemplates[node.Kind]) if err != nil { return err } log.Infof("Restarting '%s' node", node.ShortName) // force stopping and start is faster than ContainerRestart var timeout time.Duration = 1 - err = c.DockerClient.ContainerStop(ctx, node.ContainerID, &timeout) + err = c.Runtime.StopContainer(ctx, node.ContainerID, &timeout) if err != nil { return err } @@ -31,18 +31,18 @@ func ceosPostDeploy(ctx context.Context, c *CLab, node *Node, lworkers uint) err if err := deleteNetnsSymlink(node.LongName); err != nil { return err } - err = c.DockerClient.ContainerStart(ctx, node.ContainerID, types.ContainerStartOptions{}) + err = c.Runtime.StartContainer(ctx, node.ContainerID) if err != nil { return err } // since container has been restarted, we need to get its new NSPath and link netns - cont, err := c.DockerClient.ContainerInspect(ctx, node.ContainerID) + cont, err := c.Runtime.ContainerInspect(ctx, node.ContainerID) if err != nil { return err } - log.Debugf("node %s new pid %v", node.LongName, cont.State.Pid) - node.NSPath = "/proc/" + strconv.Itoa(cont.State.Pid) + "/ns/net" - err = linkContainerNS(node.NSPath, node.LongName) + log.Debugf("node %s new pid %v", node.LongName, cont.Pid) + node.NSPath = "/proc/" + strconv.Itoa(cont.Pid) + "/ns/net" + err = c.Runtime.LinkContainerNS(node.NSPath, node.LongName) if err != nil { return err } @@ -50,7 +50,7 @@ func ceosPostDeploy(ctx context.Context, c *CLab, node *Node, lworkers uint) err return err } -func initCeosNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { +func initCeosNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error // initialize the global parameters with defaults, can be overwritten later @@ -89,7 +89,7 @@ func initCeosNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map return err } -func (c *CLab) createCEOSFiles(node *Node) error { +func (c *CLab) createCEOSFiles(node *types.Node) error { // generate config directory CreateDirectory(path.Join(node.LabDir, "flash"), 0777) cfg := path.Join(node.LabDir, "flash", "startup-config") diff --git a/clab/cert.go b/clab/cert.go index 5f59ce0d1..aae092fb3 100644 --- a/clab/cert.go +++ b/clab/cert.go @@ -16,6 +16,8 @@ import ( "github.com/cloudflare/cfssl/signer" "github.com/cloudflare/cfssl/signer/universal" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) type Certificates struct { @@ -196,7 +198,7 @@ func (c *CLab) GenerateCert(ca string, caKey string, csrJSONTpl *template.Templa // RetrieveNodeCertData reads the node private key and certificate by the well known paths // if either of those files doesn't exist, an error is returned -func (c *CLab) RetrieveNodeCertData(n *Node) (*Certificates, error) { +func (c *CLab) RetrieveNodeCertData(n *types.Node) (*Certificates, error) { var nodeCertFilesDir = path.Join(c.Dir.LabCA, n.ShortName) var nodeCertFile = path.Join(nodeCertFilesDir, n.ShortName+".pem") var nodeKeyFile = path.Join(nodeCertFilesDir, n.ShortName+"-key.pem") @@ -210,12 +212,12 @@ func (c *CLab) RetrieveNodeCertData(n *Node) (*Certificates, error) { return nil, err } - certs.Cert, err = readFileContent(nodeCertFile) + certs.Cert, err = utils.ReadFileContent(nodeCertFile) if err != nil { return nil, err } - certs.Key, err = readFileContent(nodeKeyFile) + certs.Key, err = utils.ReadFileContent(nodeKeyFile) if err != nil { return nil, err } diff --git a/clab/clab.go b/clab/clab.go index 315ce228c..7ff0374b2 100644 --- a/clab/clab.go +++ b/clab/clab.go @@ -10,19 +10,20 @@ import ( "time" "github.com/containernetworking/plugins/pkg/ns" - "github.com/docker/docker/api/types" - docker "github.com/docker/docker/client" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/runtime" + "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) type CLab struct { - Config *Config - TopoFile *TopoFile - m *sync.RWMutex - Nodes map[string]*Node - Links map[int]*Link - DockerClient *docker.Client - Dir *Directory + Config *Config + TopoFile *TopoFile + m *sync.RWMutex + Nodes map[string]*types.Node + Links map[int]*Link + Runtime runtime.ContainerRuntime + Dir *Directory debug bool timeout time.Duration @@ -50,13 +51,9 @@ func WithTimeout(dur time.Duration) ClabOption { } } -func WithEnvDockerClient() ClabOption { +func WithRuntime(name string, d bool, dur time.Duration, gracefulShutdown bool) ClabOption { return func(c *CLab) { - var err error - c.DockerClient, err = docker.NewEnvClient() - if err != nil { - log.Fatalf("failed to create docker client: %v", err) - } + c.Runtime = runtime.NewRuntime(name, d, dur, gracefulShutdown) } } @@ -83,7 +80,7 @@ func NewContainerLab(opts ...ClabOption) *CLab { Config: new(Config), TopoFile: new(TopoFile), m: new(sync.RWMutex), - Nodes: make(map[string]*Node), + Nodes: make(map[string]*types.Node), Links: make(map[int]*Link), } for _, o := range opts { @@ -92,7 +89,7 @@ func NewContainerLab(opts ...ClabOption) *CLab { return c } -func (c *CLab) CreateNode(ctx context.Context, node *Node, certs *Certificates) error { +func (c *CLab) CreateNode(ctx context.Context, node *types.Node, certs *Certificates) error { if certs != nil { c.m.Lock() node.TLSCert = string(certs.Cert) @@ -103,23 +100,17 @@ func (c *CLab) CreateNode(ctx context.Context, node *Node, certs *Certificates) if err != nil { return err } - return c.CreateContainer(ctx, node) + return c.Runtime.CreateContainer(ctx, node) } // ExecPostDeployTasks executes tasks that some nodes might require to boot properly after start -func (c *CLab) ExecPostDeployTasks(ctx context.Context, node *Node, lworkers uint) error { +func (c *CLab) ExecPostDeployTasks(ctx context.Context, node *types.Node, lworkers uint) error { switch node.Kind { case "ceos": log.Debugf("Running postdeploy actions for Arista cEOS '%s' node", node.ShortName) return ceosPostDeploy(ctx, c, node, lworkers) case "crpd": - // exec `service ssh restart` to start ssh service and take into account mounted sshd_config - execConfig := types.ExecConfig{Tty: false, AttachStdout: false, AttachStderr: false, Cmd: strings.Fields("service ssh restart")} - respID, err := c.DockerClient.ContainerExecCreate(context.Background(), node.ContainerID, execConfig) - if err != nil { - return err - } - _, err = c.DockerClient.ContainerExecAttach(context.Background(), respID.ID, execConfig) + _, _, err := c.Runtime.Exec(ctx, node.ContainerID, []string{"service ssh restart"}) if err != nil { return err } @@ -132,25 +123,16 @@ func (c *CLab) ExecPostDeployTasks(ctx context.Context, node *Node, lworkers uin log.Debugf("Running postdeploy actions for sonic-vs '%s' node", node.ShortName) // TODO: change this calls to c.ExecNotWait // exec `supervisord` to start sonic services - execConfig := types.ExecConfig{Tty: false, AttachStdout: false, AttachStderr: false, Cmd: strings.Fields("supervisord")} - respID, err := c.DockerClient.ContainerExecCreate(context.Background(), node.ContainerID, execConfig) + _, _, err := c.Runtime.Exec(ctx, node.ContainerID, []string{"supervisord"}) if err != nil { return err } - _, err = c.DockerClient.ContainerExecAttach(context.Background(), respID.ID, execConfig) - if err != nil { - return err - } - // exec `/usr/lib/frr/bgpd` to start BGP service - execConfig = types.ExecConfig{Tty: false, AttachStdout: false, AttachStderr: false, Cmd: strings.Fields("/usr/lib/frr/bgpd")} - respID, err = c.DockerClient.ContainerExecCreate(context.Background(), node.ContainerID, execConfig) - if err != nil { - return err - } - _, err = c.DockerClient.ContainerExecAttach(context.Background(), respID.ID, execConfig) + + _, _, err = c.Runtime.Exec(ctx, node.ContainerID, []string{"/usr/lib/frr/bgpd"}) if err != nil { return err } + case "mysocketio": log.Debugf("Running postdeploy actions for mysocketio '%s' node", node.ShortName) err := disableTxOffload(node) @@ -168,7 +150,7 @@ func (c *CLab) ExecPostDeployTasks(ctx context.Context, node *Node, lworkers uin func (c *CLab) CreateNodes(ctx context.Context, workers uint) { wg := new(sync.WaitGroup) wg.Add(int(workers)) - nodesChan := make(chan *Node) + nodesChan := make(chan *types.Node) // start workers for i := uint(0); i < workers; i++ { go func(i uint) { @@ -291,7 +273,7 @@ func (c *CLab) CreateLinks(ctx context.Context, workers uint, postdeploy bool) { wg.Wait() } -func disableTxOffload(n *Node) error { +func disableTxOffload(n *types.Node) error { // skip this if node runs in host mode if strings.ToLower(n.NetworkMode) == "host" { return nil @@ -303,7 +285,7 @@ func disableTxOffload(n *Node) error { } err = nodeNS.Do(func(_ ns.NetNS) error { // disabling offload on lo0 interface - err := EthtoolTXOff("eth0") + err := utils.EthtoolTXOff("eth0") if err != nil { log.Infof("Failed to disable TX checksum offload for 'eth0' interface for Linux '%s' node: %v", n.ShortName, err) } diff --git a/clab/config.go b/clab/config.go index 88b291b0d..3ce3d72ab 100644 --- a/clab/config.go +++ b/clab/config.go @@ -13,6 +13,8 @@ import ( "github.com/docker/go-connections/nat" "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" "github.com/vishvananda/netlink" ) @@ -79,20 +81,10 @@ var srlTypes = map[string]string{ // Config defines lab configuration as it is provided in the YAML file type Config struct { - Name string `json:"name,omitempty"` - Mgmt mgmtNet `json:"mgmt,omitempty"` - Topology Topology `json:"topology,omitempty"` - ConfigPath string `yaml:"config_path,omitempty"` -} - -// mgmtNet struct defines the management network options -// it is provided via docker network object -type mgmtNet struct { - Network string `yaml:"network,omitempty"` // docker network name - Bridge string // linux bridge backing the docker network - IPv4Subnet string `yaml:"ipv4_subnet,omitempty"` - IPv6Subnet string `yaml:"ipv6_subnet,omitempty"` - MTU string `yaml:"mtu,omitempty"` + Name string `json:"name,omitempty"` + Mgmt types.MgmtNet `json:"mgmt,omitempty"` + Topology Topology `json:"topology,omitempty"` + ConfigPath string `yaml:"config_path,omitempty"` } // Topology represents a lab topology @@ -138,49 +130,6 @@ type LinkConfig struct { Labels map[string]string `yaml:"labels,omitempty"` } -// Node is a struct that contains the information of a container element -type Node struct { - ShortName string - LongName string - Fqdn string - LabDir string // LabDir is a directory related to the node, it contains config items and/or other persistent state - Index int - Group string - Kind string - // path to config template file that is used for config generation - Config string - ResConfig string // path to config file that is actually mounted to the container and is a result of templation - NodeType string - Position string - License string - Image string - Topology string - Sysctls map[string]string - User string - Entrypoint string - Cmd string - Env map[string]string - Binds []string // Bind mounts strings (src:dest:options) - PortBindings nat.PortMap // PortBindings define the bindings between the container ports and host ports - PortSet nat.PortSet // PortSet define the ports that should be exposed on a container - // container networking mode. if set to `host` the host networking will be used for this node, else bridged network - NetworkMode string - MgmtNet string // name of the docker network this node is connected to with its first interface - MgmtIPv4Address string - MgmtIPv4PrefixLength int - MgmtIPv6Address string - MgmtIPv6PrefixLength int - MacAddress string - ContainerID string - TLSCert string - TLSKey string - TLSAnchor string - NSPath string // network namespace path for this node - Publish []string //list of ports to publish with mysocketctl - // container labels - Labels map[string]string -} - // Link is a struct that contains the information of a link between 2 containers type Link struct { A *Endpoint @@ -191,7 +140,7 @@ type Link struct { // Endpoint is a struct that contains information of a link endpoint type Endpoint struct { - Node *Node + Node *types.Node // e1-x, eth, etc EndpointName string } @@ -218,6 +167,8 @@ func (c *CLab) initMgmtNetwork() error { c.Config.Mgmt.MTU = m } + c.Runtime.SetMgmtNet(c.Config.Mgmt) + return nil } @@ -243,7 +194,7 @@ func (c *CLab) ParseTopology() error { c.Dir.LabGraph = c.Dir.Lab + "/" + "graph" // initialize Nodes and Links variable - c.Nodes = make(map[string]*Node) + c.Nodes = make(map[string]*types.Node) c.Links = make(map[int]*Link) // initialize the Node information from the topology map @@ -358,7 +309,7 @@ func (c *CLab) imageInitialization(nodeCfg *NodeConfig, kind string) string { return c.Config.Topology.Defaults.Image } -func (c *CLab) licenseInit(nodeCfg *NodeConfig, node *Node) (string, error) { +func (c *CLab) licenseInit(nodeCfg *NodeConfig, node *types.Node) (string, error) { // path to license file var lic string var err error @@ -440,7 +391,7 @@ func (c *CLab) publishInit(nodeCfg *NodeConfig, kind string) []string { } // initialize container labels -func (c *CLab) labelsInit(nodeCfg *NodeConfig, kind string, node *Node) map[string]string { +func (c *CLab) labelsInit(nodeCfg *NodeConfig, kind string, node *types.Node) map[string]string { defaultLabels := map[string]string{ "containerlab": c.Config.Name, "clab-node-name": node.ShortName, @@ -461,7 +412,7 @@ func (c *CLab) labelsInit(nodeCfg *NodeConfig, kind string, node *Node) map[stri // NewNode initializes a new node object func (c *CLab) NewNode(nodeName string, nodeCfg NodeConfig, idx int) error { // initialize a new node - node := new(Node) + node := new(types.Node) node.ShortName = nodeName node.LongName = prefix + "-" + c.Config.Name + "-" + nodeName node.Fqdn = nodeName + "." + c.Config.Name + ".io" @@ -617,7 +568,7 @@ func (c *CLab) NewEndpoint(e string) *Endpoint { // "host" is a special reference to host namespace // for which we create an special Node with kind "host" case "host": - endpoint.Node = &Node{ + endpoint.Node = &types.Node{ Kind: "host", ShortName: "host", NSPath: hostNSPath, @@ -625,7 +576,7 @@ func (c *CLab) NewEndpoint(e string) *Endpoint { // mgmt-net is a special reference to a bridge of the docker network // that is used as the management network case "mgmt-net": - endpoint.Node = &Node{ + endpoint.Node = &types.Node{ Kind: "bridge", ShortName: "mgmt-net", } @@ -730,7 +681,7 @@ func (c *CLab) VerifyImages(ctx context.Context) error { } for image := range images { - err := c.PullImageIfRequired(ctx, image) + err := c.Runtime.PullImageIfRequired(ctx, image) if err != nil { return err } @@ -744,7 +695,7 @@ func (c *CLab) VerifyContainersUniqueness(ctx context.Context) error { defer cancel() var labels []string - containers, err := c.ListContainers(nctx, labels) + containers, err := c.Runtime.ListContainers(nctx, labels) if err != nil { return fmt.Errorf("could not list containers: %v", err) } @@ -901,15 +852,6 @@ func resolveBindPaths(binds []string) error { return nil } -// convertEnvs convert env variables passed as a map to a list of them -func convertEnvs(m map[string]string) []string { - s := make([]string, 0, len(m)) - for k, v := range m { - s = append(s, k+"="+v) - } - return s -} - // mergeStringMaps merges map m1 into m2 and return a resulting map as a new map // maps that are passed for merging will not be changed func mergeStringMaps(m1, m2 map[string]string) map[string]string { @@ -965,3 +907,13 @@ func sysMemory(v string) uint64 { } return m } + +// getDefaultDockerMTU gets the MTU of a docker0 bridge interface +// if fails to get the MTU of docker0, returns "1500" +func getDefaultDockerMTU() (string, error) { + b, err := utils.BridgeByName("docker0") + if err != nil { + return "1500", err + } + return fmt.Sprint(b.MTU), nil +} diff --git a/clab/config_test.go b/clab/config_test.go index 064c1a891..fc4dfe1bd 100644 --- a/clab/config_test.go +++ b/clab/config_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/srl-labs/containerlab/types" ) func TestLicenseInit(t *testing.T) { @@ -87,7 +88,7 @@ func TestBindsInit(t *testing.T) { } nodeCfg := c.Config.Topology.Nodes["node1"] - node := Node{} + node := types.Node{} node.Kind = strings.ToLower(c.kindInitialization(&nodeCfg)) binds := c.bindsInit(&nodeCfg) diff --git a/clab/crpd.go b/clab/crpd.go index e76aefa8c..cc660a15d 100644 --- a/clab/crpd.go +++ b/clab/crpd.go @@ -5,9 +5,10 @@ import ( "path" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" ) -func initCrpdNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { +func initCrpdNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Config, err = c.configInit(&nodeCfg, node.Kind) @@ -35,7 +36,7 @@ func initCrpdNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map return err } -func (c *CLab) createCRPDFiles(node *Node) error { +func (c *CLab) createCRPDFiles(node *types.Node) error { // create config and logs directory that will be bind mounted to crpd CreateDirectory(path.Join(node.LabDir, "config"), 0777) CreateDirectory(path.Join(node.LabDir, "log"), 0777) @@ -43,7 +44,7 @@ func (c *CLab) createCRPDFiles(node *Node) error { // copy crpd config from default template or user-provided conf file cfg := path.Join(node.LabDir, "/config/juniper.conf") - err := node.generateConfig(cfg) + err := node.GenerateConfig(cfg, defaultConfigTemplates[node.Kind]) if err != nil { log.Errorf("node=%s, failed to generate config: %v", node.ShortName, err) } diff --git a/clab/file.go b/clab/file.go index 5e628b1b1..e8aae9b23 100644 --- a/clab/file.go +++ b/clab/file.go @@ -1,16 +1,15 @@ package clab import ( - "bytes" "fmt" "io" "io/ioutil" "os" "path/filepath" "strings" - "text/template" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" "gopkg.in/yaml.v2" ) @@ -136,7 +135,7 @@ func CreateDirectory(path string, perm os.FileMode) { } // CreateNodeDirStructure create the directory structure and files for the lab nodes -func (c *CLab) CreateNodeDirStructure(node *Node) (err error) { +func (c *CLab) CreateNodeDirStructure(node *types.Node) (err error) { c.m.RLock() defer c.m.RUnlock() @@ -167,40 +166,3 @@ func (c *CLab) CreateNodeDirStructure(node *Node) (err error) { } return nil } - -// GenerateConfig generates configuration for the nodes -func (node *Node) generateConfig(dst string) error { - if fileExists(dst) && (node.Config == defaultConfigTemplates[node.Kind]) { - log.Debugf("config file '%s' for node '%s' already exists and will not be generated", dst, node.ShortName) - return nil - } - log.Debugf("generating config for node %s from file %s", node.ShortName, node.Config) - tpl, err := template.New(filepath.Base(node.Config)).ParseFiles(node.Config) - if err != nil { - return err - } - dstBytes := new(bytes.Buffer) - err = tpl.Execute(dstBytes, node) - if err != nil { - return err - } - log.Debugf("node '%s' generated config: %s", node.ShortName, dstBytes.String()) - f, err := os.Create(dst) - if err != nil { - return err - } - defer f.Close() - _, err = f.Write(dstBytes.Bytes()) - return err -} - -func readFileContent(file string) ([]byte, error) { - // check file exists - if !fileExists(file) { - return nil, fmt.Errorf("file %s does not exist", file) - } - - // read and return file content - b, err := ioutil.ReadFile(file) - return b, err -} diff --git a/clab/inventory.go b/clab/inventory.go index 1e5794b5b..aebbf4e09 100644 --- a/clab/inventory.go +++ b/clab/inventory.go @@ -6,6 +6,8 @@ import ( "path/filepath" "sort" "text/template" + + "github.com/srl-labs/containerlab/types" ) // GenerateInventories generate various inventory files and writes it to a lab location @@ -39,12 +41,12 @@ func (c *CLab) generateAnsibleInventory(w io.Writer) error { type inv struct { // clab nodes aggregated by their kind - Nodes map[string][]*Node + Nodes map[string][]*types.Node Meta map[string]string } i := inv{ - Nodes: make(map[string][]*Node), + Nodes: make(map[string][]*types.Node), } for _, n := range c.Nodes { diff --git a/clab/linux.go b/clab/linux.go index a8f16b082..8beaf55ec 100644 --- a/clab/linux.go +++ b/clab/linux.go @@ -1,8 +1,12 @@ package clab -import "strings" +import ( + "strings" -func initLinuxNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initLinuxNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Config, err = c.configInit(&nodeCfg, node.Kind) diff --git a/clab/mysocketio.go b/clab/mysocketio.go index 4d1e3f8d9..50f5a1929 100644 --- a/clab/mysocketio.go +++ b/clab/mysocketio.go @@ -7,6 +7,7 @@ import ( "strings" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" ) var supportedSockTypes = []string{"tcp", "tls", "http", "https"} @@ -82,11 +83,11 @@ func checkSockPort(p int) error { } // createMysocketTunnels creates internet reachable personal tunnels using mysocket.io -func createMysocketTunnels(ctx context.Context, c *CLab, node *Node) error { +func createMysocketTunnels(ctx context.Context, c *CLab, node *types.Node) error { // remove the existing sockets cmd := []string{"/bin/sh", "-c", "mysocketctl socket ls | awk '/clab/ {print $2}' | xargs -n1 mysocketctl socket delete -s"} log.Debugf("Running postdeploy mysocketio command %q", cmd) - _, _, err := c.Exec(ctx, node.ContainerID, cmd) + _, _, err := c.Runtime.Exec(ctx, node.ContainerID, cmd) if err != nil { return fmt.Errorf("failed to remove existing sockets: %v", err) } @@ -105,7 +106,7 @@ func createMysocketTunnels(ctx context.Context, c *CLab, node *Node) error { sockCmd := createSockCmd(ms, n.ShortName) cmd := []string{"/bin/sh", "-c", fmt.Sprintf("%s | awk 'NR==4 {print $2}'", sockCmd)} log.Debugf("Running mysocketio command %q", cmd) - stdout, _, err := c.Exec(ctx, node.ContainerID, cmd) + stdout, _, err := c.Runtime.Exec(ctx, node.ContainerID, cmd) if err != nil { return fmt.Errorf("failed to create mysocketio socket: %v", err) } @@ -114,7 +115,7 @@ func createMysocketTunnels(ctx context.Context, c *CLab, node *Node) error { // create tunnel and get its ID cmd = []string{"/bin/sh", "-c", fmt.Sprintf("mysocketctl tunnel create -s %s | awk 'NR==4 {print $4}'", sockID)} log.Debugf("Running mysocketio command %q", cmd) - stdout, _, err = c.Exec(ctx, node.ContainerID, cmd) + stdout, _, err = c.Runtime.Exec(ctx, node.ContainerID, cmd) if err != nil { return fmt.Errorf("failed to create mysocketio socket: %v", err) } @@ -124,7 +125,7 @@ func createMysocketTunnels(ctx context.Context, c *CLab, node *Node) error { cmd = []string{"/bin/sh", "-c", fmt.Sprintf("mysocketctl tunnel connect --host %s -p %d -s %s -t %s > socket-%s-%s-%d.log", n.LongName, ms.Port, sockID, tunID, n.ShortName, ms.Stype, ms.Port)} log.Debugf("Running mysocketio command %q", cmd) - c.ExecNotWait(ctx, node.ContainerID, cmd) + c.Runtime.ExecNotWait(ctx, node.ContainerID, cmd) } } return nil diff --git a/clab/netlink.go b/clab/netlink.go index df6b255cc..feffc0db4 100644 --- a/clab/netlink.go +++ b/clab/netlink.go @@ -10,6 +10,7 @@ import ( "github.com/containernetworking/plugins/pkg/ns" "github.com/google/uuid" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/utils" "github.com/vishvananda/netlink" ) @@ -86,10 +87,10 @@ func (c *CLab) CreateVirtualWiring(l *Link) (err error) { } // once veth pair is created, disable tx offload for veth pair - if err := EthtoolTXOff(ARndmName); err != nil { + if err := utils.EthtoolTXOff(ARndmName); err != nil { return err } - if err := EthtoolTXOff(BRndmName); err != nil { + if err := utils.EthtoolTXOff(BRndmName); err != nil { return err } @@ -183,7 +184,7 @@ func (veth *vEthEndpoint) toBridge() error { return err } err = vethNS.Do(func(_ ns.NetNS) error { - br, err := bridgeByName(veth.Bridge) + br, err := utils.BridgeByName(veth.Bridge) if err != nil { return err } @@ -232,18 +233,6 @@ func deleteNetnsSymlink(n string) error { return nil } -func bridgeByName(name string) (*netlink.Bridge, error) { - l, err := netlink.LinkByName(name) - if err != nil { - return nil, fmt.Errorf("could not lookup %q: %v", name, err) - } - br, ok := l.(*netlink.Bridge) - if !ok { - return nil, fmt.Errorf("%q already exists but is not a bridge", name) - } - return br, nil -} - // GetLiknsByNamePrefix returns a list of links whose name matches a prefix func GetLiknsByNamePrefix(prefix string) ([]netlink.Link, error) { // filtered list of interfaces diff --git a/clab/sonic.go b/clab/sonic.go index bec2f4b75..6c779706f 100644 --- a/clab/sonic.go +++ b/clab/sonic.go @@ -1,6 +1,8 @@ package clab -func initSonicNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { +import "github.com/srl-labs/containerlab/types" + +func initSonicNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Config, err = c.configInit(&nodeCfg, node.Kind) diff --git a/clab/srl.go b/clab/srl.go index c8ad7dd8e..898f27a43 100644 --- a/clab/srl.go +++ b/clab/srl.go @@ -10,6 +10,7 @@ import ( "text/template" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" ) type mac struct { @@ -48,7 +49,7 @@ func generateSRLTopologyFile(src, labDir string, index int) error { return nil } -func initSRLNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { +func initSRLNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error // initialize the global parameters with defaults, can be overwritten later node.Config, err = c.configInit(&nodeCfg, node.Kind) @@ -121,7 +122,7 @@ func initSRLNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[ return err } -func (c *CLab) createSRLFiles(node *Node) error { +func (c *CLab) createSRLFiles(node *types.Node) error { log.Debugf("Creating directory structure for SRL container: %s", node.ShortName) var src string var dst string @@ -145,7 +146,7 @@ func (c *CLab) createSRLFiles(node *Node) error { // will be used as a template in nodeGenerateConfig() CreateDirectory(path.Join(node.LabDir, "config"), 0777) dst = path.Join(node.LabDir, "config", "config.json") - err = node.generateConfig(dst) + err = node.GenerateConfig(dst, defaultConfigTemplates[node.Kind]) if err != nil { log.Errorf("node=%s, failed to generate config: %v", node.ShortName, err) } diff --git a/clab/vr-csr.go b/clab/vr-csr.go index 840c472e5..f9d9d02cc 100644 --- a/clab/vr-csr.go +++ b/clab/vr-csr.go @@ -1,8 +1,12 @@ package clab -import "fmt" +import ( + "fmt" -func initVrCSRNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initVrCSRNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Image = c.imageInitialization(&nodeCfg, node.Kind) diff --git a/clab/vr-ros.go b/clab/vr-ros.go index 6f48c240f..1c5e7cc99 100644 --- a/clab/vr-ros.go +++ b/clab/vr-ros.go @@ -1,8 +1,12 @@ package clab -import "fmt" +import ( + "fmt" -func initVrROSNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initVrROSNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Image = c.imageInitialization(&nodeCfg, node.Kind) diff --git a/clab/vr-sros.go b/clab/vr-sros.go index 32edcb155..e75111f75 100644 --- a/clab/vr-sros.go +++ b/clab/vr-sros.go @@ -5,9 +5,10 @@ import ( "path" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" ) -func initSROSNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { +func initSROSNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Config, err = c.configInit(&nodeCfg, node.Kind) if err != nil { @@ -50,7 +51,7 @@ func initSROSNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map return err } -func (c *CLab) createVrSROSFiles(node *Node) error { +func (c *CLab) createVrSROSFiles(node *types.Node) error { // create config directory that will be bind mounted to vrnetlab container at / path CreateDirectory(path.Join(node.LabDir, "tftpboot"), 0777) @@ -65,7 +66,7 @@ func (c *CLab) createVrSROSFiles(node *Node) error { cfg := path.Join(node.LabDir, "tftpboot", "config.txt") if node.Config != "" { - err := node.generateConfig(cfg) + err := node.GenerateConfig(cfg, defaultConfigTemplates[node.Kind]) if err != nil { log.Errorf("node=%s, failed to generate config: %v", node.ShortName, err) } diff --git a/clab/vr-veos.go b/clab/vr-veos.go index 1504b2f36..1123fe2fd 100644 --- a/clab/vr-veos.go +++ b/clab/vr-veos.go @@ -1,8 +1,12 @@ package clab -import "fmt" +import ( + "fmt" -func initVrVeosNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initVrVeosNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Image = c.imageInitialization(&nodeCfg, node.Kind) diff --git a/clab/vr-vmx.go b/clab/vr-vmx.go index 605397576..cc3014c11 100644 --- a/clab/vr-vmx.go +++ b/clab/vr-vmx.go @@ -1,8 +1,12 @@ package clab -import "fmt" +import ( + "fmt" -func initVrVMXNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initVrVMXNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Image = c.imageInitialization(&nodeCfg, node.Kind) node.Group = c.groupInitialization(&nodeCfg, node.Kind) diff --git a/clab/vr-xrv.go b/clab/vr-xrv.go index 1117449cc..ec9ac0842 100644 --- a/clab/vr-xrv.go +++ b/clab/vr-xrv.go @@ -1,8 +1,12 @@ package clab -import "fmt" +import ( + "fmt" -func initVrXRVNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initVrXRVNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Image = c.imageInitialization(&nodeCfg, node.Kind) diff --git a/clab/vr-xrv9k.go b/clab/vr-xrv9k.go index 419c5c85f..5bebd583e 100644 --- a/clab/vr-xrv9k.go +++ b/clab/vr-xrv9k.go @@ -1,8 +1,12 @@ package clab -import "fmt" +import ( + "fmt" -func initVrXRV9kNode(c *CLab, nodeCfg NodeConfig, node *Node, user string, envs map[string]string) error { + "github.com/srl-labs/containerlab/types" +) + +func initVrXRV9kNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { var err error node.Image = c.imageInitialization(&nodeCfg, node.Kind) diff --git a/cmd/deploy.go b/cmd/deploy.go index 556f18213..af78892aa 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -10,10 +10,10 @@ import ( "sync" cfssllog "github.com/cloudflare/cfssl/log" - "github.com/docker/docker/api/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/types" ) // name of the container management network @@ -46,7 +46,7 @@ var deployCmd = &cobra.Command{ clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) @@ -95,7 +95,7 @@ var deployCmd = &cobra.Command{ } // create docker network or use existing one - if err = c.CreateDockerNet(ctx); err != nil { + if err = c.Runtime.CreateNet(ctx); err != nil { return err } @@ -128,7 +128,7 @@ var deployCmd = &cobra.Command{ log.Debug("containers created, retrieving state and IP addresses...") labels = append(labels, "containerlab="+c.Config.Name) - containers, err := c.ListContainers(ctx, labels) + containers, err := c.Runtime.ListContainers(ctx, labels) if err != nil { return fmt.Errorf("could not list containers: %v", err) } @@ -146,7 +146,7 @@ var deployCmd = &cobra.Command{ var wg sync.WaitGroup wg.Add(len(c.Nodes)) for _, node := range c.Nodes { - go func(node *clab.Node) { + go func(node *types.Node) { defer wg.Done() err := c.ExecPostDeployTasks(ctx, node, linksMaxWorkers) if err != nil { @@ -200,7 +200,7 @@ func setFlags(conf *clab.Config) { } } -func createHostsFile(containers []types.Container, bridgeName string) error { +func createHostsFile(containers []types.GenericContainer, bridgeName string) error { if bridgeName == "" { return fmt.Errorf("missing bridge name") } @@ -225,33 +225,27 @@ func createHostsFile(containers []types.Container, bridgeName string) error { } // hostEntries builds an /etc/hosts compliant text blob (as []byte]) for containers ipv4/6 address<->name pairs -func hostsEntries(containers []types.Container, bridgeName string) []byte { +func hostsEntries(containers []types.GenericContainer, bridgeName string) []byte { buff := bytes.Buffer{} for _, cont := range containers { if len(cont.Names) == 0 { continue } - if cont.NetworkSettings != nil { - if br, ok := cont.NetworkSettings.Networks[bridgeName]; ok { - if br.IPAddress != "" { - buff.WriteString(br.IPAddress) - buff.WriteString("\t") - buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) - buff.WriteString("\n") - } - if br.GlobalIPv6Address != "" { - buff.WriteString(br.GlobalIPv6Address) - buff.WriteString("\t") - buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) - buff.WriteString("\n") - } - } + if cont.NetworkSettings.Set { + buff.WriteString(cont.NetworkSettings.IPv4addr) + buff.WriteString("\t") + buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) + buff.WriteString("\n") + buff.WriteString(cont.NetworkSettings.IPv6addr) + buff.WriteString("\t") + buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) + buff.WriteString("\n") } } return buff.Bytes() } -func enrichNodes(containers []types.Container, nodes map[string]*clab.Node, mgmtNet string) { +func enrichNodes(containers []types.GenericContainer, nodes map[string]*types.Node, mgmtNet string) { for _, c := range containers { name = c.Labels["clab-node-name"] if node, ok := nodes[name]; ok { @@ -260,11 +254,13 @@ func enrichNodes(containers []types.Container, nodes map[string]*clab.Node, mgmt if strings.ToLower(node.NetworkMode) == "host" { continue } - node.MgmtNet = mgmtNet - node.MgmtIPv4Address = c.NetworkSettings.Networks[mgmtNet].IPAddress - node.MgmtIPv4PrefixLength = c.NetworkSettings.Networks[mgmtNet].IPPrefixLen - node.MgmtIPv6Address = c.NetworkSettings.Networks[mgmtNet].GlobalIPv6Address - node.MgmtIPv6PrefixLength = c.NetworkSettings.Networks[mgmtNet].GlobalIPv6PrefixLen + + if c.NetworkSettings.Set { + node.MgmtIPv4Address = c.NetworkSettings.IPv4addr + node.MgmtIPv4PrefixLength = c.NetworkSettings.IPv4pLen + node.MgmtIPv6Address = c.NetworkSettings.IPv4addr + node.MgmtIPv6PrefixLength = c.NetworkSettings.IPv6pLen + } node.ContainerID = c.ID } diff --git a/cmd/destroy.go b/cmd/destroy.go index d3b7a97bc..9c6f8bc77 100644 --- a/cmd/destroy.go +++ b/cmd/destroy.go @@ -10,10 +10,10 @@ import ( "strings" "sync" - "github.com/docker/docker/api/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/types" ) var cleanup bool @@ -43,7 +43,7 @@ var destroyCmd = &cobra.Command{ clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), clab.WithGracefulShutdown(graceful), } c := clab.NewContainerLab(opts...) @@ -57,11 +57,11 @@ var destroyCmd = &cobra.Command{ opts := []clab.ClabOption{ clab.WithDebug(debug), clab.WithTimeout(timeout), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) // list all containerlab containers - containers, err := c.ListContainers(ctx, []string{"containerlab"}) + containers, err := c.Runtime.ListContainers(ctx, []string{"containerlab"}) if err != nil { return fmt.Errorf("could not list containers: %v", err) } @@ -78,7 +78,7 @@ var destroyCmd = &cobra.Command{ clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), clab.WithGracefulShutdown(graceful), } c = clab.NewContainerLab(opts...) @@ -117,7 +117,7 @@ func init() { destroyCmd.Flags().BoolVarP(&all, "all", "a", false, "destroy all containerlab labs") } -func deleteEntriesFromHostsFile(containers []types.Container, bridgeName string) error { +func deleteEntriesFromHostsFile(containers []types.GenericContainer, bridgeName string) error { if bridgeName == "" { return fmt.Errorf("missing bridge name") } @@ -167,7 +167,7 @@ func deleteEntriesFromHostsFile(containers []types.Container, bridgeName string) } func destroyLab(ctx context.Context, c *clab.CLab) (err error) { - containers, err := c.ListContainers(ctx, []string{fmt.Sprintf("containerlab=%s", c.Config.Name)}) + containers, err := c.Runtime.ListContainers(ctx, []string{fmt.Sprintf("containerlab=%s", c.Config.Name)}) if err != nil { return fmt.Errorf("could not list containers: %v", err) } @@ -185,13 +185,13 @@ func destroyLab(ctx context.Context, c *clab.CLab) (err error) { wg := new(sync.WaitGroup) wg.Add(len(containers)) for _, cont := range containers { - go func(cont types.Container) { + go func(cont types.GenericContainer) { defer wg.Done() name := cont.ID if len(cont.Names) > 0 { name = strings.TrimLeft(cont.Names[0], "/") } - err := c.DeleteContainer(ctx, name) + err := c.Runtime.DeleteContainer(ctx, name) if err != nil { log.Errorf("could not remove container '%s': %v", name, err) } @@ -215,7 +215,7 @@ func destroyLab(ctx context.Context, c *clab.CLab) (err error) { // delete lab management network log.Infof("Deleting docker network '%s'...", c.Config.Mgmt.Network) - if err = c.DeleteBridge(ctx); err != nil { + if err = c.Runtime.DeleteNet(ctx); err != nil { // do not log error message if deletion error simply says that such network doesn't exist if err.Error() != fmt.Sprintf("Error: No such network: %s", c.Config.Mgmt.Network) { log.Error(err) diff --git a/cmd/disableTxOffload.go b/cmd/disableTxOffload.go index 85a740ac2..03b3a2bf2 100644 --- a/cmd/disableTxOffload.go +++ b/cmd/disableTxOffload.go @@ -8,6 +8,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/utils" ) var cntName string @@ -21,27 +22,27 @@ var disableTxOffloadCmd = &cobra.Command{ opts := []clab.ClabOption{ clab.WithDebug(debug), clab.WithTimeout(timeout), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) ctx, cancel := context.WithCancel(context.Background()) defer cancel() - cnt, err := c.DockerClient.ContainerInspect(ctx, cntName) + cnt, err := c.Runtime.ContainerInspect(ctx, cntName) if err != nil { return err } log.Infof("getting container '%s' information", cntName) - NSPath := "/proc/" + strconv.Itoa(cnt.State.Pid) + "/ns/net" + NSPath := "/proc/" + strconv.Itoa(cnt.Pid) + "/ns/net" nodeNS, err := ns.GetNS(NSPath) if err != nil { return err } err = nodeNS.Do(func(_ ns.NetNS) error { // disabling offload on lo0 interface - err = clab.EthtoolTXOff("eth0") + err = utils.EthtoolTXOff("eth0") if err != nil { log.Infof("Failed to disable TX checksum offload for 'eth0' interface for '%s' container", cntName) } diff --git a/cmd/exec.go b/cmd/exec.go index 571058339..b0dbe688a 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -31,7 +31,7 @@ var execCmd = &cobra.Command{ clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) @@ -41,7 +41,7 @@ var execCmd = &cobra.Command{ ctx, cancel := context.WithCancel(context.Background()) defer cancel() labels = append(labels, "containerlab="+name) - containers, err := c.ListContainers(ctx, labels) + containers, err := c.Runtime.ListContainers(ctx, labels) if err != nil { log.Fatalf("could not list containers: %v", err) } @@ -57,7 +57,7 @@ var execCmd = &cobra.Command{ if cont.State != "running" { continue } - stdout, stderr, err := c.Exec(ctx, cont.ID, cmds) + stdout, stderr, err := c.Runtime.Exec(ctx, cont.ID, cmds) if err != nil { log.Errorf("%s: failed to execute cmd: %v", cont.Names, err) continue diff --git a/cmd/graph.go b/cmd/graph.go index dd8f65ebf..8070fa09c 100644 --- a/cmd/graph.go +++ b/cmd/graph.go @@ -9,10 +9,10 @@ import ( "sort" "strings" - "github.com/docker/docker/api/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/types" ) const ( @@ -51,7 +51,7 @@ var graphCmd = &cobra.Command{ clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) @@ -74,11 +74,11 @@ var graphCmd = &cobra.Command{ ctx, cancel := context.WithCancel(context.Background()) defer cancel() - var containers []types.Container + var containers []types.GenericContainer // if offline mode is not enforced, list containers matching lab name if !offline { var err error - containers, err = c.ListContainers(ctx, []string{fmt.Sprintf("containerlab=%s", c.Config.Name)}) + containers, err = c.Runtime.ListContainers(ctx, []string{fmt.Sprintf("containerlab=%s", c.Config.Name)}) if err != nil { log.Errorf("could not list containers: %v", err) } @@ -142,7 +142,7 @@ func buildGraphFromTopo(g *graphTopo, c *clab.CLab) { } -func buildGraphFromDeployedLab(g *graphTopo, c *clab.CLab, containers []types.Container) { +func buildGraphFromDeployedLab(g *graphTopo, c *clab.CLab, containers []types.GenericContainer) { for _, cont := range containers { var name string if len(cont.Names) > 0 { diff --git a/cmd/inspect.go b/cmd/inspect.go index 817f8758b..0baee34d2 100644 --- a/cmd/inspect.go +++ b/cmd/inspect.go @@ -9,11 +9,11 @@ import ( "sort" "strings" - "github.com/docker/docker/api/types" "github.com/olekukonko/tablewriter" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/types" ) var format string @@ -50,7 +50,7 @@ var inspectCmd = &cobra.Command{ clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) if name == "" { @@ -63,7 +63,7 @@ var inspectCmd = &cobra.Command{ } else { labels = append(labels, "containerlab="+name) } - containers, err := c.ListContainers(ctx, labels) + containers, err := c.Runtime.ListContainers(ctx, labels) if err != nil { log.Fatalf("could not list containers: %v", err) } @@ -103,7 +103,7 @@ func toTableData(det []containerDetails) [][]string { return tabData } -func printContainerInspect(c *clab.CLab, containers []types.Container, bridgeName string, format string) { +func printContainerInspect(c *clab.CLab, containers []types.GenericContainer, bridgeName string, format string) { contDetails := make([]containerDetails, 0, len(containers)) // do not print published ports unless mysocketio kind is found printMysocket := false @@ -182,7 +182,7 @@ func printContainerInspect(c *clab.CLab, containers []types.Container, bridgeNam if !printMysocket { return } - stdout, stderr, err := c.Exec(context.Background(), mysocketCID, []string{"mysocketctl", "socket", "ls"}) + stdout, stderr, err := c.Runtime.Exec(context.Background(), mysocketCID, []string{"mysocketctl", "socket", "ls"}) if err != nil { log.Errorf("failed to execute cmd: %v", err) @@ -194,38 +194,18 @@ func printContainerInspect(c *clab.CLab, containers []types.Container, bridgeNam fmt.Println(string(stdout)) } -func getContainerIPv4(container types.Container, bridgeName string) string { - if container.NetworkSettings == nil { +func getContainerIPv4(ctr types.GenericContainer, bridgeName string) string { + if !ctr.NetworkSettings.Set { return "" } - if bridgeName != "" { - if br, ok := container.NetworkSettings.Networks[bridgeName]; ok { - return fmt.Sprintf("%s/%d", br.IPAddress, br.IPPrefixLen) - } - } - for _, br := range container.NetworkSettings.Networks { - return fmt.Sprintf("%s/%d", br.IPAddress, br.IPPrefixLen) - } - return "" + + return fmt.Sprintf("%s/%d", ctr.NetworkSettings.IPv4addr, ctr.NetworkSettings.IPv4pLen) + } -func getContainerIPv6(container types.Container, bridgeName string) string { - if container.NetworkSettings == nil { +func getContainerIPv6(ctr types.GenericContainer, bridgeName string) string { + if !ctr.NetworkSettings.Set { return "" } - if bridgeName != "" { - if br, ok := container.NetworkSettings.Networks[bridgeName]; ok { - if br.GlobalIPv6Address == "" { - return "NA" - } - return fmt.Sprintf("%s/%d", br.GlobalIPv6Address, br.GlobalIPv6PrefixLen) - } - } - for _, br := range container.NetworkSettings.Networks { - if br.GlobalIPv6Address == "" { - return "NA" - } - return fmt.Sprintf("%s/%d", br.GlobalIPv6Address, br.GlobalIPv6PrefixLen) - } - return "" + return fmt.Sprintf("%s/%d", ctr.NetworkSettings.IPv6addr, ctr.NetworkSettings.IPv6pLen) } diff --git a/cmd/root.go b/cmd/root.go index a892df624..c7ec0a112 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -7,6 +7,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" + "github.com/srl-labs/containerlab/runtime" ) var debug bool @@ -15,6 +16,7 @@ var timeout time.Duration // path to the topology file var topo string var graph bool +var rt string // lab name var name string @@ -46,6 +48,7 @@ func init() { rootCmd.MarkPersistentFlagFilename("topo", "*.yaml", "*.yml") rootCmd.PersistentFlags().StringVarP(&name, "name", "n", "", "lab name") rootCmd.PersistentFlags().DurationVarP(&timeout, "timeout", "", 30*time.Second, "timeout for docker requests, e.g: 30s, 1m, 2m30s") + rootCmd.PersistentFlags().StringVarP(&rt, "runtime", "r", runtime.DockerRuntime, "container runtime") } diff --git a/cmd/save.go b/cmd/save.go index df61ce960..e8297f493 100644 --- a/cmd/save.go +++ b/cmd/save.go @@ -8,10 +8,10 @@ import ( "sync" "github.com/Juniper/go-netconf/netconf" - "github.com/docker/docker/api/types" log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/types" ) var saveCommand = map[string][]string{ @@ -35,14 +35,14 @@ Refer to the https://containerlab.srlinux.dev/cmd/save/ documentation to see the clab.WithDebug(debug), clab.WithTimeout(timeout), clab.WithTopoFile(topo), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) ctx, cancel := context.WithCancel(context.Background()) defer cancel() - containers, err := c.ListContainers(ctx, []string{"containerlab=" + c.Config.Name}) + containers, err := c.Runtime.ListContainers(ctx, []string{"containerlab=" + c.Config.Name}) if err != nil { return fmt.Errorf("could not list containers: %v", err) } @@ -53,7 +53,7 @@ Refer to the https://containerlab.srlinux.dev/cmd/save/ documentation to see the var wg sync.WaitGroup wg.Add(len(containers)) for _, cont := range containers { - go func(cont types.Container) { + go func(cont types.GenericContainer) { defer wg.Done() kind := cont.Labels["clab-node-kind"] @@ -68,7 +68,7 @@ Refer to the https://containerlab.srlinux.dev/cmd/save/ documentation to see the if _, ok := saveCommand[kind]; !ok { return } - stdout, stderr, err := c.Exec(ctx, cont.ID, saveCommand[kind]) + stdout, stderr, err := c.Runtime.Exec(ctx, cont.ID, saveCommand[kind]) if err != nil { log.Errorf("%s: failed to execute cmd: %v", cont.Names, err) @@ -110,7 +110,7 @@ func init() { rootCmd.AddCommand(saveCmd) } -func netconfSave(cont types.Container) { +func netconfSave(cont types.GenericContainer) { kind := cont.Labels["clab-node-kind"] config := netconf.SSHConfigPassword(clab.DefaultCredentials[kind][0], clab.DefaultCredentials[kind][1]) diff --git a/cmd/tools_veth.go b/cmd/tools_veth.go index ec6b1b696..6eaad1000 100644 --- a/cmd/tools_veth.go +++ b/cmd/tools_veth.go @@ -9,6 +9,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" + "github.com/srl-labs/containerlab/types" ) var AEnd = "" @@ -36,7 +37,7 @@ var vethCreateCmd = &cobra.Command{ opts := []clab.ClabOption{ clab.WithDebug(debug), clab.WithTimeout(timeout), - clab.WithEnvDockerClient(), + clab.WithRuntime(rt, debug, timeout, graceful), } c := clab.NewContainerLab(opts...) @@ -53,14 +54,14 @@ var vethCreateCmd = &cobra.Command{ return err } - aNode := &clab.Node{ + aNode := &types.Node{ LongName: vethAEndpoint.node, ShortName: vethAEndpoint.node, Kind: vethAEndpoint.kind, NSPath: "__host", // NSPath defaults to __host to make attachment to host. For attachment to containers the NSPath will be overwritten } - bNode := &clab.Node{ + bNode := &types.Node{ LongName: vethBEndpoint.node, ShortName: vethBEndpoint.node, Kind: vethBEndpoint.kind, @@ -68,13 +69,13 @@ var vethCreateCmd = &cobra.Command{ } if aNode.Kind == "container" { - aNode.NSPath, err = c.GetNSPath(ctx, aNode.LongName) + aNode.NSPath, err = c.Runtime.GetNSPath(ctx, aNode.LongName) if err != nil { return err } } if bNode.Kind == "container" { - bNode.NSPath, err = c.GetNSPath(ctx, bNode.LongName) + bNode.NSPath, err = c.Runtime.GetNSPath(ctx, bNode.LongName) if err != nil { return err } diff --git a/clab/docker.go b/runtime/docker/docker.go similarity index 61% rename from clab/docker.go rename to runtime/docker/docker.go index 113e83a49..c044b0098 100644 --- a/clab/docker.go +++ b/runtime/docker/docker.go @@ -1,4 +1,4 @@ -package clab +package docker import ( "bytes" @@ -10,45 +10,75 @@ import ( "path" "strconv" "strings" + "time" - "github.com/docker/docker/api/types" + dockerTypes "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" - "github.com/docker/docker/client" + dockerC "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" "github.com/google/shlex" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) const sysctlBase = "/proc/sys" +type DockerRuntime struct { + Client *dockerC.Client + timeout time.Duration + Mgmt types.MgmtNet + debug bool + gracefulShutdown bool +} + +func NewDockerRuntime() *DockerRuntime { + c, err := dockerC.NewEnvClient() + if err != nil { + log.Fatalf("failed to create docker client: %v", err) + } + + return &DockerRuntime{ + Client: c, + // TODO: undo this hard-coding + timeout: 10 * time.Second, + debug: false, + gracefulShutdown: false, + } +} + +func (c *DockerRuntime) SetMgmtNet(n types.MgmtNet) { + c.Mgmt = n +} + // CreateDockerNet creates a docker network or reusing if it exists -func (c *CLab) CreateDockerNet(ctx context.Context) (err error) { +func (c *DockerRuntime) CreateNet(ctx context.Context) (err error) { nctx, cancel := context.WithTimeout(ctx, c.timeout) defer cancel() // linux bridge name that is used by docker network var bridgeName string - log.Debugf("Checking if docker network '%s' exists", c.Config.Mgmt.Network) - netResource, err := c.DockerClient.NetworkInspect(nctx, c.Config.Mgmt.Network) + log.Debugf("Checking if docker network '%s' exists", c.Mgmt.Network) + netResource, err := c.Client.NetworkInspect(nctx, c.Mgmt.Network) switch { - case client.IsErrNetworkNotFound(err): - log.Debugf("Network '%s' does not exist", c.Config.Mgmt.Network) + case dockerC.IsErrNetworkNotFound(err): + log.Debugf("Network '%s' does not exist", c.Mgmt.Network) log.Infof("Creating docker network: Name='%s', IPv4Subnet='%s', IPv6Subnet='%s', MTU='%s'", - c.Config.Mgmt.Network, c.Config.Mgmt.IPv4Subnet, c.Config.Mgmt.IPv6Subnet, c.Config.Mgmt.MTU) + c.Mgmt.Network, c.Mgmt.IPv4Subnet, c.Mgmt.IPv6Subnet, c.Mgmt.MTU) enableIPv6 := false var ipamConfig []network.IPAMConfig - if c.Config.Mgmt.IPv4Subnet != "" { + if c.Mgmt.IPv4Subnet != "" { ipamConfig = append(ipamConfig, network.IPAMConfig{ - Subnet: c.Config.Mgmt.IPv4Subnet, + Subnet: c.Mgmt.IPv4Subnet, }) } - if c.Config.Mgmt.IPv6Subnet != "" { + if c.Mgmt.IPv6Subnet != "" { ipamConfig = append(ipamConfig, network.IPAMConfig{ - Subnet: c.Config.Mgmt.IPv6Subnet, + Subnet: c.Mgmt.IPv6Subnet, }) enableIPv6 = true } @@ -58,7 +88,7 @@ func (c *CLab) CreateDockerNet(ctx context.Context) (err error) { Config: ipamConfig, } - networkOptions := types.NetworkCreate{ + networkOptions := dockerTypes.NetworkCreate{ CheckDuplicate: true, Driver: "bridge", EnableIPv6: enableIPv6, @@ -69,11 +99,11 @@ func (c *CLab) CreateDockerNet(ctx context.Context) (err error) { "containerlab": "", }, Options: map[string]string{ - "com.docker.network.driver.mtu": c.Config.Mgmt.MTU, + "com.docker.network.driver.mtu": c.Mgmt.MTU, }, } - netCreateResponse, err := c.DockerClient.NetworkCreate(nctx, c.Config.Mgmt.Network, networkOptions) + netCreateResponse, err := c.Client.NetworkCreate(nctx, c.Mgmt.Network, networkOptions) if err != nil { return err } @@ -84,11 +114,11 @@ func (c *CLab) CreateDockerNet(ctx context.Context) (err error) { bridgeName = "br-" + netCreateResponse.ID[:12] case err == nil: - log.Debugf("network '%s' was found. Reusing it...", c.Config.Mgmt.Network) + log.Debugf("network '%s' was found. Reusing it...", c.Mgmt.Network) if len(netResource.ID) < 12 { return fmt.Errorf("could not get bridge ID") } - switch c.Config.Mgmt.Network { + switch c.Mgmt.Network { case "bridge": bridgeName = "docker0" default: @@ -98,9 +128,9 @@ func (c *CLab) CreateDockerNet(ctx context.Context) (err error) { default: return err } - c.Config.Mgmt.Bridge = bridgeName + c.Mgmt.Bridge = bridgeName - log.Debugf("Docker network '%s', bridge name '%s'", c.Config.Mgmt.Network, bridgeName) + log.Debugf("Docker network '%s', bridge name '%s'", c.Mgmt.Network, bridgeName) log.Debug("Disable RPF check on the docker host") err = setSysctl("net/ipv4/conf/all/rp_filter", 0) @@ -121,32 +151,33 @@ func (c *CLab) CreateDockerNet(ctx context.Context) (err error) { } log.Debugf("Disabling TX checksum offloading for the %s bridge interface...", bridgeName) - err = EthtoolTXOff(bridgeName) + err = utils.EthtoolTXOff(bridgeName) if err != nil { log.Warnf("failed to disable TX checksum offloading for the %s bridge interface: %v", bridgeName, err) } return nil } -// DeleteBridge deletes a docker bridge -func (c *CLab) DeleteBridge(ctx context.Context) (err error) { +// DeleteNet deletes a docker bridge +func (c *DockerRuntime) DeleteNet(ctx context.Context) (err error) { nctx, cancel := context.WithTimeout(ctx, c.timeout) defer cancel() - nres, err := c.DockerClient.NetworkInspect(ctx, c.Config.Mgmt.Network) + + nres, err := c.Client.NetworkInspect(ctx, c.Mgmt.Network) if err != nil { return err } numEndpoints := len(nres.Containers) if numEndpoints > 0 { if c.debug { - log.Debugf("network '%s' has %d active endpoints, deletion skipped", c.Config.Mgmt.Network, numEndpoints) + log.Debugf("network '%s' has %d active endpoints, deletion skipped", c.Mgmt.Network, numEndpoints) for _, endp := range nres.Containers { - log.Debugf("'%s' is connected to %s", endp.Name, c.Config.Mgmt.Network) + log.Debugf("'%s' is connected to %s", endp.Name, c.Mgmt.Network) } } return nil } - err = c.DockerClient.NetworkRemove(nctx, c.Config.Mgmt.Network) + err = c.Client.NetworkRemove(nctx, c.Mgmt.Network) if err != nil { return err } @@ -154,7 +185,7 @@ func (c *CLab) DeleteBridge(ctx context.Context) (err error) { } // CreateContainer creates a docker container -func (c *CLab) CreateContainer(ctx context.Context, node *Node) (err error) { +func (c *DockerRuntime) CreateContainer(ctx context.Context, node *types.Node) (err error) { log.Infof("Creating container: %s", node.ShortName) nctx, cancel := context.WithTimeout(ctx, c.timeout) @@ -168,7 +199,7 @@ func (c *CLab) CreateContainer(ctx context.Context, node *Node) (err error) { containerConfig := &container.Config{ Image: node.Image, Cmd: cmd, - Env: convertEnvs(node.Env), + Env: utils.ConvertEnvs(node.Env), AttachStdout: true, AttachStderr: true, Hostname: node.ShortName, @@ -183,7 +214,7 @@ func (c *CLab) CreateContainer(ctx context.Context, node *Node) (err error) { PortBindings: node.PortBindings, Sysctls: node.Sysctls, Privileged: true, - NetworkMode: container.NetworkMode(c.Config.Mgmt.Network), + NetworkMode: container.NetworkMode(c.Mgmt.Network), } containerNetworkingConfig := &network.NetworkingConfig{} @@ -192,10 +223,10 @@ func (c *CLab) CreateContainer(ctx context.Context, node *Node) (err error) { case "host": containerHostConfig.NetworkMode = container.NetworkMode("host") default: - containerHostConfig.NetworkMode = container.NetworkMode(c.Config.Mgmt.Network) + containerHostConfig.NetworkMode = container.NetworkMode(c.Mgmt.Network) containerNetworkingConfig.EndpointsConfig = map[string]*network.EndpointSettings{ - c.Config.Mgmt.Network: { + c.Mgmt.Network: { IPAMConfig: &network.EndpointIPAMConfig{ IPv4Address: node.MgmtIPv4Address, IPv6Address: node.MgmtIPv6Address, @@ -204,7 +235,7 @@ func (c *CLab) CreateContainer(ctx context.Context, node *Node) (err error) { } } - cont, err := c.DockerClient.ContainerCreate(nctx, + cont, err := c.Client.ContainerCreate(nctx, containerConfig, containerHostConfig, containerNetworkingConfig, node.LongName) if err != nil { return err @@ -222,33 +253,33 @@ func (c *CLab) CreateContainer(ctx context.Context, node *Node) (err error) { if err != nil { return err } - return linkContainerNS(node.NSPath, node.LongName) + return c.LinkContainerNS(node.NSPath, node.LongName) } // GetNSPath inspects a container by its name/id and returns an netns path using the pid of a container -func (c *CLab) GetNSPath(ctx context.Context, containerId string) (string, error) { +func (c *DockerRuntime) GetNSPath(ctx context.Context, containerId string) (string, error) { nctx, cancelFn := context.WithTimeout(ctx, c.timeout) defer cancelFn() - cJSON, err := c.DockerClient.ContainerInspect(nctx, containerId) + cJSON, err := c.Client.ContainerInspect(nctx, containerId) if err != nil { return "", err } return "/proc/" + strconv.Itoa(cJSON.State.Pid) + "/ns/net", nil } -func (c *CLab) PullImageIfRequired(ctx context.Context, imageName string) error { +func (c *DockerRuntime) PullImageIfRequired(ctx context.Context, imageName string) error { filter := filters.NewArgs() filter.Add("reference", imageName) - ilo := types.ImageListOptions{ + ilo := dockerTypes.ImageListOptions{ All: false, Filters: filter, } log.Debugf("Looking up %s Docker image", imageName) - images, err := c.DockerClient.ImageList(ctx, ilo) + images, err := c.Client.ImageList(ctx, ilo) if err != nil { return err } @@ -282,7 +313,7 @@ func (c *CLab) PullImageIfRequired(ctx context.Context, imageName string) error } log.Infof("Pulling %s Docker image", canonicalImageName) - reader, err := c.DockerClient.ImagePull(ctx, canonicalImageName, types.ImagePullOptions{}) + reader, err := c.Client.ImagePull(ctx, canonicalImageName, dockerTypes.ImagePullOptions{}) if err != nil { return err } @@ -295,12 +326,12 @@ func (c *CLab) PullImageIfRequired(ctx context.Context, imageName string) error } // StartContainer starts a docker container -func (c *CLab) StartContainer(ctx context.Context, id string) error { +func (c *DockerRuntime) StartContainer(ctx context.Context, id string) error { nctx, cancel := context.WithTimeout(ctx, c.timeout) defer cancel() - return c.DockerClient.ContainerStart(nctx, + return c.Client.ContainerStart(nctx, id, - types.ContainerStartOptions{ + dockerTypes.ContainerStartOptions{ CheckpointID: "", CheckpointDir: "", }, @@ -308,26 +339,60 @@ func (c *CLab) StartContainer(ctx context.Context, id string) error { } // ListContainers lists all containers with labels []string -func (c *CLab) ListContainers(ctx context.Context, labels []string) ([]types.Container, error) { +func (c *DockerRuntime) ListContainers(ctx context.Context, labels []string) ([]types.GenericContainer, error) { ctx, cancel := context.WithTimeout(ctx, c.timeout) defer cancel() filter := filters.NewArgs() for _, l := range labels { filter.Add("label", l) } - return c.DockerClient.ContainerList(ctx, types.ContainerListOptions{ + ctrs, err := c.Client.ContainerList(ctx, dockerTypes.ContainerListOptions{ All: true, Filters: filter, }) + if err != nil { + return nil, err + } + + return c.produceGenericContainerList(ctrs) +} + +// Transform docker-specific to generic container format +func (c *DockerRuntime) produceGenericContainerList(input []dockerTypes.Container) ([]types.GenericContainer, error) { + var result []types.GenericContainer + + for _, i := range input { + ctr := types.GenericContainer{ + Names: i.Names, + ID: i.ID, + Image: i.Image, + State: i.State, + Status: i.Status, + Labels: i.Labels, + NetworkSettings: &types.GenericMgmtIPs{ + Set: false, + }, + } + if ifcfg, ok := i.NetworkSettings.Networks[c.Mgmt.Network]; ok { + ctr.NetworkSettings.IPv4addr = ifcfg.IPAddress + ctr.NetworkSettings.IPv4pLen = ifcfg.IPPrefixLen + ctr.NetworkSettings.IPv6addr = ifcfg.GlobalIPv6Address + ctr.NetworkSettings.IPv6pLen = ifcfg.GlobalIPv6PrefixLen + ctr.NetworkSettings.Set = true + } + result = append(result, ctr) + } + + return result, nil } // Exec executes cmd on container identified with id and returns stdout, stderr bytes and an error -func (c *CLab) Exec(ctx context.Context, id string, cmd []string) ([]byte, []byte, error) { - cont, err := c.DockerClient.ContainerInspect(ctx, id) +func (c *DockerRuntime) Exec(ctx context.Context, id string, cmd []string) ([]byte, []byte, error) { + cont, err := c.Client.ContainerInspect(ctx, id) if err != nil { return nil, nil, err } - execID, err := c.DockerClient.ContainerExecCreate(ctx, id, types.ExecConfig{ + execID, err := c.Client.ContainerExecCreate(ctx, id, dockerTypes.ExecConfig{ User: "root", AttachStderr: true, AttachStdout: true, @@ -338,7 +403,7 @@ func (c *CLab) Exec(ctx context.Context, id string, cmd []string) ([]byte, []byt return nil, nil, err } log.Debugf("%s exec created %v", cont.Name, id) - rsp, err := c.DockerClient.ContainerExecAttach(ctx, execID.ID, types.ExecConfig{ + rsp, err := c.Client.ContainerExecAttach(ctx, execID.ID, dockerTypes.ExecConfig{ User: "root", AttachStderr: true, AttachStdout: true, @@ -371,13 +436,13 @@ func (c *CLab) Exec(ctx context.Context, id string, cmd []string) ([]byte, []byt } // ExecNotWait executes cmd on container identified with id but doesn't wait for output nor attaches stodout/err -func (c *CLab) ExecNotWait(ctx context.Context, id string, cmd []string) error { - execConfig := types.ExecConfig{Tty: false, AttachStdout: false, AttachStderr: false, Cmd: cmd} - respID, err := c.DockerClient.ContainerExecCreate(context.Background(), id, execConfig) +func (c *DockerRuntime) ExecNotWait(ctx context.Context, id string, cmd []string) error { + execConfig := dockerTypes.ExecConfig{Tty: false, AttachStdout: false, AttachStderr: false, Cmd: cmd} + respID, err := c.Client.ContainerExecCreate(context.Background(), id, execConfig) if err != nil { return err } - _, err = c.DockerClient.ContainerExecAttach(context.Background(), respID.ID, execConfig) + _, err = c.Client.ContainerExecAttach(context.Background(), respID.ID, execConfig) if err != nil { return err } @@ -385,19 +450,19 @@ func (c *CLab) ExecNotWait(ctx context.Context, id string, cmd []string) error { } // DeleteContainer tries to stop a container then remove it -func (c *CLab) DeleteContainer(ctx context.Context, name string) error { +func (c *DockerRuntime) DeleteContainer(ctx context.Context, name string) error { var err error force := !c.gracefulShutdown if c.gracefulShutdown { log.Infof("Stopping container: %s", name) - err = c.DockerClient.ContainerStop(ctx, name, &c.timeout) + err = c.Client.ContainerStop(ctx, name, &c.timeout) if err != nil { log.Errorf("could not stop container '%s': %v", name, err) force = true } } log.Debugf("Removing container: %s", name) - err = c.DockerClient.ContainerRemove(ctx, name, types.ContainerRemoveOptions{Force: force}) + err = c.Client.ContainerRemove(ctx, name, dockerTypes.ContainerRemoveOptions{Force: force}) if err != nil { return err } @@ -407,8 +472,8 @@ func (c *CLab) DeleteContainer(ctx context.Context, name string) error { // linkContainerNS creates a symlink for containers network namespace // so that it can be managed by iproute2 utility -func linkContainerNS(nspath string, containerName string) error { - CreateDirectory("/run/netns/", 0755) +func (c *DockerRuntime) LinkContainerNS(nspath string, containerName string) error { + utils.CreateDirectory("/run/netns/", 0755) dst := "/run/netns/" + containerName err := os.Symlink(nspath, dst) if err != nil { @@ -422,12 +487,16 @@ func setSysctl(sysctl string, newVal int) error { return ioutil.WriteFile(path.Join(sysctlBase, sysctl), []byte(strconv.Itoa(newVal)), 0640) } -// getDefaultDockerMTU gets the MTU of a docker0 bridge interface -// if fails to get the MTU of docker0, returns "1500" -func getDefaultDockerMTU() (string, error) { - b, err := bridgeByName("docker0") +func (c *DockerRuntime) ContainerInspect(ctx context.Context, id string) (*types.GenericContainer, error) { + ctr, err := c.Client.ContainerInspect(ctx, id) if err != nil { - return "1500", err + return nil, err } - return fmt.Sprint(b.MTU), nil + return &types.GenericContainer{ + Pid: ctr.State.Pid, + }, nil +} + +func (c *DockerRuntime) StopContainer(context.Context, string, *time.Duration) error { + return nil } diff --git a/runtime/runtime.go b/runtime/runtime.go new file mode 100644 index 000000000..3bcd4996d --- /dev/null +++ b/runtime/runtime.go @@ -0,0 +1,58 @@ +package runtime + +import ( + "context" + "log" + "time" + + "github.com/srl-labs/containerlab/runtime/docker" + "github.com/srl-labs/containerlab/types" +) + +const ( + DockerRuntime = "docker" + ContainerdRuntime = "containerd" +) + +type ContainerRuntime interface { + // Set the network management details (generated by the config.go) + SetMgmtNet(types.MgmtNet) + // Create container (bridge) network + CreateNet(context.Context) error + // Delete container (bridge) network + DeleteNet(context.Context) error + // Pull container image if not present + PullImageIfRequired(context.Context, string) error + // Create container + CreateContainer(context.Context, *types.Node) error + // Start pre-created container by its name + StartContainer(context.Context, string) error + // Stop running container by its name + StopContainer(context.Context, string, *time.Duration) error + // Create a creates a symlink for containers network namespace so that it can be managed by iproute2 utility + LinkContainerNS(string, string) error + // List all containers matching labels + ListContainers(context.Context, []string) ([]types.GenericContainer, error) + // Inspect container (extract its PID) + ContainerInspect(context.Context, string) (*types.GenericContainer, error) + // Get a netns path using the pid of a container + GetNSPath(context.Context, string) (string, error) + // Executes cmd on container identified with id and returns stdout, stderr bytes and an error + Exec(context.Context, string, []string) ([]byte, []byte, error) + // ExecNotWait executes cmd on container identified with id but doesn't wait for output nor attaches stodout/err + ExecNotWait(context.Context, string, []string) error + // Delete container by its name + DeleteContainer(context.Context, string) error +} + +func NewRuntime(name string, d bool, dur time.Duration, gracefulShutdown bool) ContainerRuntime { + switch name { + case DockerRuntime: + return docker.NewDockerRuntime() + case ContainerdRuntime: + log.Fatalf("%s runtime is not implemented", ContainerdRuntime) + } + + log.Fatalf("Unexpected runtime name: %s", name) + return nil +} diff --git a/types/types.go b/types/types.go new file mode 100644 index 000000000..246fc4581 --- /dev/null +++ b/types/types.go @@ -0,0 +1,111 @@ +package types + +import ( + "bytes" + "os" + "path/filepath" + "text/template" + + "github.com/cloudflare/cfssl/log" + "github.com/docker/go-connections/nat" + "github.com/srl-labs/containerlab/utils" +) + +// mgmtNet struct defines the management network options +// it is provided via docker network object +type MgmtNet struct { + Network string `yaml:"network,omitempty"` // docker network name + Bridge string // linux bridge backing the docker network + IPv4Subnet string `yaml:"ipv4_subnet,omitempty"` + IPv6Subnet string `yaml:"ipv6_subnet,omitempty"` + MTU string `yaml:"mtu,omitempty"` +} + +// Node is a struct that contains the information of a container element +type Node struct { + ShortName string + LongName string + Fqdn string + LabDir string // LabDir is a directory related to the node, it contains config items and/or other persistent state + Index int + Group string + Kind string + // path to config template file that is used for config generation + Config string + ResConfig string // path to config file that is actually mounted to the container and is a result of templation + NodeType string + Position string + License string + Image string + Topology string + Sysctls map[string]string + User string + Entrypoint string + Cmd string + Env map[string]string + Binds []string // Bind mounts strings (src:dest:options) + PortBindings nat.PortMap // PortBindings define the bindings between the container ports and host ports + PortSet nat.PortSet // PortSet define the ports that should be exposed on a container + // container networking mode. if set to `host` the host networking will be used for this node, else bridged network + NetworkMode string + MgmtNet string // name of the docker network this node is connected to with its first interface + MgmtIPv4Address string + MgmtIPv4PrefixLength int + MgmtIPv6Address string + MgmtIPv6PrefixLength int + MacAddress string + ContainerID string + TLSCert string + TLSKey string + TLSAnchor string + NSPath string // network namespace path for this node + Publish []string //list of ports to publish with mysocketctl + // container labels + Labels map[string]string +} + +// GenerateConfig generates configuration for the nodes +func (node *Node) GenerateConfig(dst, defaultTemplatePath string) error { + if utils.FileExists(dst) && (node.Config == defaultTemplatePath) { + log.Debugf("config file '%s' for node '%s' already exists and will not be generated", dst, node.ShortName) + return nil + } + log.Debugf("generating config for node %s from file %s", node.ShortName, node.Config) + tpl, err := template.New(filepath.Base(node.Config)).ParseFiles(node.Config) + if err != nil { + return err + } + dstBytes := new(bytes.Buffer) + err = tpl.Execute(dstBytes, node) + if err != nil { + return err + } + log.Debugf("node '%s' generated config: %s", node.ShortName, dstBytes.String()) + f, err := os.Create(dst) + if err != nil { + return err + } + defer f.Close() + _, err = f.Write(dstBytes.Bytes()) + return err +} + +// Data struct storing generic container data +type GenericContainer struct { + Names []string + ID string + Image string + State string + Status string + Labels map[string]string + Pid int + NetworkSettings *GenericMgmtIPs +} + +type GenericMgmtIPs struct { + Set bool + IPv4addr string + IPv4pLen int + IPv6addr string + IPv6pLen int +} diff --git a/utils/env.go b/utils/env.go new file mode 100644 index 000000000..a8ebf0544 --- /dev/null +++ b/utils/env.go @@ -0,0 +1,10 @@ +package utils + +// convertEnvs convert env variables passed as a map to a list of them +func ConvertEnvs(m map[string]string) []string { + s := make([]string, 0, len(m)) + for k, v := range m { + s = append(s, k+"="+v) + } + return s +} diff --git a/clab/ethtool.go b/utils/ethtool.go similarity index 98% rename from clab/ethtool.go rename to utils/ethtool.go index 1bdcd9156..342e78b3f 100644 --- a/clab/ethtool.go +++ b/utils/ethtool.go @@ -1,4 +1,4 @@ -package clab +package utils import ( "fmt" diff --git a/utils/file.go b/utils/file.go new file mode 100644 index 000000000..09ddda0c6 --- /dev/null +++ b/utils/file.go @@ -0,0 +1,103 @@ +package utils + +import ( + "fmt" + "io" + "io/ioutil" + "os" +) + +func FileExists(filename string) bool { + f, err := os.Stat(filename) + if os.IsNotExist(err) { + return false + } + return !f.IsDir() +} + +// CopyFile copies a file from src to dst. If src and dst files exist, and are +// the same, then return success. Otherwise, copy the file contents from src to dst. +func CopyFile(src, dst string) (err error) { + sfi, err := os.Stat(src) + if err != nil { + return err + } + if !sfi.Mode().IsRegular() { + // cannot copy non-regular files (e.g., directories, + // symlinks, devices, etc.) + return fmt.Errorf("CopyFile: non-regular source file %s (%q)", sfi.Name(), sfi.Mode().String()) + } + dfi, err := os.Stat(dst) + if err != nil { + if !os.IsNotExist(err) { + return err + } + } else { + if !(dfi.Mode().IsRegular()) { + return fmt.Errorf("CopyFile: non-regular destination file %s (%q)", dfi.Name(), dfi.Mode().String()) + } + if os.SameFile(sfi, dfi) { + return + } + } + return CopyFileContents(src, dst) +} + +// copyFileContents copies the contents of the file named src to the file named +// by dst. The file will be created if it does not already exist. If the +// destination file exists, all it's contents will be replaced by the contents +// of the source file. +func CopyFileContents(src, dst string) (err error) { + in, err := os.Open(src) + if err != nil { + return + } + defer in.Close() + out, err := os.Create(dst) + if err != nil { + return + } + defer func() { + cerr := out.Close() + if err == nil { + err = cerr + } + }() + if _, err = io.Copy(out, in); err != nil { + return + } + err = out.Sync() + return +} + +func CreateFile(file, content string) { + var f *os.File + f, err := os.Create(file) + if err != nil { + panic(err) + } + defer f.Close() + + if _, err := f.WriteString(content + "\n"); err != nil { + panic(err) + } +} + +// CreateDirectory creates a directory by a path with a mode/permission specified by perm. +// If directory exists, the function does not do anything. +func CreateDirectory(path string, perm os.FileMode) { + if _, err := os.Stat(path); os.IsNotExist(err) { + os.MkdirAll(path, perm) + } +} + +func ReadFileContent(file string) ([]byte, error) { + // check file exists + if !FileExists(file) { + return nil, fmt.Errorf("file %s does not exist", file) + } + + // read and return file content + b, err := ioutil.ReadFile(file) + return b, err +} diff --git a/utils/netlink.go b/utils/netlink.go new file mode 100644 index 000000000..53a357d27 --- /dev/null +++ b/utils/netlink.go @@ -0,0 +1,19 @@ +package utils + +import ( + "fmt" + + "github.com/vishvananda/netlink" +) + +func BridgeByName(name string) (*netlink.Bridge, error) { + l, err := netlink.LinkByName(name) + if err != nil { + return nil, fmt.Errorf("could not lookup %q: %v", name, err) + } + br, ok := l.(*netlink.Bridge) + if !ok { + return nil, fmt.Errorf("%q already exists but is not a bridge", name) + } + return br, nil +} From 3b139b0b2ecf5882ccf5fdb0b3afdacf837021af Mon Sep 17 00:00:00 2001 From: networkop Date: Wed, 5 May 2021 18:33:34 +0100 Subject: [PATCH 02/11] linter cleanup --- clab/ceos.go | 3 ++- clab/cert.go | 4 ++-- clab/config.go | 1 - clab/crpd.go | 5 +++-- clab/file.go | 19 ++----------------- clab/graph.go | 10 +++++++--- clab/inventory_test.go | 5 ++++- clab/mysocketio.go | 5 ++++- clab/netlink.go | 4 ++-- clab/srl.go | 3 ++- clab/vr-sros.go | 3 ++- cmd/completion.go | 6 +++--- cmd/deploy.go | 5 +++-- cmd/destroy.go | 7 +++---- cmd/disableTxOffload.go | 2 +- cmd/graph.go | 2 +- cmd/mysocketio.go | 2 +- cmd/root.go | 2 +- cmd/verUpgrade.go | 2 +- cmd/vxlan.go | 6 +++--- runtime/docker/docker.go | 2 +- utils/file.go | 2 +- 22 files changed, 49 insertions(+), 51 deletions(-) diff --git a/clab/ceos.go b/clab/ceos.go index 1f4c3ed32..91e7b7bc2 100644 --- a/clab/ceos.go +++ b/clab/ceos.go @@ -11,6 +11,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) func ceosPostDeploy(ctx context.Context, c *CLab, node *types.Node, lworkers uint) error { @@ -91,7 +92,7 @@ func initCeosNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, en func (c *CLab) createCEOSFiles(node *types.Node) error { // generate config directory - CreateDirectory(path.Join(node.LabDir, "flash"), 0777) + utils.CreateDirectory(path.Join(node.LabDir, "flash"), 0777) cfg := path.Join(node.LabDir, "flash", "startup-config") node.ResConfig = cfg diff --git a/clab/cert.go b/clab/cert.go index aae092fb3..0c1924320 100644 --- a/clab/cert.go +++ b/clab/cert.go @@ -101,7 +101,7 @@ var nodeCSRTempl string = `{ func (c *CLab) GenerateRootCa(csrRootJsonTpl *template.Template, input CaRootInput) (*Certificates, error) { log.Info("Creating root CA") // create root CA root directory - CreateDirectory(c.Dir.LabCARoot, 0755) + utils.CreateDirectory(c.Dir.LabCARoot, 0755) var err error csrBuff := new(bytes.Buffer) err = csrRootJsonTpl.Execute(csrBuff, input) @@ -136,7 +136,7 @@ func (c *CLab) GenerateCert(ca string, caKey string, csrJSONTpl *template.Templa c.m.RLock() defer c.m.RUnlock() - CreateDirectory(targetPath, 0755) + utils.CreateDirectory(targetPath, 0755) var err error csrBuff := new(bytes.Buffer) err = csrJSONTpl.Execute(csrBuff, input) diff --git a/clab/config.go b/clab/config.go index 3ce3d72ab..61389afae 100644 --- a/clab/config.go +++ b/clab/config.go @@ -26,7 +26,6 @@ const ( dockerNetName = "clab" dockerNetIPv4Addr = "172.20.20.0/24" dockerNetIPv6Addr = "2001:172:20:20::/64" - dockerNetMTU = "1500" srlDefaultType = "ixr6" vrsrosDefaultType = "sr-1" // default connection mode for vrnetlab based containers diff --git a/clab/crpd.go b/clab/crpd.go index cc660a15d..e566fe3c1 100644 --- a/clab/crpd.go +++ b/clab/crpd.go @@ -6,6 +6,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) func initCrpdNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { @@ -38,8 +39,8 @@ func initCrpdNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, en func (c *CLab) createCRPDFiles(node *types.Node) error { // create config and logs directory that will be bind mounted to crpd - CreateDirectory(path.Join(node.LabDir, "config"), 0777) - CreateDirectory(path.Join(node.LabDir, "log"), 0777) + utils.CreateDirectory(path.Join(node.LabDir, "config"), 0777) + utils.CreateDirectory(path.Join(node.LabDir, "log"), 0777) // copy crpd config from default template or user-provided conf file cfg := path.Join(node.LabDir, "/config/juniper.conf") diff --git a/clab/file.go b/clab/file.go index e8aae9b23..b4551e1d7 100644 --- a/clab/file.go +++ b/clab/file.go @@ -10,6 +10,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" "gopkg.in/yaml.v2" ) @@ -50,14 +51,6 @@ func (c *CLab) GetTopology(topo string) error { return nil } -func fileExists(filename string) bool { - f, err := os.Stat(filename) - if os.IsNotExist(err) { - return false - } - return !f.IsDir() -} - // CopyFile copies a file from src to dst. If src and dst files exist, and are // the same, then return success. Otherwise, copy the file contents from src to dst. func copyFile(src, dst string) (err error) { @@ -126,14 +119,6 @@ func createFile(file, content string) { } } -// CreateDirectory creates a directory by a path with a mode/permission specified by perm. -// If directory exists, the function does not do anything. -func CreateDirectory(path string, perm os.FileMode) { - if _, err := os.Stat(path); os.IsNotExist(err) { - os.MkdirAll(path, perm) - } -} - // CreateNodeDirStructure create the directory structure and files for the lab nodes func (c *CLab) CreateNodeDirStructure(node *types.Node) (err error) { c.m.RLock() @@ -143,7 +128,7 @@ func (c *CLab) CreateNodeDirStructure(node *types.Node) (err error) { // skip creation of node directory for linux/bridge kinds // since they don't keep any state normally if node.Kind != "linux" && node.Kind != "bridge" { - CreateDirectory(node.LabDir, 0777) + utils.CreateDirectory(node.LabDir, 0777) } switch node.Kind { diff --git a/clab/graph.go b/clab/graph.go index a6170a797..41368bfc7 100644 --- a/clab/graph.go +++ b/clab/graph.go @@ -7,6 +7,7 @@ import ( "github.com/awalterschulze/gographviz" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/utils" ) var g *gographviz.Graph @@ -66,8 +67,8 @@ func (c *CLab) GenerateGraph(topo string) error { } // create graph directory - CreateDirectory(c.Dir.Lab, 0755) - CreateDirectory(c.Dir.LabGraph, 0755) + utils.CreateDirectory(c.Dir.Lab, 0755) + utils.CreateDirectory(c.Dir.LabGraph, 0755) // create graph filename dotfile := c.Dir.LabGraph + "/" + c.TopoFile.name + ".dot" @@ -78,7 +79,10 @@ func (c *CLab) GenerateGraph(topo string) error { // Only try to create png if commandExists("dot") { - generatePngFromDot(dotfile, pngfile) + err := generatePngFromDot(dotfile, pngfile) + if err != nil { + return err + } log.Info("Created ", pngfile) } return nil diff --git a/clab/inventory_test.go b/clab/inventory_test.go index 510e04ca8..afc052e75 100644 --- a/clab/inventory_test.go +++ b/clab/inventory_test.go @@ -37,7 +37,10 @@ func TestGenerateAnsibleInventory(t *testing.T) { } var s strings.Builder - c.generateAnsibleInventory(&s) + err := c.generateAnsibleInventory(&s) + if err != nil { + t.Fatal(err) + } if !cmp.Equal(s.String(), tc.want) { t.Errorf("failed at '%s', expected\n%v, got\n%+v", name, tc.want, s.String()) diff --git a/clab/mysocketio.go b/clab/mysocketio.go index 50f5a1929..5411e16d8 100644 --- a/clab/mysocketio.go +++ b/clab/mysocketio.go @@ -125,7 +125,10 @@ func createMysocketTunnels(ctx context.Context, c *CLab, node *types.Node) error cmd = []string{"/bin/sh", "-c", fmt.Sprintf("mysocketctl tunnel connect --host %s -p %d -s %s -t %s > socket-%s-%s-%d.log", n.LongName, ms.Port, sockID, tunID, n.ShortName, ms.Stype, ms.Port)} log.Debugf("Running mysocketio command %q", cmd) - c.Runtime.ExecNotWait(ctx, node.ContainerID, cmd) + err = c.Runtime.ExecNotWait(ctx, node.ContainerID, cmd) + if err != nil { + return err + } } } return nil diff --git a/clab/netlink.go b/clab/netlink.go index feffc0db4..9ec6aa8f1 100644 --- a/clab/netlink.go +++ b/clab/netlink.go @@ -95,11 +95,11 @@ func (c *CLab) CreateVirtualWiring(l *Link) (err error) { } if err = vA.setVethLink(); err != nil { - netlink.LinkDel(vA.Link) + _ = netlink.LinkDel(vA.Link) return err } if err = vB.setVethLink(); err != nil { - netlink.LinkDel(vB.Link) + _ = netlink.LinkDel(vB.Link) } return err diff --git a/clab/srl.go b/clab/srl.go index 898f27a43..e5e6c7d99 100644 --- a/clab/srl.go +++ b/clab/srl.go @@ -11,6 +11,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) type mac struct { @@ -144,7 +145,7 @@ func (c *CLab) createSRLFiles(node *types.Node) error { // generate a config file if the destination does not exist // if the node has a `config:` statement, the file specified in that section // will be used as a template in nodeGenerateConfig() - CreateDirectory(path.Join(node.LabDir, "config"), 0777) + utils.CreateDirectory(path.Join(node.LabDir, "config"), 0777) dst = path.Join(node.LabDir, "config", "config.json") err = node.GenerateConfig(dst, defaultConfigTemplates[node.Kind]) if err != nil { diff --git a/clab/vr-sros.go b/clab/vr-sros.go index e75111f75..f55cafb1a 100644 --- a/clab/vr-sros.go +++ b/clab/vr-sros.go @@ -6,6 +6,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) func initSROSNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, envs map[string]string) error { @@ -53,7 +54,7 @@ func initSROSNode(c *CLab, nodeCfg NodeConfig, node *types.Node, user string, en func (c *CLab) createVrSROSFiles(node *types.Node) error { // create config directory that will be bind mounted to vrnetlab container at / path - CreateDirectory(path.Join(node.LabDir, "tftpboot"), 0777) + utils.CreateDirectory(path.Join(node.LabDir, "tftpboot"), 0777) if node.License != "" { // copy license file to node specific lab directory diff --git a/cmd/completion.go b/cmd/completion.go index a469b42e8..1cd5d486b 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -47,11 +47,11 @@ fish: Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash": - cmd.Root().GenBashCompletion(os.Stdout) + _ = cmd.Root().GenBashCompletion(os.Stdout) case "zsh": - cmd.Root().GenZshCompletion(os.Stdout) + _ = cmd.Root().GenZshCompletion(os.Stdout) case "fish": - cmd.Root().GenFishCompletion(os.Stdout, true) + _ = cmd.Root().GenFishCompletion(os.Stdout, true) } }, } diff --git a/cmd/deploy.go b/cmd/deploy.go index af78892aa..8178734b5 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -14,6 +14,7 @@ import ( "github.com/spf13/cobra" "github.com/srl-labs/containerlab/clab" "github.com/srl-labs/containerlab/types" + "github.com/srl-labs/containerlab/utils" ) // name of the container management network @@ -68,7 +69,7 @@ var deployCmd = &cobra.Command{ if err != nil { return err } - destroyLab(ctx, c) + _ = destroyLab(ctx, c) log.Infof("Removing %s directory...", c.Dir.Lab) if err := os.RemoveAll(c.Dir.Lab); err != nil { return err @@ -84,7 +85,7 @@ var deployCmd = &cobra.Command{ } log.Info("Creating lab directory: ", c.Dir.Lab) - clab.CreateDirectory(c.Dir.Lab, 0755) + utils.CreateDirectory(c.Dir.Lab, 0755) cfssllog.Level = cfssllog.LevelError if debug { diff --git a/cmd/destroy.go b/cmd/destroy.go index 9c6f8bc77..e0891e9e5 100644 --- a/cmd/destroy.go +++ b/cmd/destroy.go @@ -160,8 +160,8 @@ func deleteEntriesFromHostsFile(containers []types.GenericContainer, bridgeName return err } for _, l := range remainingLines { - f.Write(l) - f.Write([]byte("\n")) + _, _ = f.Write(l) + _, _ = f.Write([]byte("\n")) } return nil } @@ -223,6 +223,5 @@ func destroyLab(ctx context.Context, c *clab.CLab) (err error) { } // delete container network namespaces symlinks - c.DeleteNetnsSymlinks() - return nil + return c.DeleteNetnsSymlinks() } diff --git a/cmd/disableTxOffload.go b/cmd/disableTxOffload.go index 03b3a2bf2..651d27082 100644 --- a/cmd/disableTxOffload.go +++ b/cmd/disableTxOffload.go @@ -59,5 +59,5 @@ var disableTxOffloadCmd = &cobra.Command{ func init() { toolsCmd.AddCommand(disableTxOffloadCmd) disableTxOffloadCmd.Flags().StringVarP(&cntName, "container", "c", "", "container name to disable offload in") - disableTxOffloadCmd.MarkFlagRequired("container") + _ = disableTxOffloadCmd.MarkFlagRequired("container") } diff --git a/cmd/graph.go b/cmd/graph.go index 8070fa09c..213f1109b 100644 --- a/cmd/graph.go +++ b/cmd/graph.go @@ -114,7 +114,7 @@ var graphCmd = &cobra.Command{ } tmpl := template.Must(template.ParseFiles(tmpl)) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - tmpl.Execute(w, topoD) + _ = tmpl.Execute(w, topoD) }) log.Infof("Listening on %s...", srv) diff --git a/cmd/mysocketio.go b/cmd/mysocketio.go index f49b94be6..c679eede0 100644 --- a/cmd/mysocketio.go +++ b/cmd/mysocketio.go @@ -29,7 +29,7 @@ func init() { mysocketioCmd.AddCommand(mysocketioLoginCmd) mysocketioLoginCmd.Flags().StringVarP(&email, "email", "e", "", "Email address") mysocketioLoginCmd.Flags().StringVarP(&password, "password", "p", "", "Password") - mysocketioLoginCmd.MarkFlagRequired("email") + _ = mysocketioLoginCmd.MarkFlagRequired("email") } // vxlanCmd represents the vxlan command container diff --git a/cmd/root.go b/cmd/root.go index c7ec0a112..c711b8b69 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -45,7 +45,7 @@ func init() { rootCmd.SilenceUsage = true rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "d", false, "enable debug mode") rootCmd.PersistentFlags().StringVarP(&topo, "topo", "t", "", "path to the file with topology information") - rootCmd.MarkPersistentFlagFilename("topo", "*.yaml", "*.yml") + _ = rootCmd.MarkPersistentFlagFilename("topo", "*.yaml", "*.yml") rootCmd.PersistentFlags().StringVarP(&name, "name", "n", "", "lab name") rootCmd.PersistentFlags().DurationVarP(&timeout, "timeout", "", 30*time.Second, "timeout for docker requests, e.g: 30s, 1m, 2m30s") rootCmd.PersistentFlags().StringVarP(&rt, "runtime", "r", runtime.DockerRuntime, "container runtime") diff --git a/cmd/verUpgrade.go b/cmd/verUpgrade.go index 74958e8f3..6f005fcdd 100644 --- a/cmd/verUpgrade.go +++ b/cmd/verUpgrade.go @@ -24,7 +24,7 @@ var upgradeCmd = &cobra.Command{ if err != nil { log.Fatalf("Failed to create temp file %s\n", err) } - downloadFile(downloadURL, f) + _ = downloadFile(downloadURL, f) c := exec.Command("bash", f.Name()) c.Stdout = os.Stdout diff --git a/cmd/vxlan.go b/cmd/vxlan.go index fda482142..8307870c3 100644 --- a/cmd/vxlan.go +++ b/cmd/vxlan.go @@ -29,9 +29,9 @@ func init() { vxlanCreateCmd.Flags().StringVarP(&cntLink, "link", "l", "", "link to which 'attach' vxlan tunnel with tc redirect") vxlanCreateCmd.Flags().IntVarP(&vxlanMTU, "mtu", "m", 1554, "VxLAN MTU") - vxlanCreateCmd.MarkFlagRequired("remote") - vxlanCreateCmd.MarkFlagRequired("id") - vxlanCreateCmd.MarkFlagRequired("link") + _ = vxlanCreateCmd.MarkFlagRequired("remote") + _ = vxlanCreateCmd.MarkFlagRequired("id") + _ = vxlanCreateCmd.MarkFlagRequired("link") vxlanDeleteCmd.Flags().StringVarP(&delPrefix, "prefix", "p", "vx-", "delete all containerlab created VxLAN interfaces which start with this prefix") } diff --git a/runtime/docker/docker.go b/runtime/docker/docker.go index c044b0098..d107f06a0 100644 --- a/runtime/docker/docker.go +++ b/runtime/docker/docker.go @@ -319,7 +319,7 @@ func (c *DockerRuntime) PullImageIfRequired(ctx context.Context, imageName strin } defer reader.Close() // must read from reader, otherwise image is not properly pulled - io.Copy(ioutil.Discard, reader) + _, _ = io.Copy(ioutil.Discard, reader) log.Infof("Done pulling %s", canonicalImageName) return nil diff --git a/utils/file.go b/utils/file.go index 09ddda0c6..67dff2061 100644 --- a/utils/file.go +++ b/utils/file.go @@ -87,7 +87,7 @@ func CreateFile(file, content string) { // If directory exists, the function does not do anything. func CreateDirectory(path string, perm os.FileMode) { if _, err := os.Stat(path); os.IsNotExist(err) { - os.MkdirAll(path, perm) + _ = os.MkdirAll(path, perm) } } From f2e6124b1f8d3e8e4cddd4dc1963f14e2d5c9898 Mon Sep 17 00:00:00 2001 From: networkop Date: Wed, 5 May 2021 20:55:55 +0100 Subject: [PATCH 03/11] unit test fixes --- clab/clab.go | 33 +++++++++++++++++++++++++++++++++ clab/config.go | 35 +---------------------------------- cmd/inspect.go | 2 +- runtime/docker/docker.go | 2 +- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/clab/clab.go b/clab/clab.go index 7ff0374b2..fd5b52ad8 100644 --- a/clab/clab.go +++ b/clab/clab.go @@ -54,6 +54,7 @@ func WithTimeout(dur time.Duration) ClabOption { func WithRuntime(name string, d bool, dur time.Duration, gracefulShutdown bool) ClabOption { return func(c *CLab) { c.Runtime = runtime.NewRuntime(name, d, dur, gracefulShutdown) + c.Runtime.SetMgmtNet(c.Config.Mgmt) } } @@ -83,12 +84,44 @@ func NewContainerLab(opts ...ClabOption) *CLab { Nodes: make(map[string]*types.Node), Links: make(map[int]*Link), } + + err := c.initMgmtNetwork() + if err != nil { + log.Fatalf("initMgmtNetwork: %s", err) + } + for _, o := range opts { o(c) } + return c } +// initMgmtNetwork sets management network config +func (c *CLab) initMgmtNetwork() error { + if c.Config.Mgmt.Network == "" { + c.Config.Mgmt.Network = dockerNetName + } + if c.Config.Mgmt.IPv4Subnet == "" && c.Config.Mgmt.IPv6Subnet == "" { + if c.Config.Mgmt.IPv4Subnet == "" { + c.Config.Mgmt.IPv4Subnet = dockerNetIPv4Addr + } + if c.Config.Mgmt.IPv6Subnet == "" { + c.Config.Mgmt.IPv6Subnet = dockerNetIPv6Addr + } + } + // init docker network mtu + if c.Config.Mgmt.MTU == "" { + m, err := getDefaultDockerMTU() + if err != nil { + log.Warnf("Error occurred during getting the default docker MTU: %v", err) + } + c.Config.Mgmt.MTU = m + } + + return nil +} + func (c *CLab) CreateNode(ctx context.Context, node *types.Node, certs *Certificates) error { if certs != nil { c.m.Lock() diff --git a/clab/config.go b/clab/config.go index 61389afae..7d850127d 100644 --- a/clab/config.go +++ b/clab/config.go @@ -144,43 +144,10 @@ type Endpoint struct { EndpointName string } -// initMgmtNetwork sets management network config -func (c *CLab) initMgmtNetwork() error { - if c.Config.Mgmt.Network == "" { - c.Config.Mgmt.Network = dockerNetName - } - if c.Config.Mgmt.IPv4Subnet == "" && c.Config.Mgmt.IPv6Subnet == "" { - if c.Config.Mgmt.IPv4Subnet == "" { - c.Config.Mgmt.IPv4Subnet = dockerNetIPv4Addr - } - if c.Config.Mgmt.IPv6Subnet == "" { - c.Config.Mgmt.IPv6Subnet = dockerNetIPv6Addr - } - } - // init docker network mtu - if c.Config.Mgmt.MTU == "" { - m, err := getDefaultDockerMTU() - if err != nil { - log.Warnf("Error occurred during getting the default docker MTU: %v", err) - } - c.Config.Mgmt.MTU = m - } - - c.Runtime.SetMgmtNet(c.Config.Mgmt) - - return nil -} - // ParseTopology parses the lab topology func (c *CLab) ParseTopology() error { log.Infof("Parsing & checking topology file: %s", c.TopoFile.fullName) log.Debugf("Lab name: %s", c.Config.Name) - // initialize Management network config - err := c.initMgmtNetwork() - if err != nil { - return err - } - log.Debugf("DockerInfo: %v", c.Config.Mgmt) if c.Config.ConfigPath == "" { c.Config.ConfigPath, _ = filepath.Abs(os.Getenv("PWD")) @@ -199,7 +166,7 @@ func (c *CLab) ParseTopology() error { // initialize the Node information from the topology map idx := 0 for nodeName, node := range c.Config.Topology.Nodes { - if err = c.NewNode(nodeName, node, idx); err != nil { + if err := c.NewNode(nodeName, node, idx); err != nil { return err } idx++ diff --git a/cmd/inspect.go b/cmd/inspect.go index 0baee34d2..a9c403f33 100644 --- a/cmd/inspect.go +++ b/cmd/inspect.go @@ -103,7 +103,7 @@ func toTableData(det []containerDetails) [][]string { return tabData } -func printContainerInspect(c *clab.CLab, containers []types.GenericContainer, bridgeName string, format string) { +func printContainerInspect(c *clab.CLab, containers []types.GenericContainer, bridgeName, format string) { contDetails := make([]containerDetails, 0, len(containers)) // do not print published ports unless mysocketio kind is found printMysocket := false diff --git a/runtime/docker/docker.go b/runtime/docker/docker.go index d107f06a0..cca454a00 100644 --- a/runtime/docker/docker.go +++ b/runtime/docker/docker.go @@ -472,7 +472,7 @@ func (c *DockerRuntime) DeleteContainer(ctx context.Context, name string) error // linkContainerNS creates a symlink for containers network namespace // so that it can be managed by iproute2 utility -func (c *DockerRuntime) LinkContainerNS(nspath string, containerName string) error { +func (c *DockerRuntime) LinkContainerNS(nspath, containerName string) error { utils.CreateDirectory("/run/netns/", 0755) dst := "/run/netns/" + containerName err := os.Symlink(nspath, dst) From fe34b4f9ef5fcd318d7596dc0b15dd129f29f6be Mon Sep 17 00:00:00 2001 From: networkop Date: Wed, 5 May 2021 21:02:18 +0100 Subject: [PATCH 04/11] lowercasing error msgs for linter --- clab/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clab/config.go b/clab/config.go index 7d850127d..befe63699 100644 --- a/clab/config.go +++ b/clab/config.go @@ -485,7 +485,7 @@ func (c *CLab) NewNode(nodeName string, nodeCfg NodeConfig, idx int) error { node.Position = c.positionInitialization(&nodeCfg, node.Kind) default: - return fmt.Errorf("Node '%s' refers to a kind '%s' which is not supported. Supported kinds are %q", nodeName, node.Kind, kinds) + return fmt.Errorf("node '%s' refers to a kind '%s' which is not supported. Supported kinds are %q", nodeName, node.Kind, kinds) } // init labels after all node kinds are processed @@ -558,7 +558,7 @@ func (c *CLab) NewEndpoint(e string) *Endpoint { // stop the deployment if the matching node element was not found // "host" node name is an exception, it may exist without a matching node if endpoint.Node == nil { - log.Fatalf("Not all nodes are specified in the 'topology.nodes' section or the names don't match in the 'links.endpoints' section: %s", nName) // skipcq: GO-S0904 + log.Fatalf("not all nodes are specified in the 'topology.nodes' section or the names don't match in the 'links.endpoints' section: %s", nName) // skipcq: GO-S0904 } // initialize the endpoint name based on the split function @@ -694,7 +694,7 @@ func (c *CLab) verifyHostIfaces() error { } } if l.A.Node.NetworkMode == "host" { - return fmt.Errorf("Node '%s' is defined with host network mode, it can't have any links. Remove '%s' node links from the topology definition", + return fmt.Errorf("node '%s' is defined with host network mode, it can't have any links. Remove '%s' node links from the topology definition", l.A.Node.ShortName, l.A.Node.ShortName) } if l.B.Node.ShortName == "host" { @@ -703,7 +703,7 @@ func (c *CLab) verifyHostIfaces() error { } } if l.B.Node.NetworkMode == "host" { - return fmt.Errorf("Node '%s' is defined with host network mode, it can't have any links. Remove '%s' node links from the topology definition", + return fmt.Errorf("node '%s' is defined with host network mode, it can't have any links. Remove '%s' node links from the topology definition", l.B.Node.ShortName, l.B.Node.ShortName) } } From 70a10274089a5e5294acebd71e6f7cb53012cc2c Mon Sep 17 00:00:00 2001 From: networkop Date: Fri, 7 May 2021 16:15:41 +0100 Subject: [PATCH 05/11] Bumped go.mod versions to more recent ones --- go.mod | 27 +- go.sum | 785 +++++++++++++++++++++++++++++++++++++-- runtime/docker/docker.go | 28 +- 3 files changed, 774 insertions(+), 66 deletions(-) diff --git a/go.mod b/go.mod index ba1fcf42d..da246fca9 100644 --- a/go.mod +++ b/go.mod @@ -4,34 +4,25 @@ go 1.15 require ( github.com/Juniper/go-netconf v0.1.1 - github.com/Microsoft/go-winio v0.4.14 // indirect github.com/awalterschulze/gographviz v2.0.1+incompatible github.com/cloudflare/cfssl v1.4.1 - github.com/containernetworking/plugins v0.0.0-20180803153142-19f2f28178aa + github.com/containerd/containerd v1.5.0 // indirect + github.com/containernetworking/plugins v0.9.1 github.com/digitalocean/go-openvswitch v0.0.0-20201214180534-ce0f183468d8 - github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v1.13.1 + github.com/docker/docker v20.10.6+incompatible github.com/docker/go-connections v0.4.0 - github.com/docker/go-units v0.4.0 // indirect - github.com/golang/protobuf v1.3.2 // indirect github.com/google/go-cmp v0.5.4 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 - github.com/google/uuid v1.1.2 + github.com/google/uuid v1.2.0 github.com/hashicorp/go-version v1.2.1 github.com/jsimonetti/rtnetlink v0.0.0-20210226120601-1b79e63a70a0 github.com/mitchellh/go-homedir v1.1.0 + github.com/morikuni/aec v1.0.0 // indirect github.com/olekukonko/tablewriter v0.0.5-0.20201029120751-42e21c7531a3 - github.com/onsi/ginkgo v1.10.2 // indirect - github.com/onsi/gomega v1.7.0 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/sirupsen/logrus v1.6.0 + github.com/sirupsen/logrus v1.7.0 github.com/spf13/cobra v1.0.0 - github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.4.0 // indirect - github.com/vishvananda/netlink v1.1.0 - github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect + github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b // indirect - golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 - gopkg.in/yaml.v2 v2.3.0 + golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 + gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 6323aed31..140f5d618 100644 --- a/go.sum +++ b/go.sum @@ -1,102 +1,395 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bitbucket.org/liamstask/goose v0.0.0-20150115234039-8488cc47d90c/go.mod h1:hSVuE3qU7grINVSwrmzHfpg9k87ALBk+XaualNyUzI4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= github.com/Juniper/go-netconf v0.1.1 h1:5fx/T7L2Fwq51UnESPOP1CXgGCs7IYxR/pnyC5quu/k= github.com/Juniper/go-netconf v0.1.1/go.mod h1:2Fy6tQTWnL//D/Ll1hb0RYXN4jndcTyneRn6xj5E1VE= -github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= +github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= +github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= +github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/awalterschulze/gographviz v2.0.1+incompatible h1:XIECBRq9VPEQqkQL5pw2OtjCAdrtIgFKoJU8eT98AS8= github.com/awalterschulze/gographviz v2.0.1+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/backoff v0.0.0-20161212185259-647f3cdfc87a/go.mod h1:rzgs2ZOiguV6/NpiDgADjRLPNyZlApIWxKpkT+X8SdY= github.com/cloudflare/cfssl v1.4.1 h1:vScfU2DrIUI9VPHBVeeAQ0q5A+9yshO1Gz+3QoUQiKw= github.com/cloudflare/cfssl v1.4.1/go.mod h1:KManx/OJPb5QY+y0+o/898AMcM128sF0bURvoVUSjTo= github.com/cloudflare/go-metrics v0.0.0-20151117154305-6a9aea36fb41/go.mod h1:eaZPlJWD+G9wseg1BuRXlHnjntPMrywMsyxf+LTOdP4= github.com/cloudflare/redoctober v0.0.0-20171127175943-746a508df14c/go.mod h1:6Se34jNoqrd8bTxrmJB2Bg2aoZ2CdSXonils9NsiNgo= -github.com/containernetworking/plugins v0.0.0-20180803153142-19f2f28178aa h1:9H4VmKyDPYBwwR4zI0y9HVDr8Q6Z0phICWBFw1h4810= -github.com/containernetworking/plugins v0.0.0-20180803153142-19f2f28178aa/go.mod h1:dagHaAhNjXjT9QYOklkKJDGaQPTg4pf//FrUcJeb7FU= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= +github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= +github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= +github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= +github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= +github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= +github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= +github.com/containerd/containerd v1.5.0 h1:p9b9VlMObAOuIuZ3EakDGMsq8V59VBlTXi8b8DCLa6o= +github.com/containerd/containerd v1.5.0/go.mod h1:kYiJ+LvywDUKzyax6+UKCk5xwQNCfcGR6KsSdShdg5U= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= +github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= +github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= +github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= +github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= +github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= +github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= +github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= +github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= +github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= +github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8= +github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= +github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/go-openvswitch v0.0.0-20201214180534-ce0f183468d8 h1:RQAD2flP6n+U5sAudMpru+EuLJ6VQduu6yenl6LwM5E= github.com/digitalocean/go-openvswitch v0.0.0-20201214180534-ce0f183468d8/go.mod h1:MpzfscrezUxa94/T4sy2tDaxB+hQ6w0EmRBPv+xHWEs= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo= -github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.6+incompatible h1:oXI3Vas8TI8Eu/EjH4srKHJBVqraSzJybhxY7Om9faQ= +github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getsentry/raven-go v0.0.0-20180121060056-563b81fc02b7/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-sql-driver/mysql v1.3.0 h1:pgwjLi/dvffoP9aabwkT3AKpXQM93QARkjFhDDqC1UE= github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/certificate-transparency-go v1.0.21 h1:Yf1aXowfZ2nuboBsg7iYGLmwsOARdV86pfH3g95wXmE= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548/go.mod h1:hGT6jSUVzF6no3QaDSMLGLEHtHSBSefs+MgcDWnmhmo= github.com/jmoiron/sqlx v0.0.0-20180124204410-05cef0741ade h1:ryslCsfLTV4Cm/9NXqCJirlbYodWqFiTH454IaSn/fY= github.com/jmoiron/sqlx v0.0.0-20180124204410-05cef0741ade/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU= @@ -112,30 +405,52 @@ github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736/go.mod h1:ZXp github.com/jsimonetti/rtnetlink v0.0.0-20210212075122-66c871082f2b/go.mod h1:8w9Rh8m+aHZIG69YPGGem1i5VzoyRC8nw2kA8B+ik5U= github.com/jsimonetti/rtnetlink v0.0.0-20210226120601-1b79e63a70a0 h1:PkBgh5xuEFoVnLGEIi0eTnCbLF682luFMI1Jl0Xp5h8= github.com/jsimonetti/rtnetlink v0.0.0-20210226120601-1b79e63a70a0/go.mod h1:lc6xQnSiIXcD/9LS2KKB5MzikbFcPBownW2BoEthmUA= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49 h1:o/c0aWEP/m6n61xlYW2QP4t9424qlJOsxugn5Zds2Rg= github.com/kisielk/sqlstruct v0.0.0-20150923205031-648daed35d49/go.mod h1:yyMNCyc/Ib3bDTKd379tNMpB/7/H5TjM2Y9QJ5THLbE= github.com/kisom/goutils v1.1.0/go.mod h1:+UBTfd78habUYWFbNWTJNG+jNG/i/lGURakr4A/yNRw= +github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/go-gypsy v0.0.0-20160905020020-08cad365cd28/go.mod h1:T/T7jsxVqf9k/zYOqbgNAsANsjxTd1Yq3htjDhQ1H0c= github.com/lib/pq v0.0.0-20180201184707-88edab080323 h1:Ou506ViB5uo2GloKFWIYi5hwRJn4AAOXuLVv8RMY9+4= github.com/lib/pq v0.0.0-20180201184707-88edab080323/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43 h1:WgyLFv10Ov49JAQI/ZLUkCZ7VJS3r74hwFIGXJsgZlY= github.com/mdlayher/ethtool v0.0.0-20210210192532-2b88debcdd43/go.mod h1:+t7E0lkKfbBsebllff1xdTmyJt8lH37niI6kwFk9OTo= github.com/mdlayher/genetlink v1.0.0 h1:OoHN1OdyEIkScEmRgxLEe2M9U8ClMytqA5niynLtfj0= @@ -150,82 +465,197 @@ github.com/mdlayher/netlink v1.2.2-0.20210123213345-5cc92139ae3e/go.mod h1:bacnN github.com/mdlayher/netlink v1.3.0/go.mod h1:xK/BssKuwcRXHrtN04UBkwQ6dY9VviGGuriDdoPSWys= github.com/mdlayher/netlink v1.4.0 h1:n3ARR+Fm0dDv37dj5wSWZXDKcy+U0zwcXS3zKMnSiT0= github.com/mdlayher/netlink v1.4.0/go.mod h1:dRJi5IABcZpBD2A3D0Mv/AiX8I9uDEu5oGkAVrekmf8= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd h1:aY7OQNf2XqY/JQ6qREWamhI/81os/agb2BAGpcx5yWI= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5-0.20201029120751-42e21c7531a3 h1:cwgAQXGOxP0vqyQ1Q2MpZSy6PGF5Wyl0pe123HyJLt8= github.com/olekukonko/tablewriter v0.0.5-0.20201029120751-42e21c7531a3/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.2 h1:uqH7bpe+ERSiDa34FDOF7RikN6RzXgduUF8yarlZp94= -github.com/onsi/ginkgo v1.10.2/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 h1:cPXZWzzG0NllBLdjWoD1nDfaqu98YMv+OneaKc8sPOA= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/weppos/publicsuffix-go v0.4.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= github.com/weppos/publicsuffix-go v0.5.0 h1:rutRtjBJViU/YjcI5d80t4JAVvDltS6bciJg2K1HrLU= github.com/weppos/publicsuffix-go v0.5.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b h1:VfPXB/wCGGt590QhD1bOpv2J/AmC/RJNTg/Q59HKSB0= github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b/go.mod h1:IZpXDfkJ6tWD3PhBK5YzgQT+xJWh7OsdwiG8hA2MkO4= @@ -236,37 +666,115 @@ github.com/zmap/zcrypto v0.0.0-20190729165852-9051775e6a2e/go.mod h1:w7kd3qXHh8F github.com/zmap/zlint v0.0.0-20190806154020-fd021b4cfbeb h1:vxqkjztXSaPVDc8FQCdHTaejm2x747f6yPbnu1h2xkg= github.com/zmap/zlint v0.0.0-20190806154020-fd021b4cfbeb/go.mod h1:29UiAJNsiVdvTBFCJW8e3q6dcDbOoPkhMgttOSCIMMY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 h1:It14KIkyBFYkHkwZ7k45minvA9aorojkyjGk9KJ5B/w= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -277,54 +785,259 @@ golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201118182958-a01c418693c7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201218084310-7d0127a74742/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210123111255-9b0068b26619/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65 h1:pTMjDVnP5eVRRlWO76rEWJ8JoC6Lf1CmyjPZXRiy2Sw= golang.org/x/sys v0.0.0-20210216163648-f7da38b97c65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+vTOrIifmcYxFBx9TLg= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a h1:pOwg4OoaRYScjmR4LlLgdtnyoHYTSAVhhqe5uPdpII8= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099 h1:XJP7lxbSxWLOMNdBE4B/STaqVy6L73o0knwj2vIlxnw= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= +k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= +k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/runtime/docker/docker.go b/runtime/docker/docker.go index cca454a00..d4744eb74 100644 --- a/runtime/docker/docker.go +++ b/runtime/docker/docker.go @@ -62,9 +62,9 @@ func (c *DockerRuntime) CreateNet(ctx context.Context) (err error) { var bridgeName string log.Debugf("Checking if docker network '%s' exists", c.Mgmt.Network) - netResource, err := c.Client.NetworkInspect(nctx, c.Mgmt.Network) + netResource, err := c.Client.NetworkInspect(nctx, c.Mgmt.Network, dockerTypes.NetworkInspectOptions{}) switch { - case dockerC.IsErrNetworkNotFound(err): + case dockerC.IsErrNotFound(err): log.Debugf("Network '%s' does not exist", c.Mgmt.Network) log.Infof("Creating docker network: Name='%s', IPv4Subnet='%s', IPv6Subnet='%s', MTU='%s'", c.Mgmt.Network, c.Mgmt.IPv4Subnet, c.Mgmt.IPv6Subnet, c.Mgmt.MTU) @@ -163,7 +163,7 @@ func (c *DockerRuntime) DeleteNet(ctx context.Context) (err error) { nctx, cancel := context.WithTimeout(ctx, c.timeout) defer cancel() - nres, err := c.Client.NetworkInspect(ctx, c.Mgmt.Network) + nres, err := c.Client.NetworkInspect(ctx, c.Mgmt.Network, dockerTypes.NetworkInspectOptions{}) if err != nil { return err } @@ -235,8 +235,14 @@ func (c *DockerRuntime) CreateContainer(ctx context.Context, node *types.Node) ( } } - cont, err := c.Client.ContainerCreate(nctx, - containerConfig, containerHostConfig, containerNetworkingConfig, node.LongName) + cont, err := c.Client.ContainerCreate( + nctx, + containerConfig, + containerHostConfig, + containerNetworkingConfig, + nil, + node.LongName, + ) if err != nil { return err } @@ -403,12 +409,8 @@ func (c *DockerRuntime) Exec(ctx context.Context, id string, cmd []string) ([]by return nil, nil, err } log.Debugf("%s exec created %v", cont.Name, id) - rsp, err := c.Client.ContainerExecAttach(ctx, execID.ID, dockerTypes.ExecConfig{ - User: "root", - AttachStderr: true, - AttachStdout: true, - Cmd: cmd, - }) + + rsp, err := c.Client.ContainerExecAttach(ctx, execID.ID, dockerTypes.ExecStartCheck{}) if err != nil { log.Errorf("failed exec in container %s: %v", cont.Name, err) return nil, nil, err @@ -442,7 +444,9 @@ func (c *DockerRuntime) ExecNotWait(ctx context.Context, id string, cmd []string if err != nil { return err } - _, err = c.Client.ContainerExecAttach(context.Background(), respID.ID, execConfig) + + execStartCheck := dockerTypes.ExecStartCheck{} + _, err = c.Client.ContainerExecAttach(context.Background(), respID.ID, execStartCheck) if err != nil { return err } From 3a143b90dcd26a68f79fa4e464e17ef39f12ba40 Mon Sep 17 00:00:00 2001 From: networkop Date: Sat, 8 May 2021 18:37:10 +0100 Subject: [PATCH 06/11] Changed to NewClientWithOpts with API version negotiation --- runtime/docker/docker.go | 10 +++++----- runtime/runtime.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/runtime/docker/docker.go b/runtime/docker/docker.go index d4744eb74..323bd1881 100644 --- a/runtime/docker/docker.go +++ b/runtime/docker/docker.go @@ -34,8 +34,8 @@ type DockerRuntime struct { gracefulShutdown bool } -func NewDockerRuntime() *DockerRuntime { - c, err := dockerC.NewEnvClient() +func NewDockerRuntime(d bool, dur time.Duration, gracefulShutdown bool) *DockerRuntime { + c, err := dockerC.NewClientWithOpts(dockerC.FromEnv, dockerC.WithAPIVersionNegotiation()) if err != nil { log.Fatalf("failed to create docker client: %v", err) } @@ -43,9 +43,9 @@ func NewDockerRuntime() *DockerRuntime { return &DockerRuntime{ Client: c, // TODO: undo this hard-coding - timeout: 10 * time.Second, - debug: false, - gracefulShutdown: false, + timeout: dur, + debug: d, + gracefulShutdown: gracefulShutdown, } } diff --git a/runtime/runtime.go b/runtime/runtime.go index 3bcd4996d..6514080cd 100644 --- a/runtime/runtime.go +++ b/runtime/runtime.go @@ -48,7 +48,7 @@ type ContainerRuntime interface { func NewRuntime(name string, d bool, dur time.Duration, gracefulShutdown bool) ContainerRuntime { switch name { case DockerRuntime: - return docker.NewDockerRuntime() + return docker.NewDockerRuntime(d, dur, gracefulShutdown) case ContainerdRuntime: log.Fatalf("%s runtime is not implemented", ContainerdRuntime) } From f000c0f7411eb473667d5531582f9ebd894f7281 Mon Sep 17 00:00:00 2001 From: networkop Date: Mon, 10 May 2021 12:19:20 +0100 Subject: [PATCH 07/11] Moving Link to 'types' package --- clab/clab.go | 6 +++--- clab/config.go | 27 ++++++--------------------- clab/netlink.go | 3 ++- cmd/tools_veth.go | 6 +++--- types/types.go | 15 +++++++++++++++ 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/clab/clab.go b/clab/clab.go index fd5b52ad8..6fcd02a90 100644 --- a/clab/clab.go +++ b/clab/clab.go @@ -21,7 +21,7 @@ type CLab struct { TopoFile *TopoFile m *sync.RWMutex Nodes map[string]*types.Node - Links map[int]*Link + Links map[int]*types.Link Runtime runtime.ContainerRuntime Dir *Directory @@ -82,7 +82,7 @@ func NewContainerLab(opts ...ClabOption) *CLab { TopoFile: new(TopoFile), m: new(sync.RWMutex), Nodes: make(map[string]*types.Node), - Links: make(map[int]*Link), + Links: make(map[int]*types.Link), } err := c.initMgmtNetwork() @@ -258,7 +258,7 @@ func (c *CLab) CreateNodes(ctx context.Context, workers uint) { func (c *CLab) CreateLinks(ctx context.Context, workers uint, postdeploy bool) { wg := new(sync.WaitGroup) wg.Add(int(workers)) - linksChan := make(chan *Link) + linksChan := make(chan *types.Link) log.Debug("creating links...") // wire the links between the nodes based on cabling plan diff --git a/clab/config.go b/clab/config.go index befe63699..5264d1af6 100644 --- a/clab/config.go +++ b/clab/config.go @@ -129,21 +129,6 @@ type LinkConfig struct { Labels map[string]string `yaml:"labels,omitempty"` } -// Link is a struct that contains the information of a link between 2 containers -type Link struct { - A *Endpoint - B *Endpoint - MTU int - Labels map[string]string -} - -// Endpoint is a struct that contains information of a link endpoint -type Endpoint struct { - Node *types.Node - // e1-x, eth, etc - EndpointName string -} - // ParseTopology parses the lab topology func (c *CLab) ParseTopology() error { log.Infof("Parsing & checking topology file: %s", c.TopoFile.fullName) @@ -161,7 +146,7 @@ func (c *CLab) ParseTopology() error { // initialize Nodes and Links variable c.Nodes = make(map[string]*types.Node) - c.Links = make(map[int]*Link) + c.Links = make(map[int]*types.Link) // initialize the Node information from the topology map idx := 0 @@ -496,9 +481,9 @@ func (c *CLab) NewNode(nodeName string, nodeCfg NodeConfig, idx int) error { } // NewLink initializes a new link object -func (c *CLab) NewLink(l LinkConfig) *Link { +func (c *CLab) NewLink(l LinkConfig) *types.Link { // initialize a new link - link := new(Link) + link := new(types.Link) link.Labels = l.Labels if link.MTU <= 0 { @@ -518,9 +503,9 @@ func (c *CLab) NewLink(l LinkConfig) *Link { } // NewEndpoint initializes a new endpoint object -func (c *CLab) NewEndpoint(e string) *Endpoint { +func (c *CLab) NewEndpoint(e string) *types.Endpoint { // initialize a new endpoint - endpoint := new(Endpoint) + endpoint := new(types.Endpoint) // split the string to get node name and endpoint name split := strings.Split(e, ":") @@ -715,7 +700,7 @@ func (c *CLab) verifyHostIfaces() error { func (c *CLab) verifyRootNetnsInterfaceUniqueness() error { rootNsIfaces := map[string]struct{}{} for _, l := range c.Links { - endpoints := [2]*Endpoint{l.A, l.B} + endpoints := [2]*types.Endpoint{l.A, l.B} for _, e := range endpoints { if e.Node.Kind == "bridge" || e.Node.Kind == "ovs-bridge" || e.Node.Kind == "host" { if _, ok := rootNsIfaces[e.EndpointName]; ok { diff --git a/clab/netlink.go b/clab/netlink.go index 9ec6aa8f1..105bd7b69 100644 --- a/clab/netlink.go +++ b/clab/netlink.go @@ -10,6 +10,7 @@ import ( "github.com/containernetworking/plugins/pkg/ns" "github.com/google/uuid" log "github.com/sirupsen/logrus" + "github.com/srl-labs/containerlab/types" "github.com/srl-labs/containerlab/utils" "github.com/vishvananda/netlink" ) @@ -24,7 +25,7 @@ type vEthEndpoint struct { } // CreateVirtualWiring creates the virtual topology between the containers -func (c *CLab) CreateVirtualWiring(l *Link) (err error) { +func (c *CLab) CreateVirtualWiring(l *types.Link) (err error) { log.Infof("Creating virtual wire: %s:%s <--> %s:%s", l.A.Node.ShortName, l.A.EndpointName, l.B.Node.ShortName, l.B.EndpointName) // connect containers (or container and a bridge) using veth pair diff --git a/cmd/tools_veth.go b/cmd/tools_veth.go index 6eaad1000..de7276ab0 100644 --- a/cmd/tools_veth.go +++ b/cmd/tools_veth.go @@ -81,16 +81,16 @@ var vethCreateCmd = &cobra.Command{ } } - endpointA := clab.Endpoint{ + endpointA := types.Endpoint{ Node: aNode, EndpointName: vethAEndpoint.iface, } - endpointB := clab.Endpoint{ + endpointB := types.Endpoint{ Node: bNode, EndpointName: vethBEndpoint.iface, } - link := &clab.Link{ + link := &types.Link{ A: &endpointA, B: &endpointB, MTU: MTU, diff --git a/types/types.go b/types/types.go index 246fc4581..ed2148ec9 100644 --- a/types/types.go +++ b/types/types.go @@ -11,6 +11,21 @@ import ( "github.com/srl-labs/containerlab/utils" ) +// Link is a struct that contains the information of a link between 2 containers +type Link struct { + A *Endpoint + B *Endpoint + MTU int + Labels map[string]string +} + +// Endpoint is a struct that contains information of a link endpoint +type Endpoint struct { + Node *Node + // e1-x, eth, etc + EndpointName string +} + // mgmtNet struct defines the management network options // it is provided via docker network object type MgmtNet struct { From c647db5197406acabe92303b4619414f0a0ef089 Mon Sep 17 00:00:00 2001 From: networkop Date: Mon, 10 May 2021 15:29:29 +0100 Subject: [PATCH 08/11] Fixed LinkContainerNS, DefaultNetMTU and initMgmtNetwork --- clab/ceos.go | 2 +- clab/clab.go | 22 ++++++++++------------ clab/config.go | 11 ----------- cmd/deploy.go | 2 +- go.mod | 2 ++ go.sum | 2 ++ runtime/docker/docker.go | 15 +-------------- runtime/runtime.go | 2 -- utils/netlink.go | 23 +++++++++++++++++++++++ 9 files changed, 40 insertions(+), 41 deletions(-) diff --git a/clab/ceos.go b/clab/ceos.go index 91e7b7bc2..ea2ce778c 100644 --- a/clab/ceos.go +++ b/clab/ceos.go @@ -43,7 +43,7 @@ func ceosPostDeploy(ctx context.Context, c *CLab, node *types.Node, lworkers uin } log.Debugf("node %s new pid %v", node.LongName, cont.Pid) node.NSPath = "/proc/" + strconv.Itoa(cont.Pid) + "/ns/net" - err = c.Runtime.LinkContainerNS(node.NSPath, node.LongName) + err = utils.LinkContainerNS(node.NSPath, node.LongName) if err != nil { return err } diff --git a/clab/clab.go b/clab/clab.go index 6fcd02a90..94321e999 100644 --- a/clab/clab.go +++ b/clab/clab.go @@ -66,6 +66,12 @@ func WithTopoFile(file string) ClabOption { if err := c.GetTopology(file); err != nil { log.Fatalf("failed to read topology file: %v", err) } + + err := c.initMgmtNetwork() + if err != nil { + log.Fatalf("initMgmtNetwork: %s", err) + } + } } @@ -85,11 +91,6 @@ func NewContainerLab(opts ...ClabOption) *CLab { Links: make(map[int]*types.Link), } - err := c.initMgmtNetwork() - if err != nil { - log.Fatalf("initMgmtNetwork: %s", err) - } - for _, o := range opts { o(c) } @@ -103,16 +104,13 @@ func (c *CLab) initMgmtNetwork() error { c.Config.Mgmt.Network = dockerNetName } if c.Config.Mgmt.IPv4Subnet == "" && c.Config.Mgmt.IPv6Subnet == "" { - if c.Config.Mgmt.IPv4Subnet == "" { - c.Config.Mgmt.IPv4Subnet = dockerNetIPv4Addr - } - if c.Config.Mgmt.IPv6Subnet == "" { - c.Config.Mgmt.IPv6Subnet = dockerNetIPv6Addr - } + c.Config.Mgmt.IPv4Subnet = dockerNetIPv4Addr + c.Config.Mgmt.IPv6Subnet = dockerNetIPv6Addr } + // init docker network mtu if c.Config.Mgmt.MTU == "" { - m, err := getDefaultDockerMTU() + m, err := utils.DefaultNetMTU() if err != nil { log.Warnf("Error occurred during getting the default docker MTU: %v", err) } diff --git a/clab/config.go b/clab/config.go index 5264d1af6..7addd19c1 100644 --- a/clab/config.go +++ b/clab/config.go @@ -14,7 +14,6 @@ import ( "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" "github.com/srl-labs/containerlab/types" - "github.com/srl-labs/containerlab/utils" "github.com/vishvananda/netlink" ) @@ -858,13 +857,3 @@ func sysMemory(v string) uint64 { } return m } - -// getDefaultDockerMTU gets the MTU of a docker0 bridge interface -// if fails to get the MTU of docker0, returns "1500" -func getDefaultDockerMTU() (string, error) { - b, err := utils.BridgeByName("docker0") - if err != nil { - return "1500", err - } - return fmt.Sprint(b.MTU), nil -} diff --git a/cmd/deploy.go b/cmd/deploy.go index 8178734b5..31cb4fcec 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -259,7 +259,7 @@ func enrichNodes(containers []types.GenericContainer, nodes map[string]*types.No if c.NetworkSettings.Set { node.MgmtIPv4Address = c.NetworkSettings.IPv4addr node.MgmtIPv4PrefixLength = c.NetworkSettings.IPv4pLen - node.MgmtIPv6Address = c.NetworkSettings.IPv4addr + node.MgmtIPv6Address = c.NetworkSettings.IPv6addr node.MgmtIPv6PrefixLength = c.NetworkSettings.IPv6pLen } diff --git a/go.mod b/go.mod index da246fca9..e006d2f84 100644 --- a/go.mod +++ b/go.mod @@ -26,3 +26,5 @@ require ( golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 gopkg.in/yaml.v2 v2.4.0 ) + +replace golang.org/x/crypto/ssh/terminal => golang.org/x/term v0.0.0-20210503060354-a79de5458b56 \ No newline at end of file diff --git a/go.sum b/go.sum index 140f5d618..06377413e 100644 --- a/go.sum +++ b/go.sum @@ -845,6 +845,8 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492 h1:Paq34FxTluEPvVyayQqMPgHm+ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w= +golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/runtime/docker/docker.go b/runtime/docker/docker.go index 323bd1881..3c9c6e94e 100644 --- a/runtime/docker/docker.go +++ b/runtime/docker/docker.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "io/ioutil" - "os" "path" "strconv" "strings" @@ -259,7 +258,7 @@ func (c *DockerRuntime) CreateContainer(ctx context.Context, node *types.Node) ( if err != nil { return err } - return c.LinkContainerNS(node.NSPath, node.LongName) + return utils.LinkContainerNS(node.NSPath, node.LongName) } @@ -474,18 +473,6 @@ func (c *DockerRuntime) DeleteContainer(ctx context.Context, name string) error return nil } -// linkContainerNS creates a symlink for containers network namespace -// so that it can be managed by iproute2 utility -func (c *DockerRuntime) LinkContainerNS(nspath, containerName string) error { - utils.CreateDirectory("/run/netns/", 0755) - dst := "/run/netns/" + containerName - err := os.Symlink(nspath, dst) - if err != nil { - return err - } - return nil -} - // setSysctl writes sysctl data by writing to a specific file func setSysctl(sysctl string, newVal int) error { return ioutil.WriteFile(path.Join(sysctlBase, sysctl), []byte(strconv.Itoa(newVal)), 0640) diff --git a/runtime/runtime.go b/runtime/runtime.go index 6514080cd..7b7c3d486 100644 --- a/runtime/runtime.go +++ b/runtime/runtime.go @@ -29,8 +29,6 @@ type ContainerRuntime interface { StartContainer(context.Context, string) error // Stop running container by its name StopContainer(context.Context, string, *time.Duration) error - // Create a creates a symlink for containers network namespace so that it can be managed by iproute2 utility - LinkContainerNS(string, string) error // List all containers matching labels ListContainers(context.Context, []string) ([]types.GenericContainer, error) // Inspect container (extract its PID) diff --git a/utils/netlink.go b/utils/netlink.go index 53a357d27..2830d28ee 100644 --- a/utils/netlink.go +++ b/utils/netlink.go @@ -2,6 +2,7 @@ package utils import ( "fmt" + "os" "github.com/vishvananda/netlink" ) @@ -17,3 +18,25 @@ func BridgeByName(name string) (*netlink.Bridge, error) { } return br, nil } + +// linkContainerNS creates a symlink for containers network namespace +// so that it can be managed by iproute2 utility +func LinkContainerNS(nspath, containerName string) error { + CreateDirectory("/run/netns/", 0755) + dst := "/run/netns/" + containerName + err := os.Symlink(nspath, dst) + if err != nil { + return err + } + return nil +} + +// getDefaultDockerMTU gets the MTU of a docker0 bridge interface +// if fails to get the MTU of docker0, returns "1500" +func DefaultNetMTU() (string, error) { + b, err := BridgeByName("docker0") + if err != nil { + return "1500", err + } + return fmt.Sprint(b.MTU), nil +} From 343fb9d59ba7de6c575e62b82247bf752c7f3d5f Mon Sep 17 00:00:00 2001 From: networkop Date: Mon, 10 May 2021 18:17:01 +0100 Subject: [PATCH 09/11] terminal -> xterm import replacement --- cmd/mysocketio.go | 2 +- go.mod | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/mysocketio.go b/cmd/mysocketio.go index c679eede0..6d11d6ec0 100644 --- a/cmd/mysocketio.go +++ b/cmd/mysocketio.go @@ -11,7 +11,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "golang.org/x/crypto/ssh/terminal" + terminal "golang.org/x/term" ) const loginEndpoint = "https://api.mysocket.io/login" diff --git a/go.mod b/go.mod index e006d2f84..5ebbae99f 100644 --- a/go.mod +++ b/go.mod @@ -23,8 +23,7 @@ require ( github.com/spf13/cobra v1.0.0 github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 github.com/ziutek/telnet v0.0.0-20180329124119-c3b780dc415b // indirect - golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 + golang.org/x/term v0.0.0-20210503060354-a79de5458b56 gopkg.in/yaml.v2 v2.4.0 ) -replace golang.org/x/crypto/ssh/terminal => golang.org/x/term v0.0.0-20210503060354-a79de5458b56 \ No newline at end of file From 0705cd2fa902be5de01f6e5e3d4b551e97dfe3d2 Mon Sep 17 00:00:00 2001 From: networkop Date: Mon, 10 May 2021 21:05:11 +0100 Subject: [PATCH 10/11] adding NA for empty addresses --- cmd/inspect.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/inspect.go b/cmd/inspect.go index a9c403f33..b2a64d440 100644 --- a/cmd/inspect.go +++ b/cmd/inspect.go @@ -199,6 +199,10 @@ func getContainerIPv4(ctr types.GenericContainer, bridgeName string) string { return "" } + if ctr.NetworkSettings.IPv4addr == "" { + return "NA" + } + return fmt.Sprintf("%s/%d", ctr.NetworkSettings.IPv4addr, ctr.NetworkSettings.IPv4pLen) } @@ -207,5 +211,10 @@ func getContainerIPv6(ctr types.GenericContainer, bridgeName string) string { if !ctr.NetworkSettings.Set { return "" } + + if ctr.NetworkSettings.IPv6addr == "" { + return "NA" + } + return fmt.Sprintf("%s/%d", ctr.NetworkSettings.IPv6addr, ctr.NetworkSettings.IPv6pLen) } From 70351f84b7d26cd6e1d3ed5bc89e2db3e46edae0 Mon Sep 17 00:00:00 2001 From: networkop Date: Mon, 10 May 2021 21:23:24 +0100 Subject: [PATCH 11/11] fixing the hosts entries bug --- cmd/deploy.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/cmd/deploy.go b/cmd/deploy.go index 31cb4fcec..fcdfe3418 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -233,14 +233,18 @@ func hostsEntries(containers []types.GenericContainer, bridgeName string) []byte continue } if cont.NetworkSettings.Set { - buff.WriteString(cont.NetworkSettings.IPv4addr) - buff.WriteString("\t") - buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) - buff.WriteString("\n") - buff.WriteString(cont.NetworkSettings.IPv6addr) - buff.WriteString("\t") - buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) - buff.WriteString("\n") + if cont.NetworkSettings.IPv4addr != "" { + buff.WriteString(cont.NetworkSettings.IPv4addr) + buff.WriteString("\t") + buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) + buff.WriteString("\n") + } + if cont.NetworkSettings.IPv6addr != "" { + buff.WriteString(cont.NetworkSettings.IPv6addr) + buff.WriteString("\t") + buff.WriteString(strings.TrimLeft(cont.Names[0], "/")) + buff.WriteString("\n") + } } } return buff.Bytes()