From 4fdb0515043672147efe506b3ff289cef89d2be3 Mon Sep 17 00:00:00 2001 From: Nathan Gillett Date: Thu, 5 Dec 2019 08:52:10 -0500 Subject: [PATCH] Rename repository_id variable to repo_id --- pubtools/pulplib/_impl/client/client.py | 6 +++--- pubtools/pulplib/_impl/model/unit/modulemd_defaults.py | 2 +- tests/client/test_client.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pubtools/pulplib/_impl/client/client.py b/pubtools/pulplib/_impl/client/client.py index a963304d..b5ce9244 100644 --- a/pubtools/pulplib/_impl/client/client.py +++ b/pubtools/pulplib/_impl/client/client.py @@ -203,11 +203,11 @@ def search_repository(self, criteria=None): Repository, "repositories", criteria=criteria, search_options=search_options ) - def search_repository_content(self, repository_id, type_ids, criteria=None): + def search_repository_content(self, repo_id, type_ids, criteria=None): """Search the given repository for content matching the given criteria. Args: - repository_id (str) + repo_id (str) The ID of the repository to search. type_ids (str, list, tuple) A list of content types to search. @@ -225,7 +225,7 @@ def search_repository_content(self, repository_id, type_ids, criteria=None): .. versionadded:: 2.4.0 """ - resource_type = "repositories/%s" % repository_id + resource_type = "repositories/%s" % repo_id search_options = {"type_ids": validate_type_ids(type_ids)} return list( self._search( diff --git a/pubtools/pulplib/_impl/model/unit/modulemd_defaults.py b/pubtools/pulplib/_impl/model/unit/modulemd_defaults.py index 2d109ee8..912750f0 100644 --- a/pubtools/pulplib/_impl/model/unit/modulemd_defaults.py +++ b/pubtools/pulplib/_impl/model/unit/modulemd_defaults.py @@ -18,7 +18,7 @@ class ModulemdDefaultsUnit(Unit): stream = pulp_attrib(type=str, pulp_field="stream") """The stream of this modulemd defaults unit""" - repository_id = pulp_attrib(type=str, pulp_field="repo_id") + 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") diff --git a/tests/client/test_client.py b/tests/client/test_client.py index 712b1732..36b18980 100644 --- a/tests/client/test_client.py +++ b/tests/client/test_client.py @@ -82,7 +82,7 @@ def test_can_search_repository_content(client, requests_mocker): ModulemdDefaultsUnit( content_type_id="modulemd_defaults", name="mdd", - repository_id="mdd-repo", + repo_id="mdd-repo", stream="1.0", profiles={"p1": ["something"]}, )