Skip to content

Commit

Permalink
Move all 'common' code to 'pkg'
Browse files Browse the repository at this point in the history
This PR moves the common packages to the pkg folder.

Fixes: #11293
Signed-off-by: Swaminathan Vasudevan <svasudevan@suse.com>
  • Loading branch information
soumynathan committed May 6, 2020
1 parent 3ec3d25 commit 3c784c7
Show file tree
Hide file tree
Showing 80 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Expand Up @@ -65,7 +65,7 @@ set -o pipefail
export PATH=/home/vagrant/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
#{$makeclean}
~/go/src/github.com/cilium/cilium/common/build.sh
~/go/src/github.com/cilium/cilium/pkg/common/build.sh
rm -fr ~/go/bin/cilium*
SCRIPT

Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_ct_flush.go
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"strconv"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/ctmap"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_ct_list.go
Expand Up @@ -19,9 +19,9 @@ import (
"os"
"strconv"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/ctmap"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_ct_list_test.go
Expand Up @@ -23,12 +23,12 @@ import (
"os"
"testing"

"github.com/cilium/cilium/common/types"
"github.com/cilium/cilium/pkg/byteorder"
"github.com/cilium/cilium/pkg/checker"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/maps/ctmap"
"github.com/cilium/cilium/pkg/tuple"
"github.com/cilium/cilium/pkg/types"

. "gopkg.in/check.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_endpoint_delete.go
Expand Up @@ -17,7 +17,7 @@ package cmd
import (
"net"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/lxcmap"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_endpoint_list.go
Expand Up @@ -17,8 +17,8 @@ package cmd
import (
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/lxcmap"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_ipcache_get.go
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"strings"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/ipcache"

"github.com/hashicorp/go-immutable-radix"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_ipcache_list.go
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/ipcache"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_ipmasq_list.go
Expand Up @@ -18,8 +18,8 @@ import (
"fmt"
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/ipmasq"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_lb_list.go
Expand Up @@ -17,9 +17,9 @@ package cmd
import (
"fmt"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/loadbalancer"
"github.com/cilium/cilium/pkg/maps/lbmap"

Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_metrics_list.go
Expand Up @@ -22,8 +22,8 @@ import (
"strings"
"text/tabwriter"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/metricsmap"
monitorAPI "github.com/cilium/cilium/pkg/monitor/api"

Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_nat_flush.go
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/nat"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_nat_list.go
Expand Up @@ -18,9 +18,9 @@ import (
"fmt"
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/nat"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_nat_list_test.go
Expand Up @@ -19,11 +19,11 @@ package cmd
import (
"encoding/json"

"github.com/cilium/cilium/common/types"
"github.com/cilium/cilium/pkg/byteorder"
"github.com/cilium/cilium/pkg/checker"
"github.com/cilium/cilium/pkg/maps/nat"
"github.com/cilium/cilium/pkg/tuple"
"github.com/cilium/cilium/pkg/types"

. "gopkg.in/check.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_policy_add.go
Expand Up @@ -15,7 +15,7 @@
package cmd

import (
"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_policy_delete.go
Expand Up @@ -15,7 +15,7 @@
package cmd

import (
"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_policy_get.go
Expand Up @@ -24,10 +24,10 @@ import (
"text/tabwriter"

"github.com/cilium/cilium/api/v1/models"
"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/byteorder"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/identity"
identitymodel "github.com/cilium/cilium/pkg/identity/model"
"github.com/cilium/cilium/pkg/maps/policymap"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_proxy_flush.go
Expand Up @@ -17,7 +17,7 @@ package cmd
import (
"fmt"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_proxy_list.go
Expand Up @@ -17,8 +17,8 @@ package cmd
import (
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_sha_get.go
Expand Up @@ -22,8 +22,8 @@ import (
"regexp"
"strings"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_sha_list.go
Expand Up @@ -21,8 +21,8 @@ import (
"path/filepath"
"strconv"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/defaults"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/bpf_tunnel_list.go
Expand Up @@ -17,8 +17,8 @@ package cmd
import (
"os"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/command"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/maps/tunnel"

"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cilium/cmd/cleanup.go
Expand Up @@ -23,8 +23,8 @@ import (
"strconv"
"strings"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/defaults"
"github.com/cilium/cilium/pkg/maps/tunnel"
"github.com/cilium/cilium/pkg/netns"
Expand Down
2 changes: 1 addition & 1 deletion daemon/cmd/daemon_main.go
Expand Up @@ -29,10 +29,10 @@ import (

"github.com/cilium/cilium/api/v1/server"
"github.com/cilium/cilium/api/v1/server/restapi"
"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/cgroups"
"github.com/cilium/cilium/pkg/cleanup"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/components"
"github.com/cilium/cilium/pkg/controller"
"github.com/cilium/cilium/pkg/datapath/iptables"
Expand Down
2 changes: 1 addition & 1 deletion daemon/cmd/daemon_test.go
Expand Up @@ -25,7 +25,7 @@ import (
"testing"
"time"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/datapath"
fakedatapath "github.com/cilium/cilium/pkg/datapath/fake"
"github.com/cilium/cilium/pkg/endpoint"
Expand Down
2 changes: 1 addition & 1 deletion daemon/cmd/policy_test.go
Expand Up @@ -23,7 +23,7 @@ import (
"sort"
"time"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/checker"
"github.com/cilium/cilium/pkg/endpoint"
"github.com/cilium/cilium/pkg/endpoint/id"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/bpf/endpoint.go
Expand Up @@ -19,7 +19,7 @@ import (
"net"
"unsafe"

"github.com/cilium/cilium/common/types"
"github.com/cilium/cilium/pkg/types"
)

// Must be in sync with ENDPOINT_KEY_* in <bpf/lib/common.h>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/datapath/config.go
Expand Up @@ -17,7 +17,7 @@ package datapath
import (
"io"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/identity"
"github.com/cilium/cilium/pkg/mac"
"github.com/cilium/cilium/pkg/option"
Expand Down
2 changes: 1 addition & 1 deletion pkg/datapath/loader/base.go
Expand Up @@ -22,10 +22,10 @@ import (
"path/filepath"
"strings"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/cgroups"
"github.com/cilium/cilium/pkg/command/exec"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/datapath"
"github.com/cilium/cilium/pkg/datapath/alignchecker"
"github.com/cilium/cilium/pkg/datapath/prefilter"
Expand Down
2 changes: 1 addition & 1 deletion pkg/datapath/loader/cache.go
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"path/filepath"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/controller"
"github.com/cilium/cilium/pkg/datapath"
"github.com/cilium/cilium/pkg/datapath/loader/metrics"
Expand Down
2 changes: 1 addition & 1 deletion pkg/datapath/loader/template.go
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"reflect"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/byteorder"
"github.com/cilium/cilium/pkg/datapath"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/api.go
Expand Up @@ -23,7 +23,7 @@ import (
"sort"

"github.com/cilium/cilium/api/v1/models"
"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/controller"
"github.com/cilium/cilium/pkg/endpoint/regeneration"
"github.com/cilium/cilium/pkg/fqdn"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/bpf.go
Expand Up @@ -25,8 +25,8 @@ import (
"time"

"github.com/cilium/cilium/api/v1/models"
"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/completion"
"github.com/cilium/cilium/pkg/controller"
"github.com/cilium/cilium/pkg/endpoint/regeneration"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/cache.go
Expand Up @@ -17,7 +17,7 @@ package endpoint
import (
"fmt"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/identity"
"github.com/cilium/cilium/pkg/mac"
"github.com/cilium/cilium/pkg/option"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/directory.go
Expand Up @@ -19,7 +19,7 @@ import (
"os"
"path/filepath"

"github.com/cilium/cilium/common"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/logging/logfields"
"github.com/cilium/cilium/pkg/option"

Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/endpoint.go
Expand Up @@ -28,7 +28,7 @@ import (
"unsafe"

"github.com/cilium/cilium/api/v1/models"
"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/annotation"
enirouting "github.com/cilium/cilium/pkg/aws/eni/routing"
"github.com/cilium/cilium/pkg/bpf"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/endpoint_test.go
Expand Up @@ -23,7 +23,7 @@ import (
"testing"
"time"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/datapath"
"github.com/cilium/cilium/pkg/datapath/fake"
"github.com/cilium/cilium/pkg/endpoint/id"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/policy.go
Expand Up @@ -22,7 +22,7 @@ import (
"strings"
"time"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/completion"
"github.com/cilium/cilium/pkg/controller"
endpointid "github.com/cilium/cilium/pkg/endpoint/id"
Expand Down
4 changes: 2 additions & 2 deletions pkg/endpoint/restore.go
Expand Up @@ -24,8 +24,8 @@ import (
"time"

"github.com/cilium/cilium/api/v1/models"
"github.com/cilium/cilium/common"
"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/common"
"github.com/cilium/cilium/pkg/endpoint/regeneration"
"github.com/cilium/cilium/pkg/fqdn"
"github.com/cilium/cilium/pkg/identity"
Expand Down
2 changes: 1 addition & 1 deletion pkg/endpoint/restore_test.go
Expand Up @@ -26,7 +26,7 @@ import (
"path/filepath"
"sort"

"github.com/cilium/cilium/common/addressing"
"github.com/cilium/cilium/pkg/addressing"
"github.com/cilium/cilium/pkg/checker"
linuxDatapath "github.com/cilium/cilium/pkg/datapath/linux"
"github.com/cilium/cilium/pkg/endpoint/regeneration"
Expand Down

0 comments on commit 3c784c7

Please sign in to comment.