internal/cloudapi: remove support for pulp.ostree upload target
It turned out that the target was never adopted by the service, thus it is being deleted as part of upload code consolidation. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
520b94e24a
commit
742633662d
6 changed files with 34 additions and 118 deletions
|
|
@ -202,34 +202,6 @@ func newOCITarget(options UploadOptions, imageType distro.ImageType) (*target.Ta
|
|||
return t, nil
|
||||
}
|
||||
|
||||
func newPulpOSTreeTarget(options UploadOptions, imageType distro.ImageType) (*target.Target, error) {
|
||||
var pulpUploadOptions PulpOSTreeUploadOptions
|
||||
jsonUploadOptions, err := json.Marshal(options)
|
||||
if err != nil {
|
||||
return nil, HTTPError(ErrorJSONMarshallingError)
|
||||
}
|
||||
err = json.Unmarshal(jsonUploadOptions, &pulpUploadOptions)
|
||||
if err != nil {
|
||||
return nil, HTTPError(ErrorJSONUnMarshallingError)
|
||||
}
|
||||
serverAddress := ""
|
||||
if pulpUploadOptions.ServerAddress != nil {
|
||||
serverAddress = *pulpUploadOptions.ServerAddress
|
||||
}
|
||||
repository := ""
|
||||
if pulpUploadOptions.Repository != nil {
|
||||
repository = *pulpUploadOptions.Repository
|
||||
}
|
||||
t := target.NewPulpOSTreeTarget(&target.PulpOSTreeTargetOptions{
|
||||
ServerAddress: serverAddress,
|
||||
Repository: repository,
|
||||
BasePath: pulpUploadOptions.Basepath,
|
||||
})
|
||||
|
||||
t.ImageName = fmt.Sprintf("composer-api-%s", uuid.New().String())
|
||||
return t, nil
|
||||
}
|
||||
|
||||
// Returns the name of the default target for a given image type name or error
|
||||
// if the image type name is unknown.
|
||||
func getDefaultTarget(imageType ImageTypes) (UploadTypes, error) {
|
||||
|
|
@ -346,10 +318,6 @@ func targetSupportMap() map[UploadTypes]map[ImageTypes]bool {
|
|||
UploadTypesOciObjectstorage: {
|
||||
ImageTypesOci: true,
|
||||
},
|
||||
UploadTypesPulpOstree: {
|
||||
ImageTypesEdgeCommit: true,
|
||||
ImageTypesIotCommit: true,
|
||||
},
|
||||
UploadTypesLocal: {
|
||||
ImageTypesAws: true,
|
||||
ImageTypesAwsRhui: true,
|
||||
|
|
@ -436,9 +404,6 @@ func getTarget(targetType UploadTypes, options UploadOptions, request *ComposeRe
|
|||
case UploadTypesOciObjectstorage:
|
||||
irTarget, err = newOCITarget(options, imageType)
|
||||
|
||||
case UploadTypesPulpOstree:
|
||||
irTarget, err = newPulpOSTreeTarget(options, imageType)
|
||||
|
||||
case UploadTypesLocal:
|
||||
irTarget = target.NewWorkerServerTarget()
|
||||
irTarget.ImageName = imageType.Filename()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue