Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/klauspost/connect-compress/v2 v2.0.0
github.com/lestrrat-go/jwx/v2 v2.1.6
github.com/markbates/goth v1.82.0
github.com/metal-stack/api v0.0.31
github.com/metal-stack/api v0.0.32-0.20251016121234-e738c13c2fc3
github.com/metal-stack/go-ipam v1.14.13
github.com/metal-stack/masterdata-api v0.13.0
github.com/metal-stack/metal-lib v0.23.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mdelapenya/tlscert v0.2.0 h1:7H81W6Z/4weDvZBNOfQte5GpIMo0lGYEeWbkGp5LJHI=
github.com/mdelapenya/tlscert v0.2.0/go.mod h1:O4njj3ELLnJjGdkN7M/vIVCpZ+Cf0L6muqOG4tLSl8o=
github.com/metal-stack/api v0.0.31 h1:ivgaqYuWFrGO4IZS/9ViwkuV1AzytZlji6zgDnANo+s=
github.com/metal-stack/api v0.0.31/go.mod h1:LcJkrJPJRdLPFaeCiWy5tL0dJXU74kq+vFe5uc/Cm9U=
github.com/metal-stack/api v0.0.32-0.20251016121234-e738c13c2fc3 h1:59fexk9TiEAiThNpEGRrLkrH5cMDzGhO/W1Gq4HbgRs=
github.com/metal-stack/api v0.0.32-0.20251016121234-e738c13c2fc3/go.mod h1:LcJkrJPJRdLPFaeCiWy5tL0dJXU74kq+vFe5uc/Cm9U=
github.com/metal-stack/go-ipam v1.14.13 h1:/W5/MDBX5EU18xNDjlBvV6JjQ1Ot12dO2WxLvV6S8vc=
github.com/metal-stack/go-ipam v1.14.13/go.mod h1:eif3UGUFP7CWJdrgLIOjhVM3G2K19GN8lhCgPVfvLDs=
github.com/metal-stack/masterdata-api v0.13.0 h1:1AxnsiWiTMstjMsphZ0wMFT7aW3QQhAMumXnQ81PtHk=
Expand Down
4 changes: 2 additions & 2 deletions pkg/repository/filesystemlayout.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (r *filesystemLayoutRepository) list(ctx context.Context, rq *apiv2.Filesys
return fsls, nil
}

func (r *filesystemLayoutRepository) convertToInternal(ctx context.Context, f *apiv2.FilesystemLayout) (*metal.FilesystemLayout, error) {
func (r *filesystemLayoutRepository) convertToInternal(ctx context.Context, f *apiv2.FilesystemLayout, opts ...Option) (*metal.FilesystemLayout, error) {
var (
fss = []metal.Filesystem{}
ds = []metal.Disk{}
Expand Down Expand Up @@ -350,7 +350,7 @@ func (r *filesystemLayoutRepository) convertToInternal(ctx context.Context, f *a
return fl, nil

}
func (r *filesystemLayoutRepository) convertToProto(ctx context.Context, in *metal.FilesystemLayout) (*apiv2.FilesystemLayout, error) {
func (r *filesystemLayoutRepository) convertToProto(ctx context.Context, in *metal.FilesystemLayout, opts ...Option) (*apiv2.FilesystemLayout, error) {
var filesystems []*apiv2.Filesystem
for _, fs := range in.Filesystems {
f, err := enum.GetEnum[apiv2.Format](string(fs.Format))
Expand Down
4 changes: 2 additions & 2 deletions pkg/repository/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (r *imageRepository) list(ctx context.Context, rq *apiv2.ImageQuery) ([]*me
return r.SortImages(images), nil
}

func (r *imageRepository) convertToInternal(ctx context.Context, msg *apiv2.Image) (*metal.Image, error) {
func (r *imageRepository) convertToInternal(ctx context.Context, msg *apiv2.Image, opts ...Option) (*metal.Image, error) {
features, err := metal.ImageFeaturesFrom(msg.Features)
if err != nil {
return nil, err
Expand Down Expand Up @@ -228,7 +228,7 @@ func (r *imageRepository) convertToInternal(ctx context.Context, msg *apiv2.Imag
}
return image, nil
}
func (r *imageRepository) convertToProto(ctx context.Context, in *metal.Image) (*apiv2.Image, error) {
func (r *imageRepository) convertToProto(ctx context.Context, in *metal.Image, opts ...Option) (*apiv2.Image, error) {
var features []apiv2.ImageFeature
for feature := range in.Features {
switch feature {
Expand Down
4 changes: 2 additions & 2 deletions pkg/repository/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ func (r *ipRepository) allocateRandomIP(ctx context.Context, parent *metal.Netwo
return "", "", errorutil.InvalidArgument("cannot allocate random free ip in ipam, no ips left in network:%s af:%s parent afs:%#v", parent.ID, addressfamily, parent.Prefixes.AddressFamilies())
}

func (r *ipRepository) convertToInternal(ctx context.Context, ip *apiv2.IP) (*metal.IP, error) {
func (r *ipRepository) convertToInternal(ctx context.Context, ip *apiv2.IP, opts ...Option) (*metal.IP, error) {
panic("unimplemented")
}

func (r *ipRepository) convertToProto(ctx context.Context, metalIP *metal.IP) (*apiv2.IP, error) {
func (r *ipRepository) convertToProto(ctx context.Context, metalIP *metal.IP, opts ...Option) (*apiv2.IP, error) {
t := apiv2.IPType_IP_TYPE_UNSPECIFIED
switch metalIP.Type {
case metal.Ephemeral:
Expand Down
Loading