mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
cli_command module (#42916)
* Create cli_command module to do direct cliconf calls * Update edgeos cliconf signature to match. * cli_command is cli-only * Add tests
This commit is contained in:
parent
086cb0233f
commit
ab39481c31
15 changed files with 480 additions and 6 deletions
|
@ -41,11 +41,11 @@ class Cliconf(CliconfBase):
|
|||
def get_config(self, source='running', format='text'):
|
||||
return self.send_command('show configuration commands')
|
||||
|
||||
def edit_config(self, command):
|
||||
for cmd in chain(['configure'], to_list(command)):
|
||||
def edit_config(self, candidate=None, commit=True, replace=False, comment=None):
|
||||
for cmd in chain(['configure'], to_list(candidate)):
|
||||
self.send_command(cmd)
|
||||
|
||||
def get(self, command, prompt=None, answer=None, sendonly=False):
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None):
|
||||
return self.send_command(command, prompt=prompt, answer=answer, sendonly=sendonly)
|
||||
|
||||
def commit(self, comment=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue