Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- client.search_content method
- Introduced 'population_sources' and 'ubi_population' attributes for yum repository

### Fixed
- 'stream' and 'profiles' are now optional on modulemd_defaults units, rather
than incorrectly mandatory (leading to schema validation errors)

## [2.5.0] - 2020-02-25

### Added
Expand Down
11 changes: 4 additions & 7 deletions pubtools/pulplib/_impl/model/unit/modulemd_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@ class ModulemdDefaultsUnit(Unit):
name = pulp_attrib(type=str, pulp_field="name")
"""The name of this modulemd defaults unit"""

stream = pulp_attrib(type=str, pulp_field="stream")
"""The stream of this modulemd defaults unit"""

repo_id = pulp_attrib(type=str, pulp_field="repo_id")
"""The repository ID bound to this modulemd defaults unit"""

profiles = pulp_attrib(pulp_field="profiles")
"""The profiles of this modulemd defaults unit.
stream = pulp_attrib(type=str, pulp_field="stream", default=None)
"""The stream of this modulemd defaults unit"""

The type for this attribute is omitted to allow for either dict or None.
"""
profiles = pulp_attrib(type=dict, pulp_field="profiles", default=None)
"""The profiles of this modulemd defaults unit."""

repository_memberships = pulp_attrib(
default=None,
Expand Down
1 change: 0 additions & 1 deletion pubtools/pulplib/_impl/schema/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ definitions:
required:
- _content_type_id
- name
- stream
- repo_id

# Schema for any unknown type of unit
Expand Down
1 change: 0 additions & 1 deletion tests/repository/test_search_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ def test_modulemd_defaults_content(client, requests_mocker):
"metadata": {
"_content_type_id": "modulemd_defaults",
"name": "mdd",
"stream": "1.0",
"repo_id": "some-repo",
"profiles": {"p1": ["something"]},
}
Expand Down