Skip to content

Commit

Permalink
Redirect imports to OpenCHAMI smd and rehome
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlovelltroy committed Nov 1, 2023
1 parent 0da5f71 commit 898b116
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ kubernetes/.packaged/
*.csr
*.key
*.pem
dist/

# compiled go command
boot-script-service
12 changes: 6 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

project_name: hms-bss
project_name: bss
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy

builds:
- id: hms-bss
- id: bss
main: ./cmd/boot-script-service
binary: boot-script-service
goos:
Expand All @@ -22,10 +22,10 @@ builds:
dockers:
-
image_templates:
- bikeshack/{{.ProjectName}}:latest
- bikeshack/{{.ProjectName}}:{{ .Tag }}
- bikeshack/{{.ProjectName}}:{{ .Major }}
- bikeshack/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}
- ghcr.io/openchami/{{.ProjectName}}:latest
- ghcr.io/openchami/{{.ProjectName}}:{{ .Tag }}
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}
- ghcr.io/openchami/{{.ProjectName}}:{{ .Major }}.{{ .Minor }}
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
Expand Down
2 changes: 1 addition & 1 deletion cmd/boot-script-service/boot_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
"github.com/Cray-HPE/hms-bss/pkg/bssTypes"
hmetcd "github.com/Cray-HPE/hms-hmetcd"
"github.com/OpenCHAMI/bss/pkg/bssTypes"
jsonpatch "github.com/evanphx/json-patch"
"github.com/google/uuid"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/boot-script-service/bss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"os"
"testing"

"github.com/Cray-HPE/hms-bss/pkg/bssTypes"
"github.com/OpenCHAMI/bss/pkg/bssTypes"
)

func TestMain(m *testing.M) {
Expand Down
3 changes: 2 additions & 1 deletion cmd/boot-script-service/cloudInitAPI.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ package main
import (
"encoding/json"
"fmt"
"github.com/Cray-HPE/hms-bss/pkg/bssTypes"
"log"
"math/rand"
"net/http"
"strings"

"github.com/OpenCHAMI/bss/pkg/bssTypes"

yaml "gopkg.in/yaml.v2"

base "github.com/Cray-HPE/hms-base"
Expand Down
4 changes: 2 additions & 2 deletions cmd/boot-script-service/default_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
"github.com/Cray-HPE/hms-bss/pkg/bssTypes"
hms_s3 "github.com/Cray-HPE/hms-s3"
"github.com/OpenCHAMI/bss/pkg/bssTypes"
)

const (
Expand Down Expand Up @@ -177,7 +177,7 @@ func BootparametersGetAll(w http.ResponseWriter, r *http.Request) {
var results []bssTypes.BootParams
if useSQL {
var (
err error
err error
nodes []string
)
results, err = bssdb.GetBootParamsAll()
Expand Down
4 changes: 2 additions & 2 deletions cmd/boot-script-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
"github.com/Cray-HPE/hms-bss/internal/postgres"
hmetcd "github.com/Cray-HPE/hms-hmetcd"
"github.com/OpenCHAMI/bss/internal/postgres"
)

const kvDefaultRetryCount uint64 = 10
Expand Down Expand Up @@ -230,7 +230,7 @@ func sqlGetCreds() (user, password string, err error) {

func sqlOpen(host string, port uint, user, password string, ssl bool, retryCount, retryWait uint64) (postgres.BootDataDatabase, error) {
var (
err error
err error
bddb postgres.BootDataDatabase
)
ix := uint64(1)
Expand Down
4 changes: 2 additions & 2 deletions cmd/boot-script-service/sm.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
rf "github.com/Cray-HPE/hms-smd/pkg/redfish"
"github.com/Cray-HPE/hms-smd/pkg/sm"
"github.com/OpenCHAMI/smd/pkg/rf"
"github.com/OpenCHAMI/smd/pkg/sm"
)

const badMAC = "not available"
Expand Down
43 changes: 40 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,53 @@
module github.com/Cray-HPE/hms-bss
module github.com/OpenCHAMI/bss

go 1.16
go 1.20

require (
github.com/Cray-HPE/hms-base v1.15.0
github.com/Cray-HPE/hms-hmetcd v1.10.2
github.com/Cray-HPE/hms-s3 v1.9.2
github.com/Cray-HPE/hms-smd v1.30.9

github.com/docker/distribution v2.7.1+incompatible
github.com/evanphx/json-patch v4.9.0+incompatible
github.com/google/uuid v1.1.1
github.com/jmoiron/sqlx v1.2.0
github.com/lib/pq v1.3.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/Cray-HPE/hms-certs v1.3.2 // indirect
github.com/Cray-HPE/hms-securestorage v1.12.2 // indirect
github.com/aws/aws-sdk-go v1.29.2 // indirect
github.com/coreos/etcd v3.3.13+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
github.com/hashicorp/go-rootcerts v1.0.1 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/vault/api v1.0.4 // indirect
github.com/hashicorp/vault/sdk v0.1.13 // indirect
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.3.0 // indirect
github.com/pierrec/lz4 v2.4.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
go.etcd.io/etcd v3.3.13+incompatible // indirect
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 // indirect
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc // indirect
golang.org/x/sys v0.0.0-20200817155316-9781c653f443 // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
google.golang.org/genproto v0.0.0-20200815001618-f69a88009b70 // indirect
google.golang.org/grpc v1.29.1 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
)
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ github.com/Cray-HPE/hms-s3 v1.9.2 h1:qZ/yTTr1+r1slDldOsqkcF736bnsiZ/002JVO7LGD/0
github.com/Cray-HPE/hms-s3 v1.9.2/go.mod h1:p5pVsMDeOdXKssd9qyFtXo4ztrn2lhD04nrO8+NOi7g=
github.com/Cray-HPE/hms-securestorage v1.12.2 h1:H5n0i6ldzewd5p7PI2Hktr/+9cYfSCui+0367p2L6n8=
github.com/Cray-HPE/hms-securestorage v1.12.2/go.mod h1:P4CMKqQVlx/lv+AdyEjNQubZw2FKNyo/IAtFNgQ3VuI=
github.com/Cray-HPE/hms-smd v1.30.9 h1:LbezlCG3r1znGZoWXH7rgTYgHuU8wH2jDLBmYuUHyx0=
github.com/Cray-HPE/hms-smd v1.30.9/go.mod h1:9TFpxIiPnmgBphq0QfFt1BmKiuSZ8VXu5N7A5EJz6L4=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/Masterminds/squirrel v1.4.0/go.mod h1:yaPeOnPG5ZRwL9oKdTsO/prlkPbXWZlRVMQ/gGlzIuA=
Expand Down
2 changes: 1 addition & 1 deletion internal/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"
"strings"

"github.com/Cray-HPE/hms-bss/pkg/bssTypes"
"github.com/OpenCHAMI/bss/pkg/bssTypes"
"github.com/docker/distribution/uuid"
"github.com/jmoiron/sqlx"
"github.com/jmoiron/sqlx/reflectx"
Expand Down

0 comments on commit 898b116

Please sign in to comment.