Fix junos cliconf commit api (#33458)

*  In order to maintain a single api call across
   netconf and cli transport from module code change
   signature of commit api to accept genric args.
*  Fix doc string
This commit is contained in:
Ganesh Nalawade 2017-12-01 19:11:54 +05:30 committed by GitHub
parent 5b5d767c0b
commit f5a2e26ffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,12 @@ class Cliconf(CliconfBase):
def get(self, command, prompt=None, answer=None, sendonly=False):
return self.send_command(command, prompt=prompt, answer=answer, sendonly=sendonly)
def commit(self, comment=None):
def commit(self, *args, **kwargs):
"""Execute commit command on remote device.
:kwargs:
comment: Optional commit description.
"""
comment = kwargs.get('comment', None)
command = b'commit'
if comment:
command += b' comment {0}'.format(comment)