Set Configuration

This API sets the Network Virtualization general configuration. The configuration can be executed only if an emulation is not currently running.

Parameters:

PacketListMaxSizeMB: the maximum size of the packet list (comprises all devices in a test).

MinNumOfPakectListSpace: a positive integer

packetListServerClientRatio: the default value is ’0’, therefore all packet lists are allocated on the client side.

For example:

The required available disk space (the threshold) is equal to the calculation of these values:

'MinNumOfPaketListSpace' * 'PacketListMaxSizeMB'

If MinNumOfPakectListSpace=3, the packet list maximum size is 100MB, and there are more than two results folders, the Cleanup Threshold would be activated if the available disk space were less than 300 MB.

The ratio between server's and client's packet lists can be configured via the configuration API and user's configuration file. The value should be between 0-100, representing the percentage of the packet list allocated for the server.

Request

JSON

URL http://ip:port/shunra/api/configuration
HTTP Method PUT
HTTP Headers

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body
{
    "isPacketListCaptureCyclic": true,
    "packetListMaxSizeMB": 100,
    "minNumOfPacketListSpace": 3,
    "captureBytesPerPacket": 1500,
    "packetListServerClientRatio": 0
}

XML

URL http://ip:port/shunra/api/configuration
HTTP Method PUT
HTTP Headers

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body
<configurationSettings>
    <isPacketListCaptureCyclic>true</isPacketListCaptureCyclic>
    <packetListMaxSizeMB>100</packetListMaxSizeMB>
    <minNumOfPacketListSpace>3</minNumOfPacketListSpace>
    <captureBytesPerPacket>1500</captureBytesPerPacket>
    <packetListServerClientRatio>0</packetListServerClientRatio>
</configurationSettings>

Response

HTTP Response Code 204 - No content
HTTP Headers  
HTTP Body