Skip to content

Commit

Permalink
Merge pull request #5 from threefoldtech/support-zos4-upgrade
Browse files Browse the repository at this point in the history
update upgrader module to get latest zos version from the registrar
  • Loading branch information
ashraffouda authored Feb 6, 2025
2 parents 313fcce + 5dcad7a commit fba513c
Show file tree
Hide file tree
Showing 5 changed files with 760 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmds/identityd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/pkg/errors"
"github.com/threefoldtech/zos4/pkg/stubs"
"github.com/threefoldtech/zos4/pkg/upgrade"
"github.com/threefoldtech/zosbase/pkg/app"
"github.com/threefoldtech/zosbase/pkg/upgrade"

"github.com/threefoldtech/zos4/pkg"
"github.com/threefoldtech/zos4/pkg/identity"
Expand Down
2 changes: 1 addition & 1 deletion pkg/registrar_gateway/registrar_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewRegistrarGateway(cl zbus.Client) (zos4Pkg.RegistrarGateway, error) {
}

func (r *registrarGateway) GetZosVersion() (string, error) {
url := fmt.Sprintf("%s/v1/nodes/%d/version", r.baseURL, r.nodeID)
url := fmt.Sprintf("%s/v1/zos/version", r.baseURL)
log.Debug().Str("url", url).Msg("requesting zos version")

return r.getZosVersion(url)
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type UpdateNodeRequest struct {
FarmID uint64 `json:"farm_id" binding:"required,min=1"`
Resources Resources `json:"resources" binding:"required"`
Location Location `json:"location" binding:"required"`
Interfaces []Interface `json:"interfaces" binding:"required`
Interfaces []Interface `json:"interfaces" binding:"required"`
SecureBoot bool `json:"secure_boot"`
Virtualized bool `json:"virtualized"`
SerialNumber string `json:"serial_number" binding:"required"`
Expand Down
Loading

0 comments on commit fba513c

Please sign in to comment.