Skip to content

Commit

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

This reverts commit 920bb87.
  • Loading branch information
lguohan committed Aug 17, 2021
1 parent dbcc6fd commit 0a145e8
Show file tree
Hide file tree
Showing 24 changed files with 23 additions and 4,077 deletions.
8 changes: 6 additions & 2 deletions generic_config_updater/generic_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
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 @@ -17,6 +16,11 @@ 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 @@ -32,7 +36,7 @@ def __init__(self,
changeapplier=None,
config_wrapper=None,
patch_wrapper=None):
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter(config_wrapper, patch_wrapper)
self.patchsorter = patchsorter if patchsorter is not None else PatchSorter()
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 0a145e8

Please sign in to comment.