DNAC¶
The following services are supported by the REST connector for DNAC.
connect¶
API to connect to the device.
The DNAC REST implementation supports specifying the port to connect to and allows to specify the username and password in the testbed YAML file.
# Example
# -------
#
# pyATS testbed yaml example for defining a REST connection
testbed:
name: myTestbed
devices:
dnac:
custom:
abstraction:
order: [os]
connections:
rest:
# Rest connector class
class: rest.connector.Rest
ip: 1.2.3.4
port: 8080
verify: False
credentials:
rest:
username: admin
password: admin
If no port is specified, the default of 443
is used. If verify is provided
and is False, it wont verify the SSL certificate.
Argument |
Description |
Default |
---|---|---|
|
Maximum time it can take to connect to the device. (optional) |
30 |
get¶
API to send GET command to the device.
Argument |
Description |
Default |
---|---|---|
|
API url string (required) |
|
|
timeout in seconds (optional) |
30 |
url = '/dna/intent/api/v1/interface'
output = device.rest.get(url)
Section author: Jean-Benoit Aubin <jeaubin@cisco.com>