diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a4c3f37..04df1f4 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -94,9 +94,9 @@ dockers: - CHANGELOG.md - README.md - image_templates: - - &arm64v7_linux_image ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}-arm64 - - ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}-arm64 - - ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-arm64 + - &arm64v7_linux_image ghcr.io/davidallendj/{{.ProjectName}}:{{ .Tag }}-arm64 + - ghcr.io/davidallendj/{{.ProjectName}}:{{ .Major }}-arm64 + - ghcr.io/davidallendj/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}-arm64 use: buildx build_flag_templates: - "--pull" diff --git a/cmd/cache.go b/cmd/cache.go index 11c87a5..f39bffd 100644 --- a/cmd/cache.go +++ b/cmd/cache.go @@ -6,8 +6,8 @@ import ( "os" "strconv" - magellan "github.com/davidallendj/magellan/internal" "github.com/davidallendj/magellan/internal/cache/sqlite" + magellan "github.com/davidallendj/magellan/pkg" "github.com/rs/zerolog/log" "github.com/spf13/cobra" ) diff --git a/cmd/collect.go b/cmd/collect.go index d5e29c3..c3fb35c 100644 --- a/cmd/collect.go +++ b/cmd/collect.go @@ -5,13 +5,13 @@ import ( "fmt" "os/user" - "github.com/OpenCHAMI/magellan/pkg/bmc" - "github.com/OpenCHAMI/magellan/pkg/secrets" "github.com/cznic/mathutil" - magellan "github.com/davidallendj/magellan/internal" "github.com/davidallendj/magellan/internal/cache/sqlite" urlx "github.com/davidallendj/magellan/internal/url" + magellan "github.com/davidallendj/magellan/pkg" "github.com/davidallendj/magellan/pkg/auth" + "github.com/davidallendj/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/cmd/crawl.go b/cmd/crawl.go index 5e4a038..c1acc3a 100644 --- a/cmd/crawl.go +++ b/cmd/crawl.go @@ -6,10 +6,10 @@ import ( "github.com/rs/zerolog/log" - urlx "github.com/OpenCHAMI/magellan/internal/url" - "github.com/OpenCHAMI/magellan/pkg/bmc" - "github.com/OpenCHAMI/magellan/pkg/crawler" - "github.com/OpenCHAMI/magellan/pkg/secrets" + urlx "github.com/davidallendj/magellan/internal/url" + "github.com/davidallendj/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/crawler" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/cmd/scan.go b/cmd/scan.go index 8549eb1..f25150d 100644 --- a/cmd/scan.go +++ b/cmd/scan.go @@ -7,8 +7,8 @@ import ( "os" "path" - "github.com/OpenCHAMI/magellan/internal/cache/sqlite" - magellan "github.com/OpenCHAMI/magellan/pkg" + "github.com/davidallendj/magellan/internal/cache/sqlite" + magellan "github.com/davidallendj/magellan/pkg" "github.com/rs/zerolog/log" "github.com/cznic/mathutil" diff --git a/cmd/secrets.go b/cmd/secrets.go index f4ea00d..59523e6 100644 --- a/cmd/secrets.go +++ b/cmd/secrets.go @@ -7,7 +7,7 @@ import ( "os" "strings" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/cmd/update.go b/cmd/update.go index f299c80..c2cc3a4 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -4,9 +4,9 @@ import ( "os" "strings" - magellan "github.com/OpenCHAMI/magellan/pkg" - "github.com/OpenCHAMI/magellan/pkg/bmc" - "github.com/OpenCHAMI/magellan/pkg/secrets" + magellan "github.com/davidallendj/magellan/pkg" + "github.com/davidallendj/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -15,8 +15,6 @@ import ( var ( host string firmwareUri string - firmwareVersion string - component string transferProtocol string showStatus bool Insecure bool @@ -124,9 +122,7 @@ func init() { UpdateCmd.Flags().StringVar(&username, "username", "", "Set the BMC user") UpdateCmd.Flags().StringVar(&password, "password", "", "Set the BMC password") UpdateCmd.Flags().StringVar(&transferProtocol, "scheme", "https", "Set the transfer protocol") - UpdateCmd.Flags().StringVar(&firmwareUrl, "firmware-url", "", "Set the path to the firmware") - UpdateCmd.Flags().StringVar(&firmwareVersion, "firmware-version", "", "Set the version of firmware to be installed") - UpdateCmd.Flags().StringVar(&component, "component", "", "Set the component to upgrade (BMC|BIOS)") + UpdateCmd.Flags().StringVar(&firmwareUri, "firmware-uri", "", "Set the path to the firmware") UpdateCmd.Flags().BoolVar(&showStatus, "status", false, "Get the status of the update") checkBindFlagError(viper.BindPFlag("update.username", UpdateCmd.Flags().Lookup("username"))) diff --git a/go.mod b/go.mod index b39be0a..1224cc7 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,6 @@ require ( ) require ( - github.com/google/go-cmp v0.6.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect ) @@ -31,6 +30,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/goccy/go-json v0.10.2 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect diff --git a/go.sum b/go.sum index cdc806e..be886fb 100644 --- a/go.sum +++ b/go.sum @@ -123,29 +123,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= -golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -======= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -<<<<<<< HEAD -======= -======= ->>>>>>> 97a569d (collect: return collection output from CollectInventory()) -======= ->>>>>>> 73c3323 (chore: updated go deps) golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= ->>>>>>> 555990c (collect: return collection output from CollectInventory()) -======= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= ->>>>>>> 3b85dd3 (chore: fix critical dependabot issues by updating crypto) golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 h1:ESSUROHIBHg7USnszlcdmjBEwdMj9VUvU+OPk4yl2mc= golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= @@ -172,29 +151,8 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= -golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -======= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -<<<<<<< HEAD -======= -======= ->>>>>>> 97a569d (collect: return collection output from CollectInventory()) golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= ->>>>>>> 555990c (collect: return collection output from CollectInventory()) -======= -======= ->>>>>>> 73c3323 (chore: updated go deps) -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= ->>>>>>> 3b85dd3 (chore: fix critical dependabot issues by updating crypto) golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -207,21 +165,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -<<<<<<< HEAD -======= -======= ->>>>>>> 97a569d (collect: return collection output from CollectInventory()) -======= ->>>>>>> 73c3323 (chore: updated go deps) golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= ->>>>>>> 555990c (collect: return collection output from CollectInventory()) -======= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= ->>>>>>> 3b85dd3 (chore: fix critical dependabot issues by updating crypto) golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/internal/cache/sqlite/sqlite.go b/internal/cache/sqlite/sqlite.go index 21ee4b8..bbbdff3 100644 --- a/internal/cache/sqlite/sqlite.go +++ b/internal/cache/sqlite/sqlite.go @@ -3,8 +3,8 @@ package sqlite import ( "fmt" - "github.com/OpenCHAMI/magellan/internal/util" - magellan "github.com/OpenCHAMI/magellan/pkg" + "github.com/davidallendj/magellan/internal/util" + magellan "github.com/davidallendj/magellan/pkg" "github.com/jmoiron/sqlx" ) diff --git a/internal/util/bmc.go b/internal/util/bmc.go index 76f61a8..d2aaebf 100644 --- a/internal/util/bmc.go +++ b/internal/util/bmc.go @@ -1,8 +1,8 @@ package util import ( - "github.com/OpenCHAMI/magellan/pkg/bmc" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/rs/zerolog/log" ) diff --git a/pkg/bmc/bmc.go b/pkg/bmc/bmc.go index 387100a..90dcadf 100644 --- a/pkg/bmc/bmc.go +++ b/pkg/bmc/bmc.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/pkg/secrets" ) type BMCCredentials struct { diff --git a/pkg/collect.go b/pkg/collect.go index 69fe951..d5b8855 100644 --- a/pkg/collect.go +++ b/pkg/collect.go @@ -15,10 +15,10 @@ import ( "sync" "time" - "github.com/OpenCHAMI/magellan/pkg/bmc" - "github.com/OpenCHAMI/magellan/pkg/client" - "github.com/OpenCHAMI/magellan/pkg/crawler" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/client" + "github.com/davidallendj/magellan/pkg/crawler" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/rs/zerolog/log" diff --git a/pkg/crawler/main.go b/pkg/crawler/main.go index 16658d6..3aa4900 100644 --- a/pkg/crawler/main.go +++ b/pkg/crawler/main.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/OpenCHAMI/magellan/internal/util" - "github.com/OpenCHAMI/magellan/pkg/bmc" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/internal/util" + "github.com/davidallendj/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/secrets" "github.com/rs/zerolog/log" "github.com/stmcginnis/gofish" "github.com/stmcginnis/gofish/redfish" diff --git a/pkg/secrets/example/main.go b/pkg/secrets/example/main.go index 52ab649..d5739b8 100644 --- a/pkg/secrets/example/main.go +++ b/pkg/secrets/example/main.go @@ -16,7 +16,7 @@ import ( "fmt" "os" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/pkg/secrets" ) func usage() { diff --git a/pkg/update.go b/pkg/update.go index 411c28e..838ba0a 100644 --- a/pkg/update.go +++ b/pkg/update.go @@ -4,7 +4,7 @@ import ( "fmt" "net/url" - "github.com/OpenCHAMI/magellan/pkg/bmc" + "github.com/davidallendj/magellan/pkg/bmc" "github.com/stmcginnis/gofish" "github.com/stmcginnis/gofish/redfish" ) diff --git a/tests/api_test.go b/tests/api_test.go index d46a312..572b941 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -22,8 +22,8 @@ import ( "flag" - magellan "github.com/davidallendj/magellan/internal" "github.com/davidallendj/magellan/internal/util" + magellan "github.com/davidallendj/magellan/pkg" "github.com/davidallendj/magellan/pkg/client" "github.com/rs/zerolog/log" ) diff --git a/tests/compatibility_test.go b/tests/compatibility_test.go index f428f6a..766b96b 100644 --- a/tests/compatibility_test.go +++ b/tests/compatibility_test.go @@ -14,9 +14,9 @@ import ( "net/http" "testing" - "github.com/OpenCHAMI/magellan/pkg/client" - "github.com/OpenCHAMI/magellan/pkg/crawler" - "github.com/OpenCHAMI/magellan/pkg/secrets" + "github.com/davidallendj/magellan/pkg/client" + "github.com/davidallendj/magellan/pkg/crawler" + "github.com/davidallendj/magellan/pkg/secrets" ) var (