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

Move runtime_scan package to pkg/orchestrator #491

Merged
1 commit merged into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example_external_provider_plugin/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/runtime_scan/pkg/provider/external/proto"
provider_service "github.com/openclarity/vmclarity/pkg/orchestrator/provider/external/proto"
)

type Provider struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/openclarity/vmclarity/pkg/backend/database"
databaseTypes "github.com/openclarity/vmclarity/pkg/backend/database/types"
"github.com/openclarity/vmclarity/pkg/backend/rest"
"github.com/openclarity/vmclarity/pkg/orchestrator"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator"
uibackend "github.com/openclarity/vmclarity/ui_backend/pkg/rest"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/common"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/common"
)

type AssetScanProcessor struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package assetscanwatcher
import (
"time"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"gopkg.in/yaml.v3"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

type jobConfigInput struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"time"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/common"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/common"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

type (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
"github.com/spf13/viper"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/assetscanprocessor"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/assetscanwatcher"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/discovery"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/scanconfigwatcher"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/scanwatcher"
"github.com/openclarity/vmclarity/pkg/orchestrator/assetscanprocessor"
"github.com/openclarity/vmclarity/pkg/orchestrator/assetscanwatcher"
"github.com/openclarity/vmclarity/pkg/orchestrator/discovery"
"github.com/openclarity/vmclarity/pkg/orchestrator/scanconfigwatcher"
"github.com/openclarity/vmclarity/pkg/orchestrator/scanwatcher"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package discovery
import (
"time"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
log "github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

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

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/assetscanprocessor"
"github.com/openclarity/vmclarity/pkg/orchestrator/assetscanwatcher"
"github.com/openclarity/vmclarity/pkg/orchestrator/discovery"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/aws"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/azure"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/docker"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/external"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/gcp"
"github.com/openclarity/vmclarity/pkg/orchestrator/scanconfigwatcher"
"github.com/openclarity/vmclarity/pkg/orchestrator/scanwatcher"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/assetscanprocessor"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/assetscanwatcher"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/discovery"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/scanconfigwatcher"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/scanwatcher"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/aws"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/azure"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/docker"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/external"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/gcp"
)

type Orchestrator struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/cloudinit"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/cloudinit"
)

type Client struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/aws/smithy-go"

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

type (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

func EC2TagsFromScanMetadata(meta provider.ScanMetadata) []ec2types.Tag {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

type Instance struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

type Snapshot struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/sirupsen/logrus"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

type Volume struct {
Expand Down
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"

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

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

const (
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"

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

func handleAzureRequestError(err error, actionTmpl string, parts ...interface{}) (bool, error) {
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/network/armnetwork/v3"

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

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v3"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/cloudinit"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
"github.com/openclarity/vmclarity/runtime_scan/pkg/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"

"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
"github.com/openclarity/vmclarity/pkg/orchestrator/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"

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

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

. "github.com/onsi/gomega"

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

//go:embed testdata/cloud-init.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"gopkg.in/yaml.v2"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/families"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

// mountPointPath defines the location in the container where assets will be mounted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"google.golang.org/grpc/credentials/insecure"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
provider_service "github.com/openclarity/vmclarity/runtime_scan/pkg/provider/external/proto"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
provider_service "github.com/openclarity/vmclarity/pkg/orchestrator/provider/external/proto"
)

type Client struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
provider_service "github.com/openclarity/vmclarity/pkg/orchestrator/provider/external/proto"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
provider_service "github.com/openclarity/vmclarity/runtime_scan/pkg/provider/external/proto"
)

func convertAssetToModels(asset *provider_service.Asset) (models.Asset, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"gotest.tools/v3/assert"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
provider_service "github.com/openclarity/vmclarity/pkg/orchestrator/provider/external/proto"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
provider_service "github.com/openclarity/vmclarity/runtime_scan/pkg/provider/external/proto"
)

func Test_convertAssetToModels(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"google.golang.org/api/iterator"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

type Client struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
log "github.com/sirupsen/logrus"
"google.golang.org/api/googleapi"

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

func handleGcpRequestError(err error, actionTmpl string, parts ...interface{}) (bool, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"cloud.google.com/go/compute/apiv1/computepb"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/orchestrator/provider/cloudinit"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider/cloudinit"
)

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

"cloud.google.com/go/compute/apiv1/computepb"

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

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

"cloud.google.com/go/compute/apiv1/computepb"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"time"

"github.com/openclarity/vmclarity/api/models"
"github.com/openclarity/vmclarity/pkg/orchestrator/common"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/pkg/shared/log"
"github.com/openclarity/vmclarity/pkg/shared/utils"
"github.com/openclarity/vmclarity/runtime_scan/pkg/orchestrator/common"
)

type (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package scanwatcher
import (
"time"

"github.com/openclarity/vmclarity/pkg/orchestrator/provider"
"github.com/openclarity/vmclarity/pkg/shared/backendclient"
"github.com/openclarity/vmclarity/runtime_scan/pkg/provider"
)

const (
Expand Down
Loading
Loading