build(deps): bump github.com/coreos/stream-metadata-go

Bumps [github.com/coreos/stream-metadata-go](https://github.com/coreos/stream-metadata-go) from 0.4.9 to 0.4.10.
- [Release notes](https://github.com/coreos/stream-metadata-go/releases)
- [Changelog](https://github.com/coreos/stream-metadata-go/blob/main/docs/release-notes.md)
- [Commits](https://github.com/coreos/stream-metadata-go/compare/v0.4.9...v0.4.10)

---
updated-dependencies:
- dependency-name: github.com/coreos/stream-metadata-go
  dependency-version: 0.4.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2025-09-15 05:09:42 +00:00
committed by GitHub
parent dc117b2e31
commit 41e7dc3ba5
6 changed files with 69 additions and 9 deletions

4
go.mod
View File

@@ -6,7 +6,7 @@ require (
github.com/Microsoft/go-winio v0.6.2
github.com/apparentlymart/go-cidr v1.1.0
github.com/containers/winquit v1.1.0
github.com/coreos/stream-metadata-go v0.4.9
github.com/coreos/stream-metadata-go v0.4.10
github.com/dustin/go-humanize v1.0.1
github.com/google/gopacket v1.1.19
github.com/insomniacslk/dhcp v0.0.0-20240710054256-ddd8a41251c9
@@ -26,6 +26,7 @@ require (
golang.org/x/mod v0.28.0
golang.org/x/sync v0.17.0
golang.org/x/sys v0.36.0
gopkg.in/yaml.v3 v3.0.1
gvisor.dev/gvisor v0.0.0-20240916094835-a174eb65023f
)
@@ -46,5 +47,4 @@ require (
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.36.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

4
go.sum
View File

@@ -6,8 +6,8 @@ github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4t
github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc=
github.com/containers/winquit v1.1.0 h1:jArun04BNDQvt2W0Y78kh9TazN2EIEMG5Im6/JY7+pE=
github.com/containers/winquit v1.1.0/go.mod h1:PsPeZlnbkmGGIToMPHF1zhWjBUkd8aHjMOr/vFcPxw8=
github.com/coreos/stream-metadata-go v0.4.9 h1:7EHsEYr0/oEJZumWc4b7+2KxD5PXy43esipOII2+JVk=
github.com/coreos/stream-metadata-go v0.4.9/go.mod h1:fMObQqQm8Ku91G04btKzEH3AsdP1mrAb986z9aaK0tE=
github.com/coreos/stream-metadata-go v0.4.10 h1:PlZjbJF94cCeCAHwkeBOrLhdT36qq1O8RdJ/auFa7DI=
github.com/coreos/stream-metadata-go v0.4.10/go.mod h1:dTE8UEFgyUcrbdUg7vGT3uIP7S8a1IwUlmWLKlOp8G8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@@ -36,7 +36,10 @@ func getStream(u url.URL) (*stream.Stream, error) {
return nil, err
}
body, err := io.ReadAll(resp.Body)
resp.Body.Close()
if err != nil {
return nil, err
}
err = resp.Body.Close()
if err != nil {
return nil, err
}

View File

@@ -2,6 +2,7 @@ package stream
import (
"crypto/sha256"
"errors"
"fmt"
"io"
"net/http"
@@ -19,7 +20,9 @@ func (a *Artifact) Fetch(w io.Writer) error {
if err != nil {
return err
}
defer resp.Body.Close()
defer func() {
err = errors.Join(resp.Body.Close())
}()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("%s returned status: %s", a.Location, resp.Status)

View File

@@ -1,9 +1,12 @@
package rhcos
import "fmt"
// Extensions is data specific to Red Hat Enterprise Linux CoreOS
type Extensions struct {
AwsWinLi *AwsWinLi `json:"aws-winli,omitempty"`
AzureDisk *AzureDisk `json:"azure-disk,omitempty"`
AwsWinLi *AwsWinLi `json:"aws-winli,omitempty"`
AzureDisk *AzureDisk `json:"azure-disk,omitempty"`
Marketplace *Marketplace `json:"marketplace,omitempty"`
}
// AzureDisk represents an Azure disk image that can be imported
@@ -36,3 +39,54 @@ type SingleImage struct {
Release string `json:"release"`
Image string `json:"image"`
}
// Marketplace contains marketplace images for all clouds.
type Marketplace struct {
Azure *AzureMarketplace `json:"azure,omitempty"`
}
// AzureMarketplaceImages contains both the HyperV- Gen1 & Gen2
// images for a purchase plan.
type AzureMarketplaceImages struct {
Gen1 *AzureMarketplaceImage `json:"hyperVGen1,omitempty"`
Gen2 *AzureMarketplaceImage `json:"hyperVGen2,omitempty"`
}
// AzureMarketplace lists images, both paid and
// unpaid, available in the Azure marketplace.
type AzureMarketplace struct {
// NoPurchasePlan is the standard, unpaid RHCOS image.
NoPurchasePlan *AzureMarketplaceImages `json:"no-purchase-plan,omitempty"`
// OCP is the paid marketplace image for OpenShift Container Platform.
OCP *AzureMarketplaceImages `json:"ocp,omitempty"`
// OPP is the paid marketplace image for OpenShift Platform Plus.
OPP *AzureMarketplaceImages `json:"opp,omitempty"`
// OKE is the paid marketplace image for OpenShift Kubernetes Engine.
OKE *AzureMarketplaceImages `json:"oke,omitempty"`
// OCPEMEA is the paid marketplace image for OpenShift Container Platform in EMEA regions.
OCPEMEA *AzureMarketplaceImages `json:"ocp-emea,omitempty"`
// OPPEMEA is the paid marketplace image for OpenShift Platform Plus in EMEA regions.
OPPEMEA *AzureMarketplaceImages `json:"opp-emea,omitempty"`
// OKEEMEA is the paid marketplace image for OpenShift Kubernetes Engine in EMEA regions.
OKEEMEA *AzureMarketplaceImages `json:"oke-emea,omitempty"`
}
// AzureMarketplaceImage defines the attributes for an Azure
// marketplace image.
type AzureMarketplaceImage struct {
Publisher string `json:"publisher"`
Offer string `json:"offer"`
SKU string `json:"sku"`
Version string `json:"version"`
}
// URN returns the image URN for the marketplace image.
func (i *AzureMarketplaceImage) URN() string {
return fmt.Sprintf("%s:%s:%s:%s", i.Publisher, i.Offer, i.SKU, i.Version)
}

2
vendor/modules.txt vendored
View File

@@ -12,7 +12,7 @@ github.com/apparentlymart/go-cidr/cidr
## explicit; go 1.19
github.com/containers/winquit/pkg/winquit
github.com/containers/winquit/pkg/winquit/win32
# github.com/coreos/stream-metadata-go v0.4.9
# github.com/coreos/stream-metadata-go v0.4.10
## explicit; go 1.18
github.com/coreos/stream-metadata-go/fedoracoreos
github.com/coreos/stream-metadata-go/fedoracoreos/internals