Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
refactor(orchestrator): remove pkg folder from orchestrator and provi…
Browse files Browse the repository at this point in the history
…der modules
  • Loading branch information
paralta committed Feb 6, 2024
1 parent 6629e3a commit b4e9e13
Show file tree
Hide file tree
Showing 109 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion orchestrator/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

orchestrator "github.com/openclarity/vmclarity/orchestrator/pkg"
"github.com/openclarity/vmclarity/orchestrator"
"github.com/openclarity/vmclarity/utils/log"
"github.com/openclarity/vmclarity/utils/version"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions orchestrator/pkg/config.go → orchestrator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"github.com/spf13/viper"

"github.com/openclarity/vmclarity/api/types"
discovery "github.com/openclarity/vmclarity/orchestrator/pkg/discoverer"
assetscanprocessor "github.com/openclarity/vmclarity/orchestrator/pkg/processor/assetscan"
assetscanwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/assetscan"
assetscanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/assetscanestimation"
scanwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scan"
scanconfigwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scanconfig"
scanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scanestimation"
discovery "github.com/openclarity/vmclarity/orchestrator/discoverer"
assetscanprocessor "github.com/openclarity/vmclarity/orchestrator/processor/assetscan"
assetscanwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/assetscan"
assetscanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/assetscanestimation"
scanwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scan"
scanconfigwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scanconfig"
scanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scanestimation"
)

const (
Expand Down
14 changes: 7 additions & 7 deletions orchestrator/pkg/config_test.go → orchestrator/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (

apitypes "github.com/openclarity/vmclarity/api/types"

"github.com/openclarity/vmclarity/orchestrator/pkg/discoverer"
assetscanprocessor "github.com/openclarity/vmclarity/orchestrator/pkg/processor/assetscan"
assetscanwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/assetscan"
assetscanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/assetscanestimation"
scanwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scan"
scanconfigwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scanconfig"
scanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scanestimation"
"github.com/openclarity/vmclarity/orchestrator/discoverer"
assetscanprocessor "github.com/openclarity/vmclarity/orchestrator/processor/assetscan"
assetscanwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/assetscan"
assetscanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/assetscanestimation"
scanwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scan"
scanconfigwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scanconfig"
scanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scanestimation"
)

func TestUnmarshalCloudProvider(t *testing.T) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/openclarity/vmclarity/api/client"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

const (
Expand Down
28 changes: 14 additions & 14 deletions orchestrator/pkg/orchestrator.go → orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ import (

"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
discovery "github.com/openclarity/vmclarity/orchestrator/pkg/discoverer"
assetscanprocessor "github.com/openclarity/vmclarity/orchestrator/pkg/processor/assetscan"
assetscanwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/assetscan"
assetscanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/assetscanestimation"
scanwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scan"
scanconfigwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scanconfig"
scanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/pkg/watcher/scanestimation"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider/pkg/aws"
"github.com/openclarity/vmclarity/provider/pkg/azure"
"github.com/openclarity/vmclarity/provider/pkg/docker"
"github.com/openclarity/vmclarity/provider/pkg/external"
"github.com/openclarity/vmclarity/provider/pkg/gcp"
"github.com/openclarity/vmclarity/provider/pkg/kubernetes"
discovery "github.com/openclarity/vmclarity/orchestrator/discoverer"
assetscanprocessor "github.com/openclarity/vmclarity/orchestrator/processor/assetscan"
assetscanwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/assetscan"
assetscanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/assetscanestimation"
scanwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scan"
scanconfigwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scanconfig"
scanestimationwatcher "github.com/openclarity/vmclarity/orchestrator/watcher/scanestimation"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/provider/aws"
"github.com/openclarity/vmclarity/provider/azure"
"github.com/openclarity/vmclarity/provider/docker"
"github.com/openclarity/vmclarity/provider/external"
"github.com/openclarity/vmclarity/provider/gcp"
"github.com/openclarity/vmclarity/provider/kubernetes"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/orchestrator/pkg/common"
"github.com/openclarity/vmclarity/orchestrator/common"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/openclarity/vmclarity/api/client"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

type jobConfigInput struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/orchestrator/pkg/common"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/orchestrator/common"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/openclarity/vmclarity/api/client"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/orchestrator/pkg/common"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/orchestrator/common"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/openclarity/vmclarity/api/client"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/orchestrator/pkg/common"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/orchestrator/common"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/orchestrator/pkg/common"
"github.com/openclarity/vmclarity/orchestrator/common"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"time"

"github.com/openclarity/vmclarity/api/client"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"github.com/openclarity/vmclarity/api/client"
"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/orchestrator/pkg/common"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/orchestrator/common"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion provider/pkg/aws/errors.go → provider/aws/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/aws/smithy-go"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion provider/pkg/aws/helpers.go → provider/aws/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

func EC2TagsFromScanMetadata(meta provider.ScanMetadata) []ec2types.Tag {
Expand Down
2 changes: 1 addition & 1 deletion provider/pkg/aws/instance.go → provider/aws/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions provider/pkg/aws/provider.go → provider/aws/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider/pkg/aws/scanestimation"
"github.com/openclarity/vmclarity/provider/pkg/cloudinit"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/provider/aws/scanestimation"
"github.com/openclarity/vmclarity/provider/cloudinit"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/openclarity/vmclarity/api/types"
familiestypes "github.com/openclarity/vmclarity/cli/pkg/families/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
"github.com/openclarity/vmclarity/provider/pkg/common"
"github.com/openclarity/vmclarity/provider/common"
)

type MarketOption string
Expand Down
2 changes: 1 addition & 1 deletion provider/pkg/aws/snapshot.go → provider/aws/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion provider/pkg/aws/volume.go → provider/aws/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
2 changes: 1 addition & 1 deletion provider/pkg/azure/blob.go → provider/azure/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion provider/pkg/azure/common.go → provider/azure/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"github.com/Azure/azure-sdk-for-go/sdk/azcore"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

func handleAzureRequestError(err error, actionTmpl string, parts ...interface{}) (bool, error) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v3"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v3"

"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider/pkg/cloudinit"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/provider/cloudinit"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

. "github.com/onsi/gomega"

provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
)

//go:embed testdata/cloud-init.yaml
Expand Down
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 @@ -34,7 +34,7 @@ import (

apitypes "github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/families"
provider "github.com/openclarity/vmclarity/provider/pkg"
"github.com/openclarity/vmclarity/provider"
"github.com/openclarity/vmclarity/utils/log"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion provider/examples/external/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"google.golang.org/grpc"
"google.golang.org/protobuf/types/known/timestamppb"

provider_service "github.com/openclarity/vmclarity/provider/pkg/external/proto"
provider_service "github.com/openclarity/vmclarity/provider/external/proto"
)

type Provider struct {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
provider_service "github.com/openclarity/vmclarity/provider/pkg/external/proto"
"github.com/openclarity/vmclarity/provider"
provider_service "github.com/openclarity/vmclarity/provider/external/proto"
)

func convertAssetToModels(asset *provider_service.Asset) (types.Asset, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/openclarity/vmclarity/api/types"
"github.com/openclarity/vmclarity/cli/pkg/utils"
provider "github.com/openclarity/vmclarity/provider/pkg"
provider_service "github.com/openclarity/vmclarity/provider/pkg/external/proto"
"github.com/openclarity/vmclarity/provider"
provider_service "github.com/openclarity/vmclarity/provider/external/proto"
)

func Test_convertAssetToModels(t *testing.T) {
Expand Down
Loading

0 comments on commit b4e9e13

Please sign in to comment.