// NewUplosiCmd returns the command that uses uplosi for uploading os images.
funcNewUplosiCmd()*cobra.Command{
cmd:=&cobra.Command{
Use:"uplosi",
Short:"Templates uplosi configuration files",
Long:"Templates uplosi configuration files.",
Args:cobra.ExactArgs(0),
RunE:runUplosi,
}
cmd.SetOut(os.Stdout)
cmd.Flags().String("raw-image","","Path to os image in CSP specific format that should be uploaded.")
cmd.Flags().String("attestation-variant","","Attestation variant of the image being uploaded.")
cmd.Flags().String("csp","","Cloud service provider that we want to upload this image to. If not set, the csp is guessed from the raw-image file name.")
cmd.Flags().String("ref","","Ref of the OS image (part of image shortname).")
cmd.Flags().String("stream","","Stream of the OS image (part of the image shortname).")
cmd.Flags().String("version","","Semantic version of the os image (part of the image shortname).")
cmd.Flags().String("region","eu-central-1","AWS region of the archive S3 bucket")
cmd.Flags().String("bucket","cdn-constellation-backend","S3 bucket name of the archive")
cmd.Flags().String("distribution-id","E1H77EZTHC3NE4","CloudFront distribution ID of the API")
cmd.Flags().String("out","","Optional path to write the upload result to. If not set, the result is written to stdout.")
cmd.Flags().String("uplosi-path","uplosi","Path to the uplosi binary.")