Skip to content

Commit

Permalink
chore: fix import order
Browse files Browse the repository at this point in the history
  • Loading branch information
r4f4 committed Dec 13, 2022
1 parent 95c1c33 commit 80e02a9
Show file tree
Hide file tree
Showing 228 changed files with 486 additions and 430 deletions.
7 changes: 4 additions & 3 deletions cmd/openshift-install/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ import (

assetstore "github.com/openshift/installer/pkg/asset/store"
"github.com/openshift/installer/pkg/destroy"
"github.com/openshift/installer/pkg/destroy/bootstrap"
quotaasset "github.com/openshift/installer/pkg/destroy/quota"
"github.com/openshift/installer/pkg/metrics/timer"

_ "github.com/openshift/installer/pkg/destroy/alibabacloud"
_ "github.com/openshift/installer/pkg/destroy/aws"
_ "github.com/openshift/installer/pkg/destroy/azure"
_ "github.com/openshift/installer/pkg/destroy/baremetal"
"github.com/openshift/installer/pkg/destroy/bootstrap"
_ "github.com/openshift/installer/pkg/destroy/gcp"
_ "github.com/openshift/installer/pkg/destroy/ibmcloud"
_ "github.com/openshift/installer/pkg/destroy/libvirt"
_ "github.com/openshift/installer/pkg/destroy/nutanix"
_ "github.com/openshift/installer/pkg/destroy/openstack"
_ "github.com/openshift/installer/pkg/destroy/ovirt"
_ "github.com/openshift/installer/pkg/destroy/powervs"
quotaasset "github.com/openshift/installer/pkg/destroy/quota"
_ "github.com/openshift/installer/pkg/destroy/vsphere"
"github.com/openshift/installer/pkg/metrics/timer"
)

func newDestroyCmd() *cobra.Command {
Expand Down
11 changes: 6 additions & 5 deletions cmd/openshift-install/gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,25 @@ import (
"syscall"
"time"

configv1 "github.com/openshift/api/config/v1"
configclient "github.com/openshift/client-go/config/clientset/versioned"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"

configv1 "github.com/openshift/api/config/v1"
configclient "github.com/openshift/client-go/config/clientset/versioned"
"github.com/openshift/installer/pkg/asset/installconfig"
assetstore "github.com/openshift/installer/pkg/asset/store"
"github.com/openshift/installer/pkg/asset/tls"
serialgather "github.com/openshift/installer/pkg/gather"
_ "github.com/openshift/installer/pkg/gather/aws"
_ "github.com/openshift/installer/pkg/gather/azure"
_ "github.com/openshift/installer/pkg/gather/gcp"
"github.com/openshift/installer/pkg/gather/service"
"github.com/openshift/installer/pkg/gather/ssh"
platformstages "github.com/openshift/installer/pkg/terraform/stages/platform"

_ "github.com/openshift/installer/pkg/gather/aws"
_ "github.com/openshift/installer/pkg/gather/azure"
_ "github.com/openshift/installer/pkg/gather/gcp"
)

func newGatherCmd() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion cmd/openshift-install/waitfor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"path/filepath"

timer "github.com/openshift/installer/pkg/metrics/timer"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"k8s.io/client-go/tools/clientcmd"

timer "github.com/openshift/installer/pkg/metrics/timer"
)

func newWaitForCmd() *cobra.Command {
Expand Down
3 changes: 2 additions & 1 deletion data/assets_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ package main
import (
"log"

"github.com/openshift/installer/data"
"github.com/shurcooL/vfsgen"

"github.com/openshift/installer/data"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/ocp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"path/filepath"

configv1 "github.com/openshift/api/config/v1"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

configv1 "github.com/openshift/api/config/v1"
configclient "github.com/openshift/client-go/config/clientset/versioned"
routeclient "github.com/openshift/client-go/route/clientset/versioned"
cov1helpers "github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers"
Expand Down
1 change: 0 additions & 1 deletion pkg/agent/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/openshift/assisted-service/client/events"
"github.com/openshift/assisted-service/client/installer"
"github.com/openshift/assisted-service/models"

"github.com/openshift/installer/pkg/asset/agent/agentconfig"
"github.com/openshift/installer/pkg/asset/agent/image"
"github.com/openshift/installer/pkg/asset/agent/manifests"
Expand Down
5 changes: 3 additions & 2 deletions pkg/agent/validations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package agent
import (
"encoding/json"

"github.com/openshift/assisted-service/api/common"
"github.com/openshift/assisted-service/models"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"github.com/openshift/assisted-service/api/common"
"github.com/openshift/assisted-service/models"
)

// These validation status strings are defined to match the ones from assisted-service/internal.
Expand Down
5 changes: 3 additions & 2 deletions pkg/asset/agent/agentconfig/agent_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"testing"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/mock"
"github.com/openshift/installer/pkg/types/agent"
"github.com/openshift/installer/pkg/types/baremetal"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestAgentConfig_LoadedFromDisk(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/agent/image/baseiso.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"time"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"

"github.com/openshift/assisted-service/pkg/executer"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/agent"
"github.com/openshift/installer/pkg/asset/agent/manifests"
"github.com/openshift/installer/pkg/asset/agent/mirror"
"github.com/openshift/installer/pkg/rhcos"
"github.com/sirupsen/logrus"
)

// BaseIso generates the base ISO file for the image
Expand Down
3 changes: 2 additions & 1 deletion pkg/asset/agent/image/baseiso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package image
import (
"testing"

"github.com/stretchr/testify/assert"

"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/agent"
"github.com/openshift/installer/pkg/asset/agent/manifests"
"github.com/stretchr/testify/assert"
)

func TestInfraBaseIso_Generate(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion pkg/asset/agent/image/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/ulikunitz/xz"

"golang.org/x/sys/unix"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/agent/image/ignition.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/coreos/ignition/v2/config/util"
igntypes "github.com/coreos/ignition/v2/config/v3_2/types"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"

Expand All @@ -30,7 +31,6 @@ import (
"github.com/openshift/installer/pkg/rhcos"
"github.com/openshift/installer/pkg/types/agent"
"github.com/openshift/installer/pkg/version"
"github.com/pkg/errors"
)

const manifestPath = "/etc/assisted/manifests"
Expand Down
6 changes: 3 additions & 3 deletions pkg/asset/agent/image/ignition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import (
"testing"

igntypes "github.com/coreos/ignition/v2/config/v3_2/types"
"github.com/stretchr/testify/assert"
"github.com/vincent-petithory/dataurl"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1"
Expand All @@ -23,9 +26,6 @@ import (
"github.com/openshift/installer/pkg/asset/password"
"github.com/openshift/installer/pkg/asset/tls"
"github.com/openshift/installer/pkg/types/agent"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Unable to test Generate because bootstrap.AddStorageFiles
Expand Down
9 changes: 5 additions & 4 deletions pkg/asset/agent/image/oc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import (
"strings"
"time"

operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1"
"github.com/openshift/assisted-service/pkg/executer"
"github.com/openshift/installer/pkg/asset/agent/mirror"
"github.com/openshift/installer/pkg/rhcos"
"github.com/sirupsen/logrus"
"github.com/thedevsaddam/retry"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"

operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1"
"github.com/openshift/assisted-service/pkg/executer"
"github.com/openshift/installer/pkg/asset/agent/mirror"
"github.com/openshift/installer/pkg/rhcos"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/asset/agent/image/oc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package image
import (
"testing"

"github.com/openshift/installer/pkg/asset/agent/mirror"
"github.com/stretchr/testify/assert"

"github.com/openshift/installer/pkg/asset/agent/mirror"
)

func TestGetIcspContents(t *testing.T) {
Expand Down
7 changes: 4 additions & 3 deletions pkg/asset/agent/installconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package agent
import (
"fmt"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/validation/field"

"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/installconfig"
"github.com/openshift/installer/pkg/types"
"github.com/openshift/installer/pkg/types/baremetal"
"github.com/openshift/installer/pkg/types/none"
"github.com/openshift/installer/pkg/types/vsphere"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/validation/field"
)

const (
Expand Down
1 change: 0 additions & 1 deletion pkg/asset/agent/installconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/openshift/installer/pkg/asset/mock"
"github.com/openshift/installer/pkg/ipnet"
"github.com/openshift/installer/pkg/types"

"github.com/openshift/installer/pkg/types/baremetal"
"github.com/openshift/installer/pkg/types/none"
"github.com/openshift/installer/pkg/types/vsphere"
Expand Down
7 changes: 4 additions & 3 deletions pkg/asset/agent/manifests/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"fmt"
"reflect"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/validation/field"

hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1"
"github.com/openshift/assisted-service/models"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/openshift/installer/pkg/asset"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/asset/agent/manifests/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package manifests
import (
"testing"

hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1"
"github.com/openshift/assisted-service/models"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"

hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1"
"github.com/openshift/assisted-service/models"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/openshift/installer/pkg/asset"
)

Expand Down
13 changes: 7 additions & 6 deletions pkg/asset/agent/manifests/agentclusterinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ import (
"path/filepath"
"strings"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
"sigs.k8s.io/yaml"

operv1 "github.com/openshift/api/operator/v1"
hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
aiv1beta1 "github.com/openshift/assisted-service/api/v1beta1"
Expand All @@ -17,12 +24,6 @@ import (
"github.com/openshift/installer/pkg/ipnet"
"github.com/openshift/installer/pkg/types"
"github.com/openshift/installer/pkg/types/defaults"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
"sigs.k8s.io/yaml"
)

const (
Expand Down
16 changes: 8 additions & 8 deletions pkg/asset/agent/manifests/agentclusterinstall_test.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package manifests

import (
"github.com/openshift/installer/pkg/types"
"os"
"testing"

"github.com/golang/mock/gomock"
hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/types/baremetal"

"github.com/openshift/installer/pkg/asset/agent"
"github.com/openshift/installer/pkg/asset/mock"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/yaml"

hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/agent"
"github.com/openshift/installer/pkg/asset/mock"
"github.com/openshift/installer/pkg/types"
"github.com/openshift/installer/pkg/types/baremetal"
)

func TestAgentClusterInstall_Generate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/agent/manifests/agentpullsecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"path/filepath"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/agent"
"github.com/openshift/installer/pkg/validate"
"github.com/pkg/errors"
)

const (
Expand Down
Loading

0 comments on commit 80e02a9

Please sign in to comment.