mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-08 01:05:16 -04:00
config: fix fetcher parse azure sev-snp version (#1911)
This commit is contained in:
parent
ab74730fd7
commit
4f63481b7d
4 changed files with 23 additions and 13 deletions
|
@ -18,6 +18,9 @@ import (
|
|||
"github.com/edgelesssys/constellation/v2/internal/staticupload"
|
||||
)
|
||||
|
||||
// VersionFormat is the format of the version name in the S3 bucket.
|
||||
const VersionFormat = "2006-01-02-15-04"
|
||||
|
||||
// Client manages (modifies) the version information for the attestation variants.
|
||||
type Client struct {
|
||||
s3Client *apiclient.Client
|
||||
|
@ -105,7 +108,7 @@ func (a Client) deleteAzureSEVSNPVersion(versions AzureSEVSNPVersionList, versio
|
|||
}
|
||||
|
||||
func (a Client) uploadAzureSEVSNP(versions AzureSEVSNPVersion, versionNames []string, date time.Time) (res []crudCmd, err error) {
|
||||
dateStr := date.Format("2006-01-02-15-04") + ".json"
|
||||
dateStr := date.Format(VersionFormat) + ".json"
|
||||
|
||||
res = append(res, putCmd{AzureSEVSNPVersionAPI{Version: dateStr, AzureSEVSNPVersion: versions}})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue