Skip to content

Commit

Permalink
Update API group-version for metal (ex-metal-api) (#174)
Browse files Browse the repository at this point in the history
* update api group and version

Signed-off-by: Artem Bortnikov <[email protected]>

* fix go.sum

Signed-off-by: Artem Bortnikov <[email protected]>

---------

Signed-off-by: Artem Bortnikov <[email protected]>
  • Loading branch information
aobort committed Jan 18, 2024
1 parent e25aa3c commit 06686dd
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 106 deletions.
13 changes: 7 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ require (
github.com/go-redis/redis/v8 v8.11.5
github.com/google/addlicense v1.1.1
github.com/google/uuid v1.5.0
github.com/ironcore-dev/metal v0.11.0
github.com/jeek120/cpuid v0.0.0-20200914054105-8fa8c861dea6
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40
github.com/mdlayher/lldp v0.0.0-20150915211757-afd9f83164c5
github.com/onmetal/metal-api v0.10.3
github.com/onmetal/metal-api-gateway v0.4.1
github.com/opencontainers/runtime-spec v1.1.0
github.com/pkg/errors v0.9.1
Expand All @@ -23,6 +23,7 @@ require (
github.com/urfave/cli/v2 v2.27.1
github.com/vishvananda/netlink v1.2.1-beta.2
go.uber.org/zap v1.26.0
golang.org/x/sys v0.15.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/apimachinery v0.29.1
Expand Down Expand Up @@ -64,7 +65,8 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onmetal/ipam v0.0.25 // indirect
github.com/onmetal/ipam v0.0.26 // indirect
github.com/onmetal/metal-api v0.10.3 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pkg/xattr v0.4.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -84,7 +86,6 @@ require (
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
Expand All @@ -94,12 +95,12 @@ require (
gopkg.in/djherbis/times.v1 v1.3.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/api v0.29.1 // indirect
k8s.io/apiextensions-apiserver v0.28.0 // indirect
k8s.io/component-base v0.28.1 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/controller-runtime v0.16.2 // indirect
sigs.k8s.io/controller-runtime v0.16.3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
36 changes: 20 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY=
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo=
Expand Down Expand Up @@ -92,6 +92,8 @@ github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk=
github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg=
github.com/ironcore-dev/metal v0.11.0 h1:lOZqHe8RmYKSI05GUHVyx9HjkvMd8ZrNMzRJ6txkovQ=
github.com/ironcore-dev/metal v0.11.0/go.mod h1:3Mj+xiZux3DwQkcaYwXSZ0YqgjckHRtcW567LtCQE4w=
github.com/jeek120/cpuid v0.0.0-20200914054105-8fa8c861dea6 h1:yYizUAyOFS0NEC88Fy7zV1P+p4ms3akuRebq4oyrtkY=
github.com/jeek120/cpuid v0.0.0-20200914054105-8fa8c861dea6/go.mod h1:yVF/19OfI1zhR3WPrIsQFWwC9cfPHvwy4TOd4L7cKWM=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
Expand Down Expand Up @@ -130,8 +132,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onmetal/ipam v0.0.25 h1:4f9etb5Hpl+QOKt0gtImcNfEQ+MHvWAntRmpgmmJwf8=
github.com/onmetal/ipam v0.0.25/go.mod h1:/b44FpL40z6jM1uAs1Y6vioUi2Hy6Z7MZObiM2u3djg=
github.com/onmetal/ipam v0.0.26 h1:1MExfeV8W24btRAxwQD41nxRxXCF3utqq9YDq4UHmS4=
github.com/onmetal/ipam v0.0.26/go.mod h1:5RWWO4gwdk1vKggVV8aVJNszNiJn6HMVr/lxMj8ON6A=
github.com/onmetal/metal-api v0.10.3 h1:lAzApPomrItJVPcEAuLZu70T0sLppeDjvwzNoVTak+0=
github.com/onmetal/metal-api v0.10.3/go.mod h1:PUhwl8ViQkBYJBeIxsJ6O74pxmeTYJ7qLMefKndPzGs=
github.com/onmetal/metal-api-gateway v0.4.1 h1:vtUnoOr2QI+gmB/RnO30w66wz0naUMWbNmbNqo2hZS8=
Expand All @@ -140,8 +142,8 @@ github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4=
github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg=
github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc=
Expand Down Expand Up @@ -275,6 +277,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/djherbis/times.v1 v1.3.0 h1:uxMS4iMtH6Pwsxog094W0FYldiNnfY/xba00vq6C2+o=
gopkg.in/djherbis/times.v1 v1.3.0/go.mod h1:AQlg6unIsrsCEdQYhTzERy542dz6SFdQFZFv6mUY0P8=
gopkg.in/evanphx/json-patch.v5 v5.6.0 h1:BMT6KIwBD9CaU91PJCZIe46bDmBWa9ynTQgJIOpfQBk=
gopkg.in/evanphx/json-patch.v5 v5.6.0/go.mod h1:/kvTRh1TVm5wuM6OkHxqXtE/1nUZZpihg29RtuIyfvk=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
Expand All @@ -288,28 +292,28 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw=
k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ=
k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E=
k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE=
k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08=
k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc=
k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc=
k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU=
k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A=
k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks=
k8s.io/component-base v0.28.1 h1:LA4AujMlK2mr0tZbQDZkjWbdhTV5bRyEyAFe0TJxlWg=
k8s.io/component-base v0.28.1/go.mod h1:jI11OyhbX21Qtbav7JkhehyBsIRfnO8oEgoAR12ArIU=
k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI=
k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8=
k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU=
sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU=
sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4=
sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/kustomize/api v0.13.4 h1:E38Hfx0G9R9v7vRgKshviPotJQETG0S2gD3JdHLCAsI=
sigs.k8s.io/kustomize/api v0.13.4/go.mod h1:Bkaavz5RKK6ZzP0zgPrB7QbpbBJKiHuD3BB0KujY7Ls=
sigs.k8s.io/kustomize/kyaml v0.14.3 h1:WpabVAKZe2YEp/irTSHwD6bfjwZnTtSDewd2BVJGMZs=
sigs.k8s.io/kustomize/kyaml v0.14.3/go.mod h1:npvh9epWysfQ689Rtt/U+dpOJDTBn8kUnF1O6VzvmZA=
sigs.k8s.io/kustomize/api v0.15.0 h1:6Ca88kEOBVotHDw+y2IsIMYtg9Pvv7MKpW9JMyF/OH4=
sigs.k8s.io/kustomize/api v0.15.0/go.mod h1:p19kb+E14gN7zcIBR/nhByJDAfUa7N8mp6ZdH/mMXbg=
sigs.k8s.io/kustomize/kyaml v0.15.0 h1:ynlLMAxDhrY9otSg5GYE2TcIz31XkGZ2Pkj7SdolD84=
sigs.k8s.io/kustomize/kyaml v0.15.0/go.mod h1:+uMkBahdU1KNOj78Uta4rrXH+iH7wvg+nW7+GULvREA=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
Expand Down
8 changes: 4 additions & 4 deletions internal/provider/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"
"time"

benchv1alpha3 "github.com/onmetal/metal-api/apis/benchmark/v1alpha3"
metalv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4"
"github.com/stretchr/testify/assert"

"github.com/onmetal/inventory/cmd/benchmark-scheduler/logger"
Expand Down Expand Up @@ -54,9 +54,9 @@ func TestPatch(t *testing.T) {
ctx: ctx, log: l,
}

mm := make(map[string]benchv1alpha3.Benchmarks)
mm["test"] = []benchv1alpha3.Benchmark{{Name: "disk-test", Value: 123}}
spec := benchv1alpha3.Machine{Spec: benchv1alpha3.MachineSpec{Benchmarks: mm}}
mm := make(map[string]metalv1alpha4.Benchmarks)
mm["test"] = []metalv1alpha4.BenchmarkResult{{Name: "disk-test", Value: 123}}
spec := metalv1alpha4.Benchmark{Spec: metalv1alpha4.BenchmarkSpec{Benchmarks: mm}}

patch, err := json.Marshal(spec)
a.Nil(err, "json serialization failed")
Expand Down
16 changes: 8 additions & 8 deletions internal/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sync"

"github.com/Jeffail/gabs/v2"
benchv1alpha3 "github.com/onmetal/metal-api/apis/benchmark/v1alpha3"
metalv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4"

"github.com/onmetal/inventory/cmd/benchmark-scheduler/logger"
"github.com/onmetal/inventory/internal/benchmarks/output"
Expand All @@ -35,7 +35,7 @@ const (
type Machine struct {
provider.Client

resultMap map[string]benchv1alpha3.Benchmarks
resultMap map[string]metalv1alpha4.Benchmarks
uuid string
wg *sync.WaitGroup
log logger.Logger
Expand All @@ -52,7 +52,7 @@ func New(machineUUID string, results []output.Result, c provider.Client, l logge
wg: new(sync.WaitGroup),
uuid: machineUUID,
results: results,
resultMap: make(map[string]benchv1alpha3.Benchmarks, len(results)),
resultMap: make(map[string]metalv1alpha4.Benchmarks, len(results)),
log: l,
}, nil
}
Expand All @@ -72,22 +72,22 @@ func (m *Machine) Do() error {
value := m.parseText(&m.results[r])
benches, ok := m.resultMap[name]
if !ok {
m.resultMap[name] = benchv1alpha3.Benchmarks{{Name: m.results[r].BenchmarkName, Value: value}}
m.resultMap[name] = metalv1alpha4.Benchmarks{{Name: m.results[r].BenchmarkName, Value: value}}
continue
}
m.resultMap[name] = append(benches, benchv1alpha3.Benchmark{
m.resultMap[name] = append(benches, metalv1alpha4.BenchmarkResult{
Name: m.results[r].BenchmarkName, Value: value,
})
default:
value := m.parseJSON(&m.results[r])
benches, ok := m.resultMap[name]
if !ok {
m.resultMap[name] = benchv1alpha3.Benchmarks{{Name: m.results[r].BenchmarkName, Value: value}}
m.resultMap[name] = metalv1alpha4.Benchmarks{{Name: m.results[r].BenchmarkName, Value: value}}
}
m.resultMap[name] = append(benches, benchv1alpha3.Benchmark{Name: m.results[r].BenchmarkName, Value: value})
m.resultMap[name] = append(benches, metalv1alpha4.BenchmarkResult{Name: m.results[r].BenchmarkName, Value: value})
}
}
patch := benchv1alpha3.Machine{Spec: benchv1alpha3.MachineSpec{Benchmarks: m.resultMap}}
patch := metalv1alpha4.Benchmark{Spec: metalv1alpha4.BenchmarkSpec{Benchmarks: m.resultMap}}
body, err := json.Marshal(patch)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions internal/updater/updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

"github.com/google/uuid"
benchv1alpha3 "github.com/onmetal/metal-api/apis/benchmark/v1alpha3"
metalv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4"
"github.com/stretchr/testify/assert"

"github.com/onmetal/inventory/cmd/benchmark-scheduler/logger"
Expand Down Expand Up @@ -54,7 +54,7 @@ func TestDo(t *testing.T) {
log: l,
results: getResults(data),
Client: fakeClient,
resultMap: make(map[string]benchv1alpha3.Benchmarks),
resultMap: make(map[string]metalv1alpha4.Benchmarks),
}
if err := m.Do(); !a.Nil(err) {
t.Log(err)
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"bytes"
"encoding/json"

apiv1alpha1 "github.com/onmetal/metal-api/apis/inventory/v1alpha1"
metalv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4"
"github.com/pkg/errors"

"github.com/onmetal/inventory/pkg/crd"
Expand Down Expand Up @@ -98,7 +98,7 @@ func (s *BenchmarkApp) Run() int {
s.printer.VOut("Gathered data:")
s.printer.VOut(prettifiedJsonBuf.String())

buildSetters := []func(*apiv1alpha1.Inventory, *inventory.Inventory){
buildSetters := []func(*metalv1alpha4.Inventory, *inventory.Inventory){
s.crdBuilderSvc.SetMLCPerf,
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/app/nic_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package app

import (
apiv1alpha1 "github.com/onmetal/metal-api/apis/inventory/v1alpha1"
metalv1alpha4 "github.com/ironcore-dev/metal/apis/metal/v1alpha4"
"github.com/pkg/errors"

"github.com/onmetal/inventory/pkg/crd"
Expand Down Expand Up @@ -110,7 +110,7 @@ func (s *NICUpdaterApp) Run() int {

inv := s.gathererSvc.GatherInOrder(gatherSetters)

buildSetters := []func(*apiv1alpha1.Inventory, *inventory.Inventory){
buildSetters := []func(*metalv1alpha4.Inventory, *inventory.Inventory){
s.crdBuilderSvc.SetSystem,
s.crdBuilderSvc.SetNICs,
}
Expand All @@ -123,7 +123,7 @@ func (s *NICUpdaterApp) Run() int {

patch := struct {
Spec struct {
Nics []apiv1alpha1.NICSpec `json:"nics"`
Nics []metalv1alpha4.NICSpec `json:"nics"`
} `json:"spec"`
}{}
patch.Spec.Nics = cr.Spec.NICs
Expand Down
Loading

0 comments on commit 06686dd

Please sign in to comment.