Skip to content

Commit

Permalink
Revert "Revert "[config][generic-update] Implementing patch sorting (s…
Browse files Browse the repository at this point in the history
…onic-net#1599)""

This reverts commit e6122e9.
  • Loading branch information
vivekrnv committed Aug 19, 2021
1 parent a5cf16e commit 903a2f0
Show file tree
Hide file tree
Showing 24 changed files with 4,077 additions and 23 deletions.
8 changes: 2 additions & 6 deletions generic_config_updater/generic_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from enum import Enum
from .gu_common import GenericConfigUpdaterError, ConfigWrapper, \
DryRunConfigWrapper, PatchWrapper
from .patch_sorter import PatchSorter

CHECKPOINTS_DIR = "/etc/sonic/checkpoints"
CHECKPOINT_EXT = ".cp.json"
Expand All @@ -16,11 +17,6 @@ def release_lock(self):
# TODO: Implement ConfigLock
pass

class PatchSorter:
def sort(self, patch):
# TODO: Implement patch sorter
raise NotImplementedError("PatchSorter.sort(patch) is not implemented yet")

class ChangeApplier:
def apply(self, change):
# TODO: Implement change applier
Expand All @@ -36,7 +32,7 @@ def __init__(self,
changeapplier=None,
config_wrapper=None,
patch_wrapper=None):
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter()
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter(config_wrapper, patch_wrapper)
self.changeapplier = changeapplier if changeapplier is not None else ChangeApplier()
self.config_wrapper = config_wrapper if config_wrapper is not None else ConfigWrapper()
self.patch_wrapper = patch_wrapper if patch_wrapper is not None else PatchWrapper()
Expand Down
Loading

0 comments on commit 903a2f0

Please sign in to comment.