tasks

package
v0.0.0-...-7a9eba1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentOverridesForRepo

func ContentOverridesForRepo(orgId string, domainName string, templateUUID string, pulpContentPath string, repo api.RepositoryResponse) ([]caliri.ContentOverrideDTO, error)

func DeleteSnapshotHandler

func DeleteSnapshotHandler(ctx context.Context, task *models.TaskInfo, _ *queue.Queue) error

func DeleteTemplateHandler

func DeleteTemplateHandler(ctx context.Context, task *models.TaskInfo, _ *queue.Queue) error

func GenContentDto

func GenContentDto(repo api.RepositoryResponse) caliri.ContentDTO

func IntrospectHandler

func IntrospectHandler(ctx context.Context, task *models.TaskInfo, q *queue.Queue) error

func LogForTask

func LogForTask(taskID, typename, requestID string) *zerolog.Logger

func SnapshotHandler

func SnapshotHandler(ctx context.Context, task *models.TaskInfo, queue *queue.Queue) error

func UnneededOverrides

func UnneededOverrides(existingDtos []caliri.ContentOverrideDTO, expectedDTOs []caliri.ContentOverrideDTO) []caliri.ContentOverrideDTO

UnneededOverrides given a list of existing overrides, and expected overrides, return the existing overrides that are no longer needed

func UpdateRepositoryHandler

func UpdateRepositoryHandler(ctx context.Context, task *models.TaskInfo, _ *queue.Queue) error

func UpdateTemplateContentHandler

func UpdateTemplateContentHandler(ctx context.Context, task *models.TaskInfo, queue *queue.Queue) error

Types

type DeleteRepositorySnapshots

type DeleteRepositorySnapshots struct {
	// contains filtered or unexported fields
}

func (*DeleteRepositorySnapshots) Run

type DeleteRepositorySnapshotsPayload

type DeleteRepositorySnapshotsPayload struct {
	RepoConfigUUID string
}

type DeleteTemplates

type DeleteTemplates struct {
	// contains filtered or unexported fields
}

func (*DeleteTemplates) Run

func (d *DeleteTemplates) Run() error

type DeleteTemplatesPayload

type DeleteTemplatesPayload struct {
	TemplateUUID    string
	RepoConfigUUIDs []string
}

type IntrospectionTask

type IntrospectionTask struct {
	URL string
	// contains filtered or unexported fields
}

func (*IntrospectionTask) Run

func (i *IntrospectionTask) Run() error

type SnapshotRepository

type SnapshotRepository struct {
	// contains filtered or unexported fields
}

func (*SnapshotRepository) GetOrphanedLatestVersion

func (sr *SnapshotRepository) GetOrphanedLatestVersion(repoConfigUUID string) (*string, error)

GetOrphanedLatestVersion

 If a snapshot is made, but something bad happens between the repo version being made and its publication or distribution,
		the repo version is 'lost', as there is no snapshot referring to it.  If this happens we can grab the latest
	    repo version from pulp, and check if any snapshot exists with that version href.  If not then this is an orphaned version

func (*SnapshotRepository) Run

func (sr *SnapshotRepository) Run() (err error)

SnapshotRepository creates a snapshot of a given repository config

func (*SnapshotRepository) UpdatePayload

func (sr *SnapshotRepository) UpdatePayload() error

type UpdateRepository

type UpdateRepository struct {
	// contains filtered or unexported fields
}

func (*UpdateRepository) Run

func (ur *UpdateRepository) Run() error

func (*UpdateRepository) UpdateCPContent

func (ur *UpdateRepository) UpdateCPContent(content caliri.ContentDTO) error

UpdateCPContent updates the content in candlepin (name & GPG Key)

func (*UpdateRepository) UpdateContentOverrides

func (ur *UpdateRepository) UpdateContentOverrides() error

type UpdateRepositoryPayload

type UpdateRepositoryPayload struct {
	RepositoryConfigUUID string
}

type UpdateTemplateContent

type UpdateTemplateContent struct {
	// contains filtered or unexported fields
}

func (*UpdateTemplateContent) RunCandlepin

func (t *UpdateTemplateContent) RunCandlepin() error

RunCandlepin creates an environment for the template and content sets for each repository. Each content set's URL is the distribution URL created during RunPulp(). May promote or demote content from the environment, depending on if the repository is being added or removed from template. If not created for the given org previously, this will also create a product and pool.

func (*UpdateTemplateContent) RunPulp

func (t *UpdateTemplateContent) RunPulp() error

RunPulp creates (when a repository is added), updates (if the template date has changed), or removes (when a repository is removed) pulp distributions when a template is created or updated. Each distribution is under a path that is based on the template uuid. It serves the latest snapshot content up to the date set on the template.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL