Skip to content

Commit

Permalink
Simplify package layout
Browse files Browse the repository at this point in the history
This patch simplifies the package layout by moving all of the packages
once located at "pkg/cloud/vsphere" directly into "pkg". The previous
layout is a vestigial artifact of when the providers all lived in a
single repository, and that is no longer the case.
  • Loading branch information
akutz committed Nov 19, 2019
1 parent 83ca8a6 commit 64a0267
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions controllers/vspherecluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"

infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/config"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/cloudprovider"
infrautilv1 "sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/util"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/config"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/cloudprovider"
infrautilv1 "sigs.k8s.io/cluster-api-provider-vsphere/pkg/util"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions controllers/vspheremachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"

infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/config"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/config"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi"
)

// VSphereMachineReconciler reconciles a VSphereMachine object
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/controllers"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/config"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/config"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/record"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2/cloudprovider"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
)

// NOTE: the contents of this file are derived from https://github.com/kubernetes-sigs/vsphere-csi-driver/tree/master/manifests/1.14
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.
package govmomi

import (
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/esxi"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/vcenter"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/esxi"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/vcenter"
)

func createVM(ctx *context.MachineContext, bootstrapData []byte) error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha2"

infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
)

func init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package esxi
import (
"github.com/pkg/errors"

"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
)

// Clone kicks off a clone operation on ESXi to create a new virtual machine.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package net_test
import (
"testing"

"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/net"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/net"
)

func TestErrOnLocalOnlyIPAddr(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"github.com/vmware/govmomi/vim25/types"

infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/extra"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/net"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/util"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/extra"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/net"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/util"
)

// VMService provdes API to interact with the VMs using govmomi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/pkg/errors"
"github.com/vmware/govmomi/object"

"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
)

type tplContext interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/vmware/govmomi/vim25/mo"
"github.com/vmware/govmomi/vim25/types"

"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/net"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/net"
)

func sanitizeIPAddrs(ctx *context.MachineContext, ipAddrs []string) []string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/vmware/govmomi/object"
"github.com/vmware/govmomi/vim25/types"

"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/extra"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/services/govmomi/template"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/extra"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/services/govmomi/template"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package services

import (
infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/context"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/context"
)

// VirtualMachineService is a service for creating/updating/deleting virtual
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/pkg/errors"

infrav1 "sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/util"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/util"
)

func TestGetAPIEndpointForControlPlaneEndpoint(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
corev1 "k8s.io/api/core/v1"

"sigs.k8s.io/cluster-api-provider-vsphere/api/v1alpha2"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/cloud/vsphere/util"
"sigs.k8s.io/cluster-api-provider-vsphere/pkg/util"
)

func Test_GetMachinePreferredIPAddress(t *testing.T) {
Expand Down

0 comments on commit 64a0267

Please sign in to comment.