Skip to content

Commit

Permalink
cloudapi: Add UploadTypesLocal for local_save status reports
Browse files Browse the repository at this point in the history
This allows the compose status to reflect that it was saved locally, not
uploaded to a remote service. Without this it returns an error of
'Compose has unknown upload target'
  • Loading branch information
bcl committed May 13, 2024
1 parent 8dece19 commit 66c5c5e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
2 changes: 2 additions & 0 deletions internal/cloudapi/v2/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ func targetResultToUploadStatus(t *target.TargetResult) (*UploadStatus, error) {
uploadOptions = PulpOSTreeUploadStatus{
RepoUrl: pulpOSTreeOptions.RepoURL,
}
case target.TargetNameWorkerServer:
uploadType = UploadTypesLocal
default:
return nil, fmt.Errorf("unknown upload target: %s", t.Name)
}
Expand Down
45 changes: 24 additions & 21 deletions internal/cloudapi/v2/openapi.v2.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/cloudapi/v2/openapi.v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ components:
- container
- oci.objectstorage
- pulp.ostree
- local
AWSEC2UploadStatus:
type: object
required:
Expand Down

0 comments on commit 66c5c5e

Please sign in to comment.