Skip to content

Commit

Permalink
Fix function definition
Browse files Browse the repository at this point in the history
  • Loading branch information
sabakram committed Sep 21, 2023
1 parent 88eb058 commit 990973f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generic_config_updater/generic_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def replace(self, target_config):
self.logger.log_notice("Getting current config db.")
old_config = self.config_wrapper.get_config_db_as_json()

old_config = switchport_mode_remove(old_config)
target_config = switchport_mode_remove(target_config)
old_config = self.switchport_mode_remove(old_config)
target_config = self.switchport_mode_remove(target_config)

self.logger.log_notice("Generating patch between target config and current config db.")
patch = self.patch_wrapper.generate_patch(old_config, target_config)
Expand All @@ -125,6 +125,7 @@ def replace(self, target_config):

self.logger.log_notice("Config replacement completed.")

@staticmethod
def switchport_mode_remove(config):
if 'PORT' in config:
for port, port_data in config['PORT'].items():
Expand Down

0 comments on commit 990973f

Please sign in to comment.