If return status=0 and there is error_message, then its
a warning message from gateway, add it to output string
for plain text output.
It is already there for JSON output.
Fixes: https://tracker.ceph.com/issues/76595
Signed-off-by: Vallari Agrawal <vallari.agrawal@ibm.com>
self.prefix, exc_info=True)
out = message if message else self._output_formatter.format_output(ret, self._model)
+ wrn_msg = ret.get('error_message', '')
+ if wrn_msg:
+ out += f"\nWarning: {wrn_msg}"
elif out_format == 'json':
out = json.dumps(ret, indent=4)