RSPImageTagCollection¶
- class controller.models.domain.rsptag.RSPImageTagCollection(tags)¶
Bases:
object
Hold and perform operations on a set of
RSPImageTag
objects.- Parameters:
tags (
Iterable
[RSPImageTag
]) –RSPImageTag
objects to store.
Methods Summary
all_tags
()Iterate over all tags.
filter
(policy, age_basis)Apply a filter policy and return the remaining tags.
from_tag_names
(tag_names, aliases[, cycle])Create a collection from tag strings.
subset
(*[, releases, weeklies, dailies, include])Return a subset of the tag collection.
tag_for_tag_name
(tag_name)Look up a tag by tag name.
Methods Documentation
- all_tags()¶
Iterate over all tags.
- Yields:
RSPImageTag – Each tag in sorted order.
- Return type:
- filter(policy, age_basis)¶
Apply a filter policy and return the remaining tags.
- Parameters:
policy (
RSPImageFilterPolicy
) – Policy governing tag filtering.age_basis (
datetime
) – Timestamp to use as basis for image age calculation.
- Returns:
Tags remaining after policy application.
- Return type:
- classmethod from_tag_names(tag_names, aliases, cycle=None)¶
Create a collection from tag strings.
- Parameters:
- Returns:
The resulting collection of tags.
- Return type:
- subset(*, releases=0, weeklies=0, dailies=0, include=None)¶
Return a subset of the tag collection.
- Parameters:
- Returns:
The desired subset.
- Return type: