Releases: Spirent/py-stcrestclient
stcrestclient-1.9.3
Address an issue where a password parameter to a TestCenter command was printed in clear text if debug_print
is enabled.
stcrestclient-1.9.2
Added new examples of REST Bulk API and an example of an enhancement to GetObjectsCommand
adding a PropertyList
parameter which is more suitable in large scale scenarios. The enhancement to GetObjectsCommand
is available in Spirent TestCenter version 5.51.
stcrestclient-1.9.1
Addresses an issue with downloading some files via the stchttp.download() API when running the client with the STC REST server on Windows.
stcrestclient-1.9.0
Add support for bulk operation APIs. Bulk operations are supported in Spirent TestCenter version 5.12 or later. The has_bulk_ops
API call is available on stchttp.StcHttp
to check if the bulk APIs are available.
Bulk API examples are available in the examples
directory.
stcrestclient-1.7.3
- Convert responses to str in python3
- Check for python2.7 or later
- Specify optional download location
- Update help and README
- Allow user to run tccsh and stcinfo as commands
stcrestclient-1.6.0
- Adapter
new_session()
takesexisting_session
argument and recognizesEXISTING_SESSION
environment variable to determine behavior when session already exists. - Adapter
perform()
recognizes special commands whether or not they have "command" suffix. - Does not try to use port 8888 on connection failure, which produces confusing error message.
- Provides additional examples passing parameters as kwargs.
stcrestclient-1.5.4
In tccsh, parameters for stc_create
, stc_config
, and stc_perform
can have value lists. These are specified as: param="value1 value2 value3"
. It was not previously possible to specify a parameter with a list of values.
The create()
, createx()
, config()
, and perform()
methods of StcHttp can optionally take parameters as kwargs. This allows parameters to be passed as items in a dictionary, as keyword arguments, or both.
stcrestclient-1.5.3
Check that session has ended
When ending a session, check that the session has ended before returning from the call. This fixes an error that sometimes happened when starting a new session immediately after ending a session with the same user and name.
Automatic file upload in automation wrapper
The automation wrapper now automatically uploads files for additional automation APIs that take an input file argument, if that argument is specified.
stchttp.perform() kwargs params
stchttp.perform() now takes optional parameters, following the command, as a dictionary or kwargs.
stcrestclient-1.5.0
Perform LoadFromDatabase uploads file
The StcHttp code has been modified so that when calling StcHttp.perform()
with "LoadFromDatabase" or "LoadFromXml", the indicated file is automatically uploaded to the server before executing the command. For example:
stc.perform('loadfromdatabase', DatabaseConnectionString='/tmp/sample_4.5x.tcc')
Uploads the file /tmp/sample4.5x.tcc
, and then performs LoadFromDatabaseCommand on the file "sample_4.5x.tcc"
New adapter method: new_session()
The adapter, stcpythonrest.py, now has a new_session() public method that takes an optional kill_session
boolean parameter. This method also returns the StcHttp object in case additional REST-API-specific functionality is needed (e.g. list sessions, end session).
Help search functionality
The help command has been updated to accept optional search arguments to be used when list
is the help topic. For example, when using tccsh, the command: stc_help list commands wait*
will list all the commands that begin with "wait". Also, stchttp call equivalent is as follows:
stc = stcrestclient.stchttp.StcHttp(...)
stc.help('list', ['commands', 'wait*'])
The update, version 1.5.0, is available from PyPI, so you can install/upgrade your stcrestclient installation with the command:
sudo pip install stcrestclient -U