diff --git a/pubtools/pulplib/_impl/client/client.py b/pubtools/pulplib/_impl/client/client.py index 33affacd..2c476661 100644 --- a/pubtools/pulplib/_impl/client/client.py +++ b/pubtools/pulplib/_impl/client/client.py @@ -775,7 +775,7 @@ def _do_associate(self, src_repo_id, dest_repo_id, criteria=None, raw_options=No self._do_request, method="POST", url=url, json=body ) - def _do_unassociate(self, repo_id, criteria=None): + def _do_unassociate(self, repo_id, criteria=None, limit=None, skip=None): url = os.path.join( self._url, "pulp/api/v2/repositories/%s/actions/unassociate/" % repo_id ) @@ -800,6 +800,12 @@ def _do_unassociate(self, repo_id, criteria=None): else: body["criteria"]["filters"] = {"unit": pulp_search.filters} + if limit: + body["criteria"]["limit"] = limit + + if skip: + body["criteria"]["skip"] = skip + LOG.debug("Submitting %s unassociate: %s", url, body) return self._task_executor.submit( diff --git a/pubtools/pulplib/_impl/model/repository/base.py b/pubtools/pulplib/_impl/model/repository/base.py index 508a0ace..9aba9246 100644 --- a/pubtools/pulplib/_impl/model/repository/base.py +++ b/pubtools/pulplib/_impl/model/repository/base.py @@ -696,7 +696,14 @@ def remove_content(self, criteria=None, **kwargs): Matcher.in_(type_ids), # Criteria.with_field_in is deprecated ) - return f_proxy(self._client._do_unassociate(self.id, criteria=criteria)) + return f_proxy( + self._client._do_unassociate( + self.id, + criteria=criteria, + limit=kwargs.get("limit"), + skip=kwargs.get("skip"), + ) + ) @classmethod def from_data(cls, data):