mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
Update CLI doc strings
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
3f737240fc
commit
1be9959cf5
@ -21,9 +21,9 @@ import (
|
||||
|
||||
func newCompareCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "compare {aws-sev-snp|azure-sev-snp|azure-tdx|gcp-sev-snp} [FILE] [FILE] ...",
|
||||
Short: "Compare two or more attestation reports and return the lowest version",
|
||||
Long: "Compare two or more attestation reports and return the lowest version.",
|
||||
Use: "compare VARIANT FILE FILE [FILE...]",
|
||||
Short: "Returns the minimum version of all given attestation reports.",
|
||||
Long: "Compare two or more attestation reports and return the report with the minimum version of all given attestation reports.",
|
||||
Example: "cli compare azure-sev-snp report1.json report2.json",
|
||||
Args: cobra.MatchAll(cobra.MinimumNArgs(3), arg0isAttestationVariant()),
|
||||
RunE: runCompare,
|
||||
|
@ -26,7 +26,7 @@ import (
|
||||
// newDeleteCmd creates the delete command.
|
||||
func newDeleteCmd() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "delete {aws-sev-snp|azure-sev-snp|azure-tdx|gcp-sev-snp} {attestation-report|guest-firmware} <version>",
|
||||
Use: "delete VARIANT KIND <version>",
|
||||
Short: "Delete an object from the attestationconfig API",
|
||||
Long: "Delete a specific object version from the config api. <version> is the name of the object to delete (without .json suffix)",
|
||||
Example: "COSIGN_PASSWORD=$CPW COSIGN_PRIVATE_KEY=$CKEY cli delete azure-sev-snp attestation-report 1.0.0",
|
||||
|
@ -29,7 +29,7 @@ import (
|
||||
|
||||
func newUploadCmd() *cobra.Command {
|
||||
uploadCmd := &cobra.Command{
|
||||
Use: "upload {aws-sev-snp|azure-sev-snp|azure-tdx|gcp-sev-snp} {attestation-report|guest-firmware} <path>",
|
||||
Use: "upload VARIANT KIND FILE",
|
||||
Short: "Upload an object to the attestationconfig API",
|
||||
|
||||
Long: fmt.Sprintf("Upload a new object to the attestationconfig API. For snp-reports the new object is added to a cache folder first.\n"+
|
||||
|
@ -33,7 +33,7 @@ func arg0isAttestationVariant() cobra.PositionalArgs {
|
||||
func isValidKind(arg int) cobra.PositionalArgs {
|
||||
return func(_ *cobra.Command, args []string) error {
|
||||
if kind := kindFromString(args[arg]); kind == unknown {
|
||||
return fmt.Errorf("argument %s isn't a valid kind", args[arg])
|
||||
return fmt.Errorf("argument %s isn't a valid kind: must be one of [%q, %q]", args[arg], attestationReport, guestFirmware)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user