mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Add support for commit label in iosxr_config (#42931)
* Add support for commit label in iosxr_config * sanity pep8 etc fixes
This commit is contained in:
parent
4f1746ee1d
commit
bf544c2200
4 changed files with 130 additions and 8 deletions
|
@ -89,9 +89,13 @@ class Cliconf(CliconfBase):
|
|||
def get(self, command=None, prompt=None, answer=None, sendonly=False, newline=True):
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline)
|
||||
|
||||
def commit(self, comment=None):
|
||||
if comment:
|
||||
def commit(self, comment=None, label=None):
|
||||
if comment and label:
|
||||
command = 'commit label {0} comment {1}'.format(label, comment)
|
||||
elif comment:
|
||||
command = 'commit comment {0}'.format(comment)
|
||||
elif label:
|
||||
command = 'commit label {0}'.format(label)
|
||||
else:
|
||||
command = 'commit'
|
||||
self.send_command(command)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue