Set Active Adapter

This API is a configuration API which influences all emulations. When more than one Adapter is present in th system, the active Adapter must be set. The active Adapter is the Adapter on which the emulation will be executed.

Only IPV4 is supported.

  • IP: The active Adapter IP
  • Reverse Direction Flag: When the packet direction cannot be determined from the packet header, for example when running emulations with "Default Flow" where no IP Range is defined, Network Virtualization cannot determine if the packet originated in the Client or the Server machine.
    When the Reverse Direction is false (default) the packets are treated as if the NV Driver is installed on the Client; all packets arrive from the Server Endpoint and all packets exit to the Server Endpoint.
    When Reverse Direction is true, the NV Driver is considered as if installed on the Server machine and all packets arrive from and exit to the Client.
    This setting is relevant when using Default Flow.

Request

JSON

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

Content-Type: application/json

Accept: application/json

Authorization: See Web Services Authentication.

Body
{
    "ip":"192.168.0.101","reverseDirection":true
}

XML

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

Content-Type: application/xml

Accept: application/xml

Authorization: See Web Services Authentication.

Body
<activeAdapter>
    <ip>192.168.0.101</ip>
    <reverseDirection>false</reverseDirection>
</activeAdapter>

 

Response

JSON

HTTP Response Code 204 - No content
HTTP Headers  
HTTP Body