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:
Nathaniel Case 2018-08-06 10:41:57 -04:00 committed by GitHub
parent 086cb0233f
commit ab39481c31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 480 additions and 6 deletions

View file

@ -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):