cisco-ce/pyxows

Support for Multi-line commands?

DJF3 opened this issue · 3 comments

DJF3 commented

Team,

Does the library support multiline commands?
Example:

These have, besides "arguments", a "body" field for more data. Example from the doc links above:

POST https://webexapis.com/v1/xapi/command/UserInterface.Extensions.Panel.Save:

{ "deviceId": "Y2lzY29zcGFya.....S9mb29iYXIv", "arguments": { "PanelId": "value" }, "body": "Raw data here..." };

xim commented

Yes. You can pass the parameter as body in this library as well.

On the command line you can do the same:

clixows -u username -p password endpoint.example.com command Macros Macro Save Name=foo body=

DJF3 commented

Would that be something like this?

print('COMMAND:', await client.xCommand(['Macros', 'Macro', 'Save'], Name="My Test Macro", 
 Overwrite="True", Body="import xapi from 'xapi';\n console.log('does this work?');"))
xim commented

Lower case b in body, and I think you're home free