Skip to content

Commit

Permalink
Revert edit_config signature updates in #653 (#640)
Browse files Browse the repository at this point in the history
* Revert edit_config signature updates in #653

Signed-off-by: NilashishC <[email protected]>

* Add changelog

Signed-off-by: NilashishC <[email protected]>

* Revert RMBase changes

Signed-off-by: NilashishC <[email protected]>

---------

Signed-off-by: NilashishC <[email protected]>
  • Loading branch information
NilashishC authored May 27, 2024
1 parent 569f662 commit d28c8fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/bug_653.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- The v6.1.2 release introduced a change in cliconfbase's edit_config() signature which broke many platform cliconfs. This patch would revert that change.
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def compare(self, parsers, want=None, have=None):
else:
self.addcmd(have, parser, True)

def run_commands(self, err_responses=None):
def run_commands(self):
"""Send commands to the device"""
if self.commands and self.state in self.ACTION_STATES:
if not self._module.check_mode:
self._connection.edit_config(candidate=self.commands, err_responses=err_responses)
self._connection.edit_config(candidate=self.commands)
self.changed = True
3 changes: 0 additions & 3 deletions plugins/plugin_utils/cliconf_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ def edit_config(
replace=None,
diff=False,
comment=None,
err_responses=None,
):
"""Loads the candidate configuration into the network device
Expand All @@ -235,8 +234,6 @@ def edit_config(
the file in this case should be present on the remote host in the mentioned path as a
prerequisite.
:param comment: Commit comment provided it is supported by remote host.
:param err_responses: A list of error regexes that will be used to evaluate the responses received
from executing the candidate command(s).
:return: Returns a json string with contains configuration applied on remote host, the returned
response on executing configuration commands and platform relevant data.
{
Expand Down

0 comments on commit d28c8fc

Please sign in to comment.