mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-21 15:56:26 -04:00
config: mark attestationconfigapi as unimplemented
This commit is contained in:
parent
26bb689c83
commit
28167f45d3
@ -164,7 +164,6 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Creating cluster using config:"
|
||||
cat constellation-conf.yaml
|
||||
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' || true
|
||||
|
||||
- name: Constellation create (CLI)
|
||||
|
@ -72,35 +72,39 @@ func (c *GCPSEVSNP) getToMarshallLatestWithResolvedVersions() AttestationCfg {
|
||||
}
|
||||
|
||||
// FetchAndSetLatestVersionNumbers fetches the latest version numbers from the configapi and sets them.
|
||||
func (c *GCPSEVSNP) FetchAndSetLatestVersionNumbers(ctx context.Context, fetcher attestationconfigapi.Fetcher) error {
|
||||
// Only talk to the API if at least one version number is set to latest.
|
||||
if !(c.BootloaderVersion.WantLatest || c.TEEVersion.WantLatest || c.SNPVersion.WantLatest || c.MicrocodeVersion.WantLatest) {
|
||||
return nil
|
||||
}
|
||||
func (c *GCPSEVSNP) FetchAndSetLatestVersionNumbers(_ context.Context, _ attestationconfigapi.Fetcher) error {
|
||||
panic("not implemented")
|
||||
|
||||
versions, err := fetcher.FetchSEVSNPVersionLatest(ctx, variant.GCPSEVSNP{})
|
||||
if err != nil {
|
||||
return fmt.Errorf("fetching latest TCB versions from configapi: %w", err)
|
||||
}
|
||||
// set number and keep isLatest flag
|
||||
c.mergeWithLatestVersion(versions.SEVSNPVersion)
|
||||
return nil
|
||||
// TODO(msanft): Implement with https://dev.azure.com/Edgeless/Edgeless/_workitems/edit/4024
|
||||
|
||||
// // Only talk to the API if at least one version number is set to latest.
|
||||
// if !(c.BootloaderVersion.WantLatest || c.TEEVersion.WantLatest || c.SNPVersion.WantLatest || c.MicrocodeVersion.WantLatest) {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// versions, err := fetcher.FetchSEVSNPVersionLatest(ctx, variant.GCPSEVSNP{})
|
||||
// if err != nil {
|
||||
// return fmt.Errorf("fetching latest TCB versions from configapi: %w", err)
|
||||
// }
|
||||
// // set number and keep isLatest flag
|
||||
// c.mergeWithLatestVersion(versions.SEVSNPVersion)
|
||||
// return nil
|
||||
}
|
||||
|
||||
func (c *GCPSEVSNP) mergeWithLatestVersion(latest attestationconfigapi.SEVSNPVersion) {
|
||||
if c.BootloaderVersion.WantLatest {
|
||||
c.BootloaderVersion.Value = latest.Bootloader
|
||||
}
|
||||
if c.TEEVersion.WantLatest {
|
||||
c.TEEVersion.Value = latest.TEE
|
||||
}
|
||||
if c.SNPVersion.WantLatest {
|
||||
c.SNPVersion.Value = latest.SNP
|
||||
}
|
||||
if c.MicrocodeVersion.WantLatest {
|
||||
c.MicrocodeVersion.Value = latest.Microcode
|
||||
}
|
||||
}
|
||||
// func (c *GCPSEVSNP) mergeWithLatestVersion(latest attestationconfigapi.SEVSNPVersion) {
|
||||
// if c.BootloaderVersion.WantLatest {
|
||||
// c.BootloaderVersion.Value = latest.Bootloader
|
||||
// }
|
||||
// if c.TEEVersion.WantLatest {
|
||||
// c.TEEVersion.Value = latest.TEE
|
||||
// }
|
||||
// if c.SNPVersion.WantLatest {
|
||||
// c.SNPVersion.Value = latest.SNP
|
||||
// }
|
||||
// if c.MicrocodeVersion.WantLatest {
|
||||
// c.MicrocodeVersion.Value = latest.Microcode
|
||||
// }
|
||||
// }
|
||||
|
||||
// GetVariant returns gcp-sev-es as the variant.
|
||||
func (GCPSEVES) GetVariant() variant.Variant {
|
||||
|
Loading…
x
Reference in New Issue
Block a user