internal/target: delete support for PulpOSTree target

It turned out that the target was never adopted by the service, thus it
is being removed as part of the upload code consolidation.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-08-12 14:42:48 +02:00 committed by Simon de Vlieger
parent bd848727c2
commit 3b8779d469
3 changed files with 0 additions and 41 deletions

View file

@ -1,33 +0,0 @@
package target
const TargetNamePulpOSTree TargetName = "org.osbuild.pulp.ostree"
type PulpOSTreeTargetOptions struct {
// ServerAddress for the pulp instance
ServerAddress string `json:"server_address,omitempty"`
// Repository to import the ostree commit to
Repository string `json:"repository"`
// BasePath for distributing the repository (if new)
BasePath string `json:"basepath,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
func (PulpOSTreeTargetOptions) isTargetOptions() {}
func NewPulpOSTreeTarget(options *PulpOSTreeTargetOptions) *Target {
return newTarget(TargetNamePulpOSTree, options)
}
type PulpOSTreeTargetResultOptions struct {
RepoURL string `json:"repository_url"`
}
func (PulpOSTreeTargetResultOptions) isTargetResultOptions() {}
func NewPulpOSTreeTargetResult(options *PulpOSTreeTargetResultOptions, artifact *OsbuildArtifact) *TargetResult {
return newTargetResult(TargetNamePulpOSTree, options, artifact)
}

View file

@ -93,8 +93,6 @@ func (target *Target) UnmarshalJSON(data []byte) error {
options = new(ContainerTargetOptions)
case TargetNameWorkerServer:
options = new(WorkerServerTargetOptions)
case TargetNamePulpOSTree:
options = new(PulpOSTreeTargetOptions)
default:
return fmt.Errorf("unexpected target name: %s", rawTarget.Name)
}
@ -280,10 +278,6 @@ func (target Target) MarshalJSON() ([]byte, error) {
// the incompatible change.
rawOptions, err = json.Marshal(target.Options)
case *PulpOSTreeTargetOptions:
// added after incompatibility change
rawOptions, err = json.Marshal(target.Options)
default:
return nil, fmt.Errorf("unexpected target options type: %t", t)
}

View file

@ -76,8 +76,6 @@ func UnmarshalTargetResultOptions(trName TargetName, rawOptions json.RawMessage)
options = new(OCIObjectStorageTargetResultOptions)
case TargetNameContainer:
options = new(ContainerTargetResultOptions)
case TargetNamePulpOSTree:
options = new(PulpOSTreeTargetResultOptions)
case TargetNameWorkerServer:
options = new(WorkerServerTargetResultOptions)
default: