Skip to content
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 cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/prometheus"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/extractor"
"github.com/cobaltcore-dev/cortex/internal/knowledge/kpis"
"github.com/cobaltcore-dev/cortex/internal/scheduling/cinder"
Expand All @@ -49,7 +50,6 @@ import (
"github.com/cobaltcore-dev/cortex/internal/scheduling/reservations/commitments"
reservationscontroller "github.com/cobaltcore-dev/cortex/internal/scheduling/reservations/controller"
"github.com/cobaltcore-dev/cortex/pkg/conf"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/pkg/monitoring"
"github.com/cobaltcore-dev/cortex/pkg/multicluster"
"github.com/cobaltcore-dev/cortex/pkg/task"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/go-gorp/gorp"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

type mockCinderAPI struct{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/pkg/conf"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/pkg/keystone"
"github.com/cobaltcore-dev/cortex/pkg/multicluster"
"github.com/cobaltcore-dev/cortex/pkg/sso"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/go-gorp/gorp"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

type mockIdentityAPI struct{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/identity"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/go-gorp/gorp"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/identity"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
testlibKeystone "github.com/cobaltcore-dev/cortex/pkg/keystone/testing"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/go-gorp/gorp"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

type mockManilaAPI struct{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/go-gorp/gorp"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
testlib "github.com/cobaltcore-dev/cortex/pkg/testing"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/go-gorp/gorp"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
testlibKeystone "github.com/cobaltcore-dev/cortex/pkg/keystone/testing"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/manila"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/placement"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/pkg/keystone"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"

"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/pkg/conf"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/pkg/multicluster"
"github.com/cobaltcore-dev/cortex/pkg/sso"
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"

"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/pkg/conf"
"github.com/cobaltcore-dev/cortex/pkg/db"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
)

// All supported Prometheus metric syncers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
prometheusclient "github.com/prometheus/client_golang/prometheus"
"github.com/sapcc/go-bits/jobloop"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/db/db_test.go → internal/knowledge/db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

type MockTable struct {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"testing"

"github.com/cobaltcore-dev/cortex/pkg/db/testing/containers"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing/containers"
"github.com/go-gorp/gorp"
_ "github.com/mattn/go-sqlite3"
"github.com/sapcc/go-bits/easypg"
Expand Down
2 changes: 1 addition & 1 deletion internal/knowledge/extractor/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"

"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/pkg/conf"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/cobaltcore-dev/cortex/pkg/multicluster"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
Expand Down
2 changes: 1 addition & 1 deletion internal/knowledge/extractor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log/slog"

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/prometheus/client_golang/prometheus"
"sigs.k8s.io/controller-runtime/pkg/client"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/knowledge/extractor/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/internal/knowledge/extractor/plugins"
"github.com/cobaltcore-dev/cortex/pkg/db"
"github.com/prometheus/client_golang/prometheus"
dto "github.com/prometheus/client_model/go"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/knowledge/extractor/plugins/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"log/slog"

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
"github.com/cobaltcore-dev/cortex/pkg/conf"
"github.com/cobaltcore-dev/cortex/pkg/db"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/knowledge/extractor/plugins/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
"k8s.io/apimachinery/pkg/runtime"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
testlib "github.com/cobaltcore-dev/cortex/pkg/testing"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/placement"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

func TestHostCapabilitiesExtractor_Init(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/placement"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
testlib "github.com/cobaltcore-dev/cortex/pkg/testing"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/identity"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
testlib "github.com/cobaltcore-dev/cortex/pkg/testing"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/placement"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

func TestHostUtilizationExtractor_Init(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/prometheus"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
"k8s.io/apimachinery/pkg/runtime"
)

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

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

func TestVMHostResidencyExtractor_Init(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

func TestVMLifeSpanExtractor_Init(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/prometheus"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/prometheus"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/cobaltcore-dev/cortex/api/v1alpha1"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/openstack/nova"
"github.com/cobaltcore-dev/cortex/internal/knowledge/datasources/plugins/prometheus"
"github.com/cobaltcore-dev/cortex/pkg/db"
testlibDB "github.com/cobaltcore-dev/cortex/pkg/db/testing"
"github.com/cobaltcore-dev/cortex/internal/knowledge/db"
testlibDB "github.com/cobaltcore-dev/cortex/internal/knowledge/db/testing"
)

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