VIRL¶
The following services are supported by the REST connector for VIRL.
get¶
API to send GET command to the device.
Argument |
Description |
Default |
---|---|---|
|
REST API url |
Mandatory |
|
Expected result |
200 |
# Assuming the device is already connected
url = '/simengine/rest/list'
output = device.get(url)
post¶
API to send POST command to the device.
Argument |
Description |
Default |
---|---|---|
|
REST API url |
Mandatory |
|
JSON data of VIRL config |
Mandatory |
|
Expected result |
200 |
|
Maximum time it can take to disconnect to the device. |
30 seconds |
# Assuming the device is already connected
payload = """
{
(VIRL Config)
}
"""
url = '/simengine/rest/launch'
device.post(url, payload)
delete¶
API to send DELETE command to the device.
Argument |
Description |
Default |
---|---|---|
|
REST API url |
Mandatory |
|
Expected result |
200 |
|
Maximum time it can take to disconnect to the device. |
30 seconds |
# Assuming the device is already connected
url = '/simengine/rest/tracking/{tracking_id}'
output = device.delete(url)
Section author: Takashi Higashimura <tahigash@cisco.com>