Cisco Dynamic Fabric Automation API
The Cisco Dynamic Fabric Automation (DFA) APIs for third party applications enables you to programmatically control Cisco Dynamic Fabric Automation (DFA). The DFA API supports POAP (Power On Auto Provisioning), Auto Config, DHCP and Cable plan features.
POAP allows devices to boot up with temporary IP address (assigned by DHCP server), to download the POAP boot-up script (also assigned by DHCP server) which will further download the required kick-start and system image, and the device configuration file from the specific TFTP server indicated in the boot-up script.
In the Cisco Dynamic Fabric Automation architecture, the virtual machine (VM) facing interface on leaf switches is automatically configured and de-configured by the auto config. It detects the server/VM boot-up, retrieves pre-defined network parameters from the asset database, and applies the generated configuration. When the VM is moved or shutdown, the auto config also updates/removes the dynamic configuration.
Cable plan provides a Netmap of port-to-port cable connectivity data that can be imported into the switches of the DFA. The XML cable plan acts as a lookup table, and if a port is not connected to its corresponding destination port as per the plan, the switch should flag an error and notify the customers.
Note All the REST API operations can also be performed using the DCNM GUI as DCNM uses these REST APIs to render the GUI. Therefore it is not mandatory to programmatically controlDFA via third party applications since DFA can be controlled via the DCNM GUI. However if it is necessary to augment or replace DCNM GUIs with customized controls, the RESTAPIs provide an open interface for third party applications to control DFA programmaticallly.
In a DFA datacenter, Cisco DCNM will be the central point of management for the fabric and for the network auto-configuration. PoAP templates are used to auto-configure the spine and leaf network devices and configuration profiles are used to auto-configure the organizations, networks and services.
DCNM works as the network controller in conjunction with any instances of compute/storage orchestrators and service controllers to provide an open and extensible integrated virtual and physical data center. Organizations and networks can be created directly using the Cisco DCNM GUIs or through the compute/storage orchestrators. In both cases the external APIs discussed in this document are used to retrieve information and create/retrieve/update/delete configuration profile instances into the network Asset Database (LDAP). The leaf devices in turn fetch configuration from the Asset Database and self-configure themselves. Service controllers like PNSC can also get organization/network information from DCNM through the APIs, as well as update the network configuration profiles for services integration.
The general workflow is as follows:
- Create Organizations and Partitions
- As part of this, edge services may be deployed
- Create Segments
- As part of this, segment services may be deployed
- Deploy application workload
Throughout this process the network and network services can be automated using DFA. For an animated description of the DFA architecture and workflow refer to http://www.youtube.com/watch?v=MNnv2Y_k6EY.
Note You can also use your own REST based third party orchestrators or applications to interface with DCNM to control DFA..
DCNM will provide REST API, and the REST approach emphasizes on using the resource name as part of the URL. In this release, the response of the REST API will be encoded in JSON format (see http://www.json.org for validation).
The query parameters for the HTTP GET will be appended to the URL after the symbol “?”; the input for the HTTP POST/PUT/DELETE will be specified in the payload with the URL-encoded. REST APIs support both HTTP and HTTPS.
This section contains the high level description for the REST API, during implementation the REST APIs are subject to change.
DCNM REST API supports “application/json” for the Content-Type.
The following parameter types are mentioned in this document:
- A - Array
- S - String
- O – Object
The DFA REST APIs control the following categories of functionalities:
- Cable Plan
For detailed information about the Cisco DFA REST APIs, see the Cisco DCNM 7.1.x REST API Guide.
The Authentication REST APIs can be used by an external application to authenticate itself to the DCNM in order to programmatically control the DFA cluster. After calling logon to get the token, all the subsequent REST API requests need to set the DCNM-Token field with the token in the HTTP header.
The Authentication REST APIs are mentioned in.
Table 1-1 Authentication REST API
Resource at URL https://dcnm-ip/rest/
Get DCNM Version