mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-22 17:09:08 -07:00
Expose newline
option to cli_command module (#55451)
* Add newline to all cliconf plugins * Expose newline in cli_command * Also hook up to anything using transform_commands directly
This commit is contained in:
parent
8ff27c4e0c
commit
38890ddcaf
27 changed files with 67 additions and 53 deletions
|
@ -116,14 +116,13 @@ class Cliconf(CliconfBase):
|
|||
resp['request'] = requests
|
||||
return resp
|
||||
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, check_all=False):
|
||||
def get(self, command=None, prompt=None, answer=None, sendonly=False, output=None, newline=True, check_all=False):
|
||||
if not command:
|
||||
raise ValueError('must provide value of command to execute')
|
||||
|
||||
if output:
|
||||
raise ValueError("'output' value %s is not supported for get" % output)
|
||||
|
||||
return self.send_command(command, prompt=prompt, answer=answer, sendonly=sendonly, check_all=check_all)
|
||||
return self.send_command(command=command, prompt=prompt, answer=answer, sendonly=sendonly, newline=newline, check_all=check_all)
|
||||
|
||||
def commit(self, comment=None):
|
||||
if comment:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue