mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Remove abort_config and commit_config
Also move unimplemented command methods to CliBase, where they can be overridden as needed
This commit is contained in:
@@ -231,6 +231,8 @@ class CliBase(object):
|
||||
def authorize(self, params, **kwargs):
|
||||
pass
|
||||
|
||||
### Command methods ###
|
||||
|
||||
def execute(self, commands, **kwargs):
|
||||
try:
|
||||
return self.shell.send(commands)
|
||||
@@ -240,3 +242,14 @@ class CliBase(object):
|
||||
|
||||
def run_commands(self, commands, **kwargs):
|
||||
return self.execute(to_list(commands))
|
||||
|
||||
### Config methods ###
|
||||
|
||||
def load_config(self, commands, **kwargs):
|
||||
raise NotImplementedError
|
||||
|
||||
def replace_config(self, commands, **kwargs):
|
||||
raise NotImplementedError
|
||||
|
||||
def save_config(self):
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user