Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Merge pull request #68 from goosemania/issue4449
Browse files Browse the repository at this point in the history
Sync in additive mode by default
  • Loading branch information
goosemania committed Feb 27, 2019
2 parents ea03cd9 + 1269464 commit 6e31a52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/plugin-writer/concepts/subclassing/viewsets.rst
Expand Up @@ -76,7 +76,7 @@ this is accomplished.
# This is how non-crud validation is accomplished
serializer.is_valid(raise_exception=True)
repository = serializer.validated_data.get('repository')
mirror = serializer.validated_data.get('mirror', True)
mirror = serializer.validated_data.get('mirror', False)
# This is how tasks are kicked off.
result = enqueue_with_reservation(
Expand Down
6 changes: 3 additions & 3 deletions pulpcore/plugin/stages/declarative_version.py
Expand Up @@ -16,7 +16,7 @@

class DeclarativeVersion:

def __init__(self, first_stage, repository, mirror=True, remove_duplicates=None):
def __init__(self, first_stage, repository, mirror=False, remove_duplicates=None):
"""
A pipeline that creates a new :class:`~pulpcore.plugin.models.RepositoryVersion` from a
stream of :class:`~pulpcore.plugin.stages.DeclarativeContent` objects.
Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(self, first_stage, repository, mirror=True, remove_duplicates=None)
11. Associate all content units with the new
:class:`~pulpcore.plugin.models.RepositoryVersion` with
:class:`~pulpcore.plugin.stages.ContentAssociation`
12. Unassociate any content units not declared in the stream (only when sync_mode='mirror')
12. Unassociate any content units not declared in the stream (only when mirror=True)
with :class:`~pulpcore.plugin.stages.ContentUnassociation`
To do this, the plugin writer should subclass the
Expand Down Expand Up @@ -108,7 +108,7 @@ def __init__(self, first_stage, repository, mirror=True, remove_duplicates=None)
'False' (additive) only adds content units observed in the
:class:`~pulpcore.plugin.stages.DeclarativeVersion stream`, and does not remove any
pre-existing units in the :class:`~pulpcore.plugin.models.RepositoryVersion`.
'True' is the default.
'False' is the default.
remove_duplicates (list): A list of dictionaries that indicate objects which are
considered duplicates within a single repository version. These objects will be
removed from the new version, making room for the new objects passing through the
Expand Down

0 comments on commit 6e31a52

Please sign in to comment.