def get_cli_body_ssh_vrrp(command, response, module):
 if ('xml' in response[0]):
  body = []
 elif ('show run' in command):
  body = response
 else:
  try:
   response = response[0].replace((command + '\n\n'), '').strip()
   body = [json.loads(response)]
  except ValueError:
   module.fail_json(msg='Command does not support JSON output', command=command)
 return body

def get_cli_body_ssh_vrrp ( command , response , module ) : if ( 'xml' in response [ 0 ] ) : body = [ ] elif ( 'show run' in command ) : body = response else : try : response = response [ 0 ] . replace ( ( command + '\n\n' ) , '' ) . strip ( ) body = [ json . loads ( response ) ] except ValueError : module . fail_json ( msg = 'Command does not support JSON output' , command = command ) return body
get response for when transport=cli .