Skip to content

Commit

Permalink
Changed github.com/OpenCHAMI/smd to github.com/Cray-HPE/hms-smd
Browse files Browse the repository at this point in the history
  • Loading branch information
shunr-hpe committed Jan 16, 2025
1 parent 216e923 commit d5845ae
Show file tree
Hide file tree
Showing 28 changed files with 58 additions and 59 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

### Build Base Stage ###
# Build base just has the packages installed we need.
FROM artifactory.algol60.net/docker.io/library/golang:1.16-alpine AS build-base
FROM artifactory.algol60.net/docker.io/library/golang:1.23-alpine AS build-base

RUN set -ex \
&& apk -U upgrade \
Expand All @@ -50,9 +50,9 @@ FROM base AS builder

# Base image contains everything needed for Go building, just build.
RUN set -ex \
&& go build -v -tags musl -i github.com/Cray-HPE/hms-smd/v2/cmd/smd \
&& go build -v -tags musl -i github.com/Cray-HPE/hms-smd/v2/cmd/smd-loader \
&& go build -v -tags musl -i github.com/Cray-HPE/hms-smd/v2/cmd/smd-init
&& go build -v -tags musl github.com/Cray-HPE/hms-smd/v2/cmd/smd \
&& go build -v -tags musl github.com/Cray-HPE/hms-smd/v2/cmd/smd-loader \
&& go build -v -tags musl github.com/Cray-HPE/hms-smd/v2/cmd/smd-init


### Final Stage ###
Expand Down
2 changes: 1 addition & 1 deletion cmd/smd-init/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"strconv"
"time"

"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/golang-migrate/migrate/v4"
"github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
Expand Down
4 changes: 2 additions & 2 deletions cmd/smd/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"strconv"

base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/OpenCHAMI/smd/v2/pkg/rf"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/pkg/rf"
)

////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions cmd/smd/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (

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

// When we discover a Redfish Endpoint, the data retrieved is processed
Expand Down
4 changes: 2 additions & 2 deletions cmd/smd/hmsdsmock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"log"

base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
)

type TestResults struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/smd/job-types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"github.com/hashicorp/go-retryablehttp"

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

///////////////////////////////////////////////////////////////////////////////
Expand Down
12 changes: 6 additions & 6 deletions cmd/smd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ import (
"github.com/Cray-HPE/hms-certs/pkg/hms_certs"
compcreds "github.com/Cray-HPE/hms-compcredentials"
sstorage "github.com/Cray-HPE/hms-securestorage"
"github.com/Cray-HPE/hms-smd/v2/internal/hbtdapi"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/internal/pgmigrate"
"github.com/Cray-HPE/hms-smd/v2/internal/slsapi"
"github.com/Cray-HPE/hms-smd/v2/pkg/rf"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
jwtauth "github.com/OpenCHAMI/jwtauth/v5"
"github.com/OpenCHAMI/smd/v2/internal/hbtdapi"
"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/OpenCHAMI/smd/v2/internal/pgmigrate"
"github.com/OpenCHAMI/smd/v2/internal/slsapi"
"github.com/OpenCHAMI/smd/v2/pkg/rf"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/go-chi/chi/v5"
"github.com/hashicorp/go-retryablehttp"
"github.com/sirupsen/logrus"
Expand Down
3 changes: 1 addition & 2 deletions cmd/smd/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

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

type Response struct {
Expand Down Expand Up @@ -60,7 +60,6 @@ func sendResource(w http.ResponseWriter, code int, uri *sm.ResourceURI) {
sendJSON(w, code, uri)
}


func sendJsonNewResourceIDArray(w http.ResponseWriter, collectionURI string, uris []*sm.ResourceURI) {
if len(uris) == 0 {
sendJSON(w, http.StatusNoContent, nil)
Expand Down
6 changes: 3 additions & 3 deletions cmd/smd/rfevent.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"sync"

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

var em = base.NewHMSError("sm.msgbus", "internal error")
Expand Down
8 changes: 4 additions & 4 deletions cmd/smd/rfevent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import (

compcreds "github.com/Cray-HPE/hms-compcredentials"
sstorage "github.com/Cray-HPE/hms-securestorage"
"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/OpenCHAMI/smd/v2/pkg/rf"
st "github.com/OpenCHAMI/smd/v2/pkg/sharedtest"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/pkg/rf"
st "github.com/Cray-HPE/hms-smd/v2/pkg/sharedtest"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
)

var testFQDN = "[fd40:aaaa:bbbb:1000:240:a6ff:ee82:d7c2]"
Expand Down
8 changes: 4 additions & 4 deletions cmd/smd/smd-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (

base "github.com/Cray-HPE/hms-base"
compcreds "github.com/Cray-HPE/hms-compcredentials"
"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/OpenCHAMI/smd/v2/pkg/rf"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/pkg/rf"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
"github.com/go-chi/chi/v5"
"github.com/openchami/schemas/schemas"
redfish "github.com/openchami/schemas/schemas/csm"
Expand Down Expand Up @@ -2696,7 +2696,7 @@ func (s *SmD) parseRedfishPostDataV2(w http.ResponseWriter, data []byte) error {
ceNum := 0
for _, system := range root.Systems {
var nid json.Number
nidJNum, err := json.Marshal(ceNum+1)
nidJNum, err := json.Marshal(ceNum + 1)
if err != nil {
s.Log(LOG_NOTICE, "failed to marshal NID %d into json: %v", ceNum+1, err)
} else {
Expand Down
8 changes: 4 additions & 4 deletions cmd/smd/smd-api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ import (
base "github.com/Cray-HPE/hms-base"
compcreds "github.com/Cray-HPE/hms-compcredentials"
sstorage "github.com/Cray-HPE/hms-securestorage"
"github.com/OpenCHAMI/smd/v2/internal/hmsds"
"github.com/OpenCHAMI/smd/v2/pkg/rf"
stest "github.com/OpenCHAMI/smd/v2/pkg/sharedtest"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/internal/hmsds"
"github.com/Cray-HPE/hms-smd/v2/pkg/rf"
stest "github.com/Cray-HPE/hms-smd/v2/pkg/sharedtest"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"

"github.com/gorilla/mux"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/smd/state-change.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (
"time"

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

var e = base.NewHMSError("sm", "server error")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/OpenCHAMI/smd/v2
module github.com/Cray-HPE/hms-smd/v2

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion internal/hmsds/hmsds-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package hmsds

import (
base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
)

var e = base.NewHMSError("hmsds", "GenericError")
Expand Down
2 changes: 1 addition & 1 deletion internal/hmsds/hmsds-api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"os"
"testing"

"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"

"github.com/DATA-DOG/go-sqlmock"
sq "github.com/Masterminds/squirrel"
Expand Down
4 changes: 2 additions & 2 deletions internal/hmsds/hmsds-postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"time"

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

sq "github.com/Masterminds/squirrel"
"github.com/lib/pq"
Expand Down
6 changes: 3 additions & 3 deletions internal/hmsds/hmsds-postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/pkg/rf"
stest "github.com/OpenCHAMI/smd/v2/pkg/sharedtest"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/pkg/rf"
stest "github.com/Cray-HPE/hms-smd/v2/pkg/sharedtest"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"

"github.com/DATA-DOG/go-sqlmock"
sq "github.com/Masterminds/squirrel"
Expand Down
2 changes: 1 addition & 1 deletion internal/hmsds/hmsds-tx-postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"

sq "github.com/Masterminds/squirrel"
"github.com/google/uuid"
Expand Down
2 changes: 1 addition & 1 deletion internal/hmsds/query-postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"strings"

base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"

"github.com/lib/pq"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/hmsds/query-shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"strings"

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

// Matches generic query sources in external API, but with real table names,
Expand Down
2 changes: 1 addition & 1 deletion pkg/service-reservations/demo/demoApp.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package main
import (
"time"

reservation "github.com/OpenCHAMI/smd/v2/pkg/service-reservations"
reservation "github.com/Cray-HPE/hms-smd/v2/pkg/service-reservations"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/service-reservations/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"time"

base "github.com/Cray-HPE/hms-base"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
"github.com/hashicorp/go-retryablehttp"
"github.com/sirupsen/logrus"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/sharedtest/endpoints-examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ package sharedtest
import (
"encoding/json"

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

//////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions pkg/sharedtest/hwinv-examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ package sharedtest
import (
"encoding/json"

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

///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion pkg/sm/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"encoding/json"

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

// This is a generic link to a resource owned by state manager, i.e. a
Expand Down
2 changes: 1 addition & 1 deletion pkg/sm/hwinv.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"strconv"

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

var ErrHWLocInvalid = base.NewHMSError("sm", "ID is empty or not a valid xname")
Expand Down
4 changes: 2 additions & 2 deletions pkg/sm/hwinv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ package sm_test
import (
"testing"

stest "github.com/OpenCHAMI/smd/v2/pkg/sharedtest"
"github.com/OpenCHAMI/smd/v2/pkg/sm"
stest "github.com/Cray-HPE/hms-smd/v2/pkg/sharedtest"
"github.com/Cray-HPE/hms-smd/v2/pkg/sm"
)

///////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit d5845ae

Please sign in to comment.