Table Of Contents
POAP Examples
How to use the DFA REST APIs to Control POAP
Secure Logon
Update a POAP scope
Create a config/image server
Get a group
List POAP templates
Generate Configuration with the template
Create POAP Definition
POAP Examples
How to use the DFA REST APIs to Control POAP
You can use any programming language that supports Web services to create a Web services client that invokes the DCNM POAP Web services API. This section just lists out the example HTTP request and response for reference.
The examples will show the following steps to configure POAP:
Step 1
Call logon to get a Dcnm-Token
Step 2
Update a POAP scope
Step 3
Create a config/image server
Step 4
Get a group
Step 5
List POAP templates
Step 6
Generate config with a template
Step 7
Create POAP definition
Step 8
Logout
Secure Logon
The logon API takes "username:password" with Basic base64 encoded in HTTP Authorization header, like "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==". It will return the Token in the payload, and this token will be used as Dcnm-Token in the subsequent API.
http://10.77.247.111/rest/logon
POST /rest/logon
Request
Host: 10.77.247.111
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
Authorization: Basic YWRtaW46YWRtaW4xMjM=
Content-Length: 28
Cookie: JSESSIONID=4C975316B01A44215861475E1B5F9328
Pragma: no-cache
Cache-Control: no-cache
{"expirationTime": 1000000}
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"Token" : " NUVyu5Y0YHDv0tT6xFuIPd+Cu9OA1XCQ "
}
Update a POAP scope
http://10.77.247.111/rest/poap/dhcp/scopes/scope1
PUT /rest/poap/dhcp/scopes/scope1
Request
Host: 10.77.247.111
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
Dcnm-Token: NUVyu5Y0YHDv0tT6xFuIPd+Cu9OA1XCQ
Content-Length: 28
Cookie: JSESSIONID=4C975316B01A44215861475E1B5F9328
Pragma: no-cache
Cache-Control: no-cache
{
"scopeName":"scope1",
"subnet":"4.4.4.0/24",
"ipRange":"4.4.4.6-4.4.4.8",
"maxLeaseTime":"3600",
"bootFilename":"poap_dcnm.py",
"domainNameServers":"2.2.2.2",
"routers":"2.2.2.2",
"tftpServerName":"100.100.100.140"
}
3.2.2 Response
HTTP/1.1 202 Accepted
Create a config/image server
http://10.77.247.111/rest/poap/servers
POST /rest/poap/servers
Request
Host: 10.77.247.111
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
Dcnm-Token: NUVyu5Y0YHDv0tT6xFuIPd+Cu9OA1XCQ
Content-Length: 179
Cookie: JSESSIONID=4C975316B01A44215861475E1B5F9328
Pragma: no-cache
Cache-Control: no-cache
{
"id":0,
"serverName":"TEST_SERVER",
"url":"scp://10.77.247.151/var/lib/tftpboot/dcnm",
"userName":"root",
"password":"admin",
"lastUpdateTime":1379358179262
}
Response
202 Accepted
Content-Type: application/json
{
"id":0,
"serverName":"TEST_SERVER",
"lastUpdateTime":0}
}
Get a group
This is a SOAP API call, will need to get the "memDbId" for the group which POAP devices belong to. In Create POAP Definition, this "memDbId" will be used as "lanGroup" in the request.
http:// 10.77.247.111:80/DbAdminWSService/DbAdminWS
3.4.1 Request:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns0:token xmlns:ns0="http://dcnm/headers">NUVyu5Y0YHB5PfWoiQqNY64FVVw6yv2l</ns0:token>
<ns0:session xmlns:ns0="http://dcnm/headers">0</ns0:session>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tns:getGroupNavigation xmlns:tns="http://ep.san.jaxws.dcbu.cisco.com/"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<tns:getGroupNavigationResponse xmlns:tns="http://ep.san.jaxws.dcbu.cisco.com/">
<result><![CDATA[<groupList name='Data Center'>
<group isBranch="true" name="Default_LAN" state ="unchecked" selectable= "true" memDbId="2" type="1" ></group>
<group isBranch="true" name="Default_SAN" state ="unchecked" selectable= "false" memDbId="1" type="2" >
</group></groupList>]]></result>
</tns:getGroupNavigationResponse>
</env:Body>
</env:Envelope>
List POAP templates
This is a SOAP API call to get the template, in this example, it will get the Base_Leaf_Template that will later be used to generate the configuration.
http://10.77.247.139:80/ConfigTemplateWSService/ConfigTemplateWS
Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns0:token xmlns:ns0="http://dcnm/headers">NUVyu5Y0YHB5PfWoiQqNY64FVVw6yv2l</ns0:token>
<ns0:session xmlns:ns0="http://dcnm/headers">0</ns0:session>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tns:getAllPublishedTemplates xmlns:tns="http://ep.san.jaxws.dcbu.cisco.com/"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<tns:getAllPublishedTemplatesResponse xmlns:tns="http://ep.san.jaxws.dcbu.cisco.com/">
<result>
<item>
<assignedInstanceClassId>0</assignedInstanceClassId>
<instanceClassId>27</instanceClassId>
<instanceName>com.cisco.dcbu.dcm.model.cfgtemplate.ConfigTemplate:name=Leaf_Template:type=false</instanceName>
<description>This file specifies the template configuration for leaf switch with annotations</description>
<fileName>leaf_annotations.template</fileName>
<name>Leaf_Template</name>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The host name of the switch"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>UseDNSReverseLookup</key>
<value>true</value>
</entry>
<entry>
<key>IsSwitchName</key>
<value>true</value>
</entry>
</annotations>
<name>SWITCH_NAME</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Vlan interfaces allocated to this VDC or device"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>ALLOC_INTERFACES</name>
<parameterType>string[]</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"DNS name of the XMPP server or XMPP domain name"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>DNS_HOST_NAME</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"IP Address for the XMPP DNS name or domain name"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>DNS_HOST_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Management IP address used by DCNM to monitor this device"</value>
</entry>
<entry>
<key>IsManagementIP</key>
<value>true</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>MGMT_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The prefix in integer format. e.g. 24"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>MGMT_PREFIX</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Default Gateway IP address"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>DEFAULT_GATEWAY</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"VLAN facing the server or VMs"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>CUSTOMER_FACING_VLAN_ID</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"IP address facing the server or VMs"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>CUSTOMER_FACING_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"IP subnet facing the server or VMs. The prefix in integer format. e.g. 24"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>CUSTOMER_FACING_PREFIX</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>FABRIC_FORWARDING_ID</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>ANYCAST_GATEWAY_MAC</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The role of the switch. e.g. leaf, spine"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>SWITCH_ROLE</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsTier</key>
<value>true</value>
</entry>
<entry>
<key>Description</key>
<value>"Tier number of the switch. Tier 1 is leaf, 2 is spine"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>TIER_NUMBER</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"List of VLANs allowed separated by comma"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>VLAN_LIST</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The comma separated list of fabric ports"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>IsFabricPort</key>
<value>true</value>
</entry>
</annotations>
<name>FABRIC_INTERFACES</name>
<parameterType>interfaceRange</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BGP_NEIGHBOR_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BGP_REMOTE_AS</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_GROUPS_SEP_BY_SPACE</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_SERVER</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_PASSWORD</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"True if the cable plan should be enabled"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>ENABLE_CABLE_PLAN</name>
<parameterType>boolean</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<published>true</published>
<supportedPlatforms>N7K,N6K</supportedPlatforms>
<templateType>POAP</templateType>
<timestamp>2013-09-30 08:04:08</timestamp>
<userDefined>false</userDefined>
</item>
<item>
<assignedInstanceClassId>0</assignedInstanceClassId>
<instanceClassId>31</instanceClassId>
<instanceName>com.cisco.dcbu.dcm.model.cfgtemplate.ConfigTemplate:name=Base_Leaf_Template:type=false</instanceName>
<description>This file specifies the template configuration for leaf switch</description>
<fileName>base_leaf.template</fileName>
<name>Base_Leaf_Template</name>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The host name of the switch"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>UseDNSReverseLookup</key>
<value>true</value>
</entry>
<entry>
<key>IsSwitchName</key>
<value>true</value>
</entry>
</annotations>
<name>SWITCH_NAME</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Management IP address used by DCNM to monitor this device"</value>
</entry>
<entry>
<key>IsVPCPeerLinkSrc</key>
<value>true</value>
</entry>
<entry>
<key>IsManagementIP</key>
<value>true</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>MGMT_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Management Prefix"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>MGMT_PREFIX</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Default Gateway IP address"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>DEFAULT_GATEWAY</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Plain text or 5 encrypted"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>ADMIN_PASSWORD</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The role of the switch. e.g. leaf, spine"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>IsSwitchRole</key>
<value>true</value>
</entry>
</annotations>
<defaultValue>leaf</defaultValue>
<name>SWITCH_ROLE</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The comma and dash separated list of fabric ports"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>IsFabricPort</key>
<value>true</value>
</entry>
</annotations>
<name>FABRIC_INTERFACES</name>
<parameterType>interfaceRange</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The comma and dash separated list of host ports"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>IsHostPort</key>
<value>true</value>
</entry>
</annotations>
<name>HOST_INTERFACES</name>
<parameterType>interfaceRange</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Backbone VLAN ID"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BACKBONE_VLAN</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Backbone IP address/prefix"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BACKBONE_IP</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Backbone IPv6 address/prefix"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BACKBONE_IPV6</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BGP_ROUTER_IP</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BGP_RR_IP</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"IP Address of the Auto-config LDAP Server"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>LDAP_SERVER_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"IP Address of the XMPP Server"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_SERVER_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"FQDN of the XMPP Server"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_SERVER</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Space separated XMPP Spine Group Names"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_GROUPS</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Password"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_PASSWORD</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"True if VPC should be configured"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>ENABLE_VPC</name>
<parameterType>boolean</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCDomainID</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_DOMAIN_ID</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkDst</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_DST</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkPortChannel</key>
<value>true</value>
</entry>
<entry>
<key>IsVPCPort</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_LINK_PORT_CHANNEL_NUMBER</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkPort</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_LINK_IF_NAMES</name>
<parameterType>interfaceRange</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations/>
<name>VPC_ARRAY</name>
<parameterType>structureArray</parameterType>
<parameterTypeStructure>true</parameterTypeStructure>
<structureParameters>
<entry>
<key>ID</key>
<value>
<annotations>
<entry>
<key>IsVPCPortChannel</key>
<value>true</value>
</entry>
<entry>
<key>IsVPCID</key>
<value>true</value>
</entry>
</annotations>
<name>ID</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</value>
</entry>
<entry>
<key>IF_NAME</key>
<value>
<annotations>
<entry>
<key>IsVPCPort</key>
<value>true</value>
</entry>
</annotations>
<name>IF_NAME</name>
<parameterType>interface</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</value>
</entry>
</structureParameters>
</parameters>
<published>true</published>
<supportedPlatforms>N7K,N6K</supportedPlatforms>
<templateType>POAP</templateType>
<timestamp>2013-09-30 08:04:08</timestamp>
<userDefined>false</userDefined>
</item>
<item>
<assignedInstanceClassId>0</assignedInstanceClassId>
<instanceClassId>36</instanceClassId>
<instanceName>com.cisco.dcbu.dcm.model.cfgtemplate.ConfigTemplate:name=Base_Spine_Template:type=false</instanceName>
<description>This file specifies the template configuration for spine switch</description>
<fileName>base_spine.template</fileName>
<name>Base_Spine_Template</name>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The host name of the switch"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>UseDNSReverseLookup</key>
<value>true</value>
</entry>
<entry>
<key>IsSwitchName</key>
<value>true</value>
</entry>
</annotations>
<name>SWITCH_NAME</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Management IP address used by DCNM to monitor this device"</value>
</entry>
<entry>
<key>IsManagementIP</key>
<value>true</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>MGMT_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Management Prefix"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>MGMT_PREFIX</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Default Gateway IP address"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>DEFAULT_GATEWAY</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Plain text or 5 encrypted"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>ADMIN_PASSWORD</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The role of the switch. e.g. leaf, spine"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>IsSwitchRole</key>
<value>true</value>
</entry>
</annotations>
<defaultValue>spine</defaultValue>
<name>SWITCH_ROLE</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"The comma and dash separated list of fabric ports"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
<entry>
<key>IsFabricPort</key>
<value>true</value>
</entry>
</annotations>
<name>FABRIC_INTERFACES</name>
<parameterType>interfaceRange</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Backbone VLAN ID"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BACKBONE_VLAN</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Backbone IP address"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BACKBONE_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Backbone Prefix"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>BACKBONE_PREFIX</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"IP Address of the XMPP Server"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_SERVER_IP</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"FQDN of the XMPP Server"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_SERVER</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>Description</key>
<value>"Space separated XMPP Spine Group Names"</value>
</entry>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_GROUPS</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsMandatory</key>
<value>true</value>
</entry>
</annotations>
<name>XMPP_PASSWORD</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<published>true</published>
<supportedPlatforms>N7K,N6K</supportedPlatforms>
<templateType>POAP</templateType>
<timestamp>2013-09-30 08:04:08</timestamp>
<userDefined>false</userDefined>
</item>
<item>
<assignedInstanceClassId>0</assignedInstanceClassId>
<instanceClassId>38</instanceClassId>
<instanceName>com.cisco.dcbu.dcm.model.cfgtemplate.ConfigTemplate:name=VPC_Template:type=false</instanceName>
<description>This file specifies the template configuration for vpc with annotations</description>
<fileName>vpc_annotations.template</fileName>
<name>VPC_Template</name>
<parameters>
<annotations>
<entry>
<key>IsVPCDomainID</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_DOMAIN_ID</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkSrc</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_SRC</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkDst</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_DST</name>
<parameterType>ipV4Address</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkPortChannel</key>
<value>true</value>
</entry>
<entry>
<key>IsVPCPort</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_LINK_PORT_CHANNEL_NUMBER</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations/>
<name>VPC_PEER_LINK_PORT_CHANNEL_DESCRIPTION</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations>
<entry>
<key>IsVPCPeerLinkPort</key>
<value>true</value>
</entry>
</annotations>
<name>VPC_PEER_LINK_IF_NAMES</name>
<parameterType>interfaceRange</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</parameters>
<parameters>
<annotations/>
<name>VPC_ARRAY</name>
<parameterType>structureArray</parameterType>
<parameterTypeStructure>true</parameterTypeStructure>
<structureParameters>
<entry>
<key>ID</key>
<value>
<annotations>
<entry>
<key>IsVPCID</key>
<value>true</value>
</entry>
</annotations>
<name>ID</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</value>
</entry>
<entry>
<key>PORT_CHANNEL_NUMBER</key>
<value>
<annotations>
<entry>
<key>IsVPCPortChannel</key>
<value>true</value>
</entry>
</annotations>
<name>PORT_CHANNEL_NUMBER</name>
<parameterType>integer</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</value>
</entry>
<entry>
<key>IF_NAME</key>
<value>
<annotations>
<entry>
<key>IsVPCPort</key>
<value>true</value>
</entry>
</annotations>
<name>IF_NAME</name>
<parameterType>interface</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</value>
</entry>
<entry>
<key>DESCRIPTION</key>
<value>
<annotations/>
<name>DESCRIPTION</name>
<parameterType>string</parameterType>
<parameterTypeStructure>false</parameterTypeStructure>
<structureParameters/>
</value>
</entry>
</structureParameters>
</parameters>
<published>true</published>
<supportedPlatforms>N7K,N6K</supportedPlatforms>
<templateType>POAP</templateType>
<timestamp>2013-09-30 08:04:08</timestamp>
<userDefined>false</userDefined>
</item>
</result>
</tns:getAllPublishedTemplatesResponse>
</env:Body>
</env:Envelope>
Generate Configuration with the template
This is a SOAP API call to generate the configuration and later used to create the POAP definition. In this example, it's using the "Base_Leaf_Template" to generate the configuration.
http://10.77.247.139:80/ConfigTemplateWSService/ConfigTemplateWS
Request
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header>
<ns0:token xmlns:ns0="http://dcnm/headers">ZO29rayKhzlieynOjb2N+b1x7pRHNyqB</ns0:token>
<ns0:session xmlns:ns0="http://dcnm/headers">0</ns0:session>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tns:getPopulatedCommands xmlns:tns="http://ep.san.jaxws.dcbu.cisco.com/">
<arg0>
<instanceClassId>31</instanceClassId>
<instanceName>com.cisco.dcbu.dcm.model.cfgtemplate.ConfigTemplate:name=Base_Leaf_Template:type=false</instanceName>
</arg0>
<arg1>
<item>SWITCH_NAME</item>
<item>MGMT_IP</item>
<item>MGMT_PREFIX</item>
<item>DEFAULT_GATEWAY</item>
<item>ADMIN_PASSWORD</item>
<item>SWITCH_ROLE</item>
<item>FABRIC_INTERFACES</item>
<item>HOST_INTERFACES</item>
<item>BACKBONE_VLAN</item>
<item>BACKBONE_IP</item>
<item>BACKBONE_IPV6</item>
<item>BGP_ROUTER_IP</item>
<item>BGP_RR_IP</item>
<item>LDAP_SERVER_IP</item>
<item>XMPP_SERVER_IP</item>
<item>XMPP_SERVER</item>
<item>XMPP_GROUPS</item>
<item>XMPP_PASSWORD</item>
<item>ENABLE_VPC</item>
<item>VPC_DOMAIN_ID</item>
<item>VPC_PEER_DST</item>
<item>VPC_PEER_LINK_PORT_CHANNEL_NUMBER</item>
<item>VPC_PEER_LINK_IF_NAMES</item>
<item>VPC_ARRAY</item>
</arg1>
<arg2>
<item>leaf-SR123456</item>
<item>172.22.31.23</item>
<item>24</item>
<item>172.22.31.1</item>
<item>cisco123</item>
<item>leaf</item>
<item>eth1/4-8</item>
<item>eth1/10-12</item>
<item>12</item>
<item>172.22.31.15</item>
<item>2345::2346</item>
<item>172.22.31.10</item>
<item>172.22.31.12</item>
<item>172.22.31.2</item>
<item>172.22.31.3</item>
<item>xmpp.cisco.com</item>
<item>leaf_group</item>
<item>xmpp_123</item>
<item>True</item>
<item>3</item>
<item>172.22.31.24</item>
<item>2</item>
<item>eth3/4</item>
<item>{{2,eth4/4}}</item>
</arg2>
<arg3>true</arg3>
</tns:getPopulatedCommands>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response
Note
Replace $$ with empty in the below response
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<tns:getPopulatedCommandsResponse xmlns:tns="http://ep.san.jaxws.dcbu.cisco.com/">
<result>license grace-period
hostname $$leaf-SR123456$$
install feature-set fabric
feature-set fabric
feature fabric forwarding
install feature-set fabricpath
feature-set fabricpath
!#Cable Management
feature lldp
feature cable-management
fabric connectivity tier 1
feature bgp
feature interface-vlan
feature vn-segment-vlan-based
feature dhcp
feature evb
feature pim
!#feature SPoM
feature fabric access
!### Vinci Multicast Forwarding (NGMVPN)
feature fabric multicast
!### Vinci passive PIM
ip multicast fabric-forwarding
fabric forwarding identifier 1
fabric forwarding anycast-gateway-mac 2020.0000.00AA
fabric forwarding switch-role leaf
username admin password $$cisco123$$ role network-admin
no password strength-check
ip domain-lookup
!### Configure IP host for SPoM XMPP server below
ip host $$xmpp.cisco.com$$ $$172.22.31.3$$
!### Configure SPoM XMPP Server below
fabric access server $$xmpp.cisco.com$$ vrf management password $$xmpp_123$$
!### Subscribe this device to this XMPP group
fabric access group $$leaf_group$$
fabric database profile-map global
ethernet-tag encapsulation dot1q default dynamic
ethernet-tag encapsulation vni default dynamic
vdp vni default dynamic
!### Configure fabric database location
!### db-table "ou=segments,dc=cisco,dc=com"
!### is a variable that should match the table
!### name that is populated in the LDAP database.
fabric database type asset
server protocol ldap ip $$172.22.31.2$$
db-table ou=segments,dc=cisco,dc=com key-type 1
!### Enable global mobility-domain only when you
!### are going to use (vlan, mobility_domain) to search ADBM database
!### fabric database mobility-domain %mobility_domain
route-map FABRIC-RMAP-REDIST-HOST deny 10
match interface Vlan $$12$$
route-map FABRIC-RMAP-REDIST-HOST permit 20
match ip address HOSTS
route-map FABRIC-RMAP-REDIST-V6HOST deny 10
match interface Vlan $$12$$
route-map FABRIC-RMAP-REDIST-V6HOST permit 20
match ip address V6HOSTS
ip dhcp snooping
service dhcp
ip dhcp relay
ip dhcp relay information option
ip dhcp relay information option vpn
interface Vlan $$12$$
no shutdown
ip address $$172.22.31.15$$
ipv6 address $$2345::2346$$
fabric forwarding control-segment
interface $$eth1/7$$
no shutdown
switchport
switchport mode fabricpath
fabricpath isis hello-interval 100
fabricpath isis retransmit-interval 10
fabricpath isis retransmit-throttle-interval 200
interface $$eth1/8$$
no shutdown
switchport
switchport mode fabricpath
fabricpath isis hello-interval 100
fabricpath isis retransmit-interval 10
fabricpath isis retransmit-throttle-interval 200
interface $$eth1/6$$
no shutdown
switchport
switchport mode fabricpath
fabricpath isis hello-interval 100
fabricpath isis retransmit-interval 10
fabricpath isis retransmit-throttle-interval 200
interface $$eth1/5$$
no shutdown
switchport
switchport mode fabricpath
fabricpath isis hello-interval 100
fabricpath isis retransmit-interval 10
fabricpath isis retransmit-throttle-interval 200
interface $$eth1/4$$
no shutdown
switchport
switchport mode fabricpath
fabricpath isis hello-interval 100
fabricpath isis retransmit-interval 10
fabricpath isis retransmit-throttle-interval 200
interface $$eth1/10$$
switchport
switchport mode trunk
no shutdown
interface $$eth1/11$$
switchport
switchport mode trunk
no shutdown
interface $$eth1/12$$
switchport
switchport mode trunk
no shutdown
route-map ALL-PATHS permit 10
set path-selection all advertise
vlan $$12$$
mode fabricpath
router bgp 100
router-id $$172.22.31.10$$
address-family ipv4 unicast
redistribute hmm route-map FABRIC-RMAP-REDIST-HOST
maximum-paths ibgp 2
additional-paths receive
additional-paths selection route-map ALL-PATHS
address-family ipv6 unicast
redistribute hmm route-map FABRIC-RMAP-REDIST-V6HOST
maximum-paths ibgp 2
additional-paths receive
additional-paths selection route-map ALL-PATHS
address-family vpnv4 unicast
additional-paths receive
address-family vpnv6 unicast
additional-paths receive
address-family ipv4 mvpn
additional-paths receive
address-family ipv6 mvpn
additional-paths receive
neighbor $$172.22.31.12$$ remote-as 100
address-family ipv4 unicast
send-community both
address-family ipv6 unicast
send-community both
address-family vpnv4 unicast
send-community extended
address-family vpnv6 unicast
send-community extended
address-family ipv4 mvpn
send-community both
address-family ipv6 mvpn
send-community both
vrf context management
ip route 0.0.0.0/0 $$172.22.31.1$$
interface mgmt0
vrf member management
no cdp enable
ip address $$172.22.31.23$$/$$24$$
system fabric dynamic-vlans 2500-3500
!###l3vm uses bootflash:platform.inf for the core vlans.
!###Please refer to CSCuj12763 for additional details
system fabric core-vlans 2500-2999
line console
exec-timeout 0
line vty
!### Sample config for setting interface
!### address e.g. for connecting to
!### 101.101.101.91 ldap server
!interface Ethernet 1/18
! no switchport
! ip address 101.101.101.22/24
! no shutdown
configure profile vrf_tenant_profile
vlan $id
mode fabricpath
vn-segment $segment
interface vlan $id
vrf member $vrfname
ip address $$172.22.31.15$$
ipv6 address $$2345::2346$$
no shut
exit
configure profile vrf-common
vrf context $vrfName
vni $include_l3_segid
rd auto
address-family ipv4 unicast
route-target both auto
router bgp $asn
vrf $vrfName
address-family ipv4 unicast
redistribute hmm route-map FABRIC-RMAP-REDIST-HOST
maximum-paths ibgp 2
exit
config profile GoldProfile
interface vlan $vlanId
vrf member $vrfName
ip address $gatewayIpAddress/$netMaskLength
ip dhcp relay address $dhcpServerAddr use-vrf default
fabric forwarding mode proxy-gateway
no ip redirects
no shutdown
vlan $vlanId
vn-segment $segmentId
include profile vrf-common
end
configure profile vrf-common-v6
vrf context $vrfName
vni $include_l3_segid
rd auto
address-family ipv6 unicast
route-target both auto
router bgp $asn
vrf $vrfName
address-family ipv6 unicast
redistribute hmm route-map FABRIC-RMAP-REDIST-V6HOST
maximum-paths ibgp 2
exit
config profile GoldProfile-v6
interface vlan $vlanId
vrf member $vrfName
ipv6 address $gatewayIpv6Address/$prefixLength
fabric forwarding mode proxy-gateway
no shutdown
vlan $vlanId
vn-segment $segmentId
include profile vrf-common-v6
end
configure profile vrf-common-v4nv6
vrf context $vrfName
vni $include_l3_segid
rd auto
address-family ipv4 unicast
route-target both auto
address-family ipv6 unicast
route-target both auto
router bgp $asn
vrf $vrfName
address-family ipv4 unicast
redistribute hmm route-map FABRIC-RMAP-REDIST-HOST
maximum-paths ibgp 2
address-family ipv6 unicast
redistribute hmm route-map FABRIC-RMAP-REDIST-V6HOST
maximum-paths ibgp 2
exit
config profile GoldProfile-v4nv6
interface vlan $vlanId
vrf member $vrfName
ip address $gatewayIpAddress/$netMaskLength
ipv6 address $gatewayIpv6Address/$prefixLength
ip dhcp relay address $dhcpServerAddr use-vrf default
fabric forwarding mode proxy-gateway
no ip redirects
no shutdown
vlan $vlanId
vn-segment $segmentId
include profile vrf-common-v4nv6
end</result>
</tns:getPopulatedCommandsResponse>
</env:Body>
</env:Envelope>
Create POAP Definition
This REST API call will generate the DCNM POAP definition, save the definition into DCNM database and publish the configuration to the devices. This will use the configuration generated from step 6 and pass them in the request which shown in blue color.
REST URL: http://10.77.247.139/rest/poap/poap-definitions/
HTTP Method:POST
Request
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Content-Type: application/json; charset=UTF-8
Dcnm-Token: NUVyu5Y0YHDv0tT6xFuIPd+Cu9OA1XCQ
Content-Length: 28
Cookie: JSESSIONID=4C975316B01A44215861475E1B5F9328
Pragma: no-cache
Cache-Control: no-cache
{
"poapTemplateCol":[{"templateContent":"license grace-period\nhostname leaf-SR123456\n\ninstall feature-set fabric\nfeature-set fabric\nfeature fabric forwarding\n\ninstall feature-set fabricpath\nfeature-set fabricpath\n\n!#Cable Management\nfeature lldp\nfeature cable-management\nfabric connectivity tier 1\n\nfeature bgp\nfeature interface-vlan\nfeature vn-segment-vlan-based\nfeature dhcp\nfeature evb\nfeature pim\n\n!#feature SPoM\nfeature fabric access\n\n!### Vinci Multicast Forwarding (NGMVPN)\nfeature fabric multicast\n\n!### Vinci passive PIM\nip multicast fabric-forwarding\n\nfabric forwarding identifier 1\nfabric forwarding anycast-gateway-mac 2020.0000.00AA\nfabric forwarding switch-role leaf\n\nusername admin password cisco123 role network-admin\nno password strength-check\nip domain-lookup\n\n!### Configure IP host for SPoM XMPP server below\nip host xmpp.cisco.com 172.22.31.3\n\n!### Configure SPoM XMPP Server below\nfabric access server xmpp.cisco.com vrf management password xmpp_123\n\n!### Subscribe this device to this XMPP group \nfabric access group leaf_group\n\nfabric database profile-map global\n ethernet-tag encapsulation dot1q default dynamic\n ethernet-tag encapsulation vni default dynamic\n vdp vni default dynamic\n\n!### Configure fabric database location\n!### db-table \"ou=segments,dc=cisco,dc=com\"\n!### is a variable that should match the table\n!### name that is populated in the LDAP database.\nfabric database type asset\n server protocol ldap ip 172.22.31.2\n db-table ou=segments,dc=cisco,dc=com key-type 1\n\n!### Enable global mobility-domain only when you \n!### are going to use (vlan, mobility_domain) to search ADBM database \n!### fabric database mobility-domain %mobility_domain\n\nroute-map FABRIC-RMAP-REDIST-HOST deny 10\n match interface Vlan 12\nroute-map FABRIC-RMAP-REDIST-HOST permit 20\n match ip address HOSTS \n\nroute-map FABRIC-RMAP-REDIST-V6HOST deny 10\n match interface Vlan 12\nroute-map FABRIC-RMAP-REDIST-V6HOST permit 20\n match ip address V6HOSTS\n\nip dhcp snooping\nservice dhcp\nip dhcp relay\nip dhcp relay information option\nip dhcp relay information option vpn\n\ninterface Vlan 12\n no shutdown\n ip address 172.22.31.15\n ipv6 address 2345::2346\n fabric forwarding control-segment\n\n\ninterface eth1/7\n no shutdown\n switchport\n switchport mode fabricpath\n fabricpath isis hello-interval 100\n fabricpath isis retransmit-interval 10\n fabricpath isis retransmit-throttle-interval 200\n\ninterface eth1/8\n no shutdown\n switchport\n switchport mode fabricpath\n fabricpath isis hello-interval 100\n fabricpath isis retransmit-interval 10\n fabricpath isis retransmit-throttle-interval 200\n\ninterface eth1/6\n no shutdown\n switchport\n switchport mode fabricpath\n fabricpath isis hello-interval 100\n fabricpath isis retransmit-interval 10\n fabricpath isis retransmit-throttle-interval 200\n\ninterface eth1/5\n no shutdown\n switchport\n switchport mode fabricpath\n fabricpath isis hello-interval 100\n fabricpath isis retransmit-interval 10\n fabricpath isis retransmit-throttle-interval 200\n\ninterface eth1/4\n no shutdown\n switchport\n switchport mode fabricpath\n fabricpath isis hello-interval 100\n fabricpath isis retransmit-interval 10\n fabricpath isis retransmit-throttle-interval 200\n\n\ninterface eth1/10\n switchport \n switchport mode trunk\n no shutdown\n\ninterface eth1/11\n switchport \n switchport mode trunk\n no shutdown\n\ninterface eth1/12\n switchport \n switchport mode trunk\n no shutdown\n\nroute-map ALL-PATHS permit 10\n set path-selection all advertise\n\nvlan 12\n mode fabricpath\n\nrouter bgp 100\n router-id 172.22.31.10\n address-family ipv4 unicast\n redistribute hmm route-map FABRIC-RMAP-REDIST-HOST \n maximum-paths ibgp 2 \n additional-paths receive\n additional-paths selection route-map ALL-PATHS\n address-family ipv6 unicast\n redistribute hmm route-map FABRIC-RMAP-REDIST-V6HOST\n maximum-paths ibgp 2\n additional-paths receive\n additional-paths selection route-map ALL-PATHS\n address-family vpnv4 unicast\n additional-paths receive\n address-family vpnv6 unicast\n additional-paths receive\n address-family ipv4 mvpn\n additional-paths receive\n address-family ipv6 mvpn\n additional-paths receive\n\n neighbor 172.22.31.12 remote-as 100\n address-family ipv4 unicast\n send-community both\n address-family ipv6 unicast\n send-community both\n address-family vpnv4 unicast\n send-community extended\n address-family vpnv6 unicast\n send-community extended\n address-family ipv4 mvpn\n send-community both\n address-family ipv6 mvpn\n send-community both\n\nvrf context management\n ip route 0.0.0.0/0 172.22.31.1\n\ninterface mgmt0\n vrf member management\n no cdp enable\n ip address 172.22.31.23/24\n\nsystem fabric dynamic-vlans 2500-3500\n\n!###l3vm uses bootflash:platform.inf for the core vlans. \n!###Please refer to CSCuj12763 for additional details\nsystem fabric core-vlans 2500-2999\n\nline console\n exec-timeout 0\nline vty\n\n\n!### Sample config for setting interface\n!### address e.g. for connecting to\n!### 101.101.101.91 ldap server\n\n!interface Ethernet 1/18\n! no switchport\n! ip address 101.101.101.22/24\n! no shutdown\n\nconfigure profile vrf_tenant_profile\n vlan $id\n mode fabricpath\n vn-segment $segment\n interface vlan $id\n vrf member $vrfname\n ip address 172.22.31.15\n ipv6 address 2345::2346\n no shut\nexit\n\nconfigure profile vrf-common\n vrf context $vrfName\n vni $include_l3_segid\n rd auto\n address-family ipv4 unicast\n route-target both auto\n router bgp $asn\n vrf $vrfName\n address-family ipv4 unicast\n redistribute hmm route-map FABRIC-RMAP-REDIST-HOST\n maximum-paths ibgp 2 \nexit\n\nconfig profile GoldProfile\n interface vlan $vlanId\n vrf member $vrfName\n ip address $gatewayIpAddress/$netMaskLength\n ip dhcp relay address $dhcpServerAddr use-vrf default\n fabric forwarding mode proxy-gateway\n no ip redirects\n no shutdown\n vlan $vlanId\n vn-segment $segmentId\n include profile vrf-common\nend\n\nconfigure profile vrf-common-v6\n vrf context $vrfName\n vni $include_l3_segid\n rd auto\n address-family ipv6 unicast\n route-target both auto\n router bgp $asn\n vrf $vrfName\n address-family ipv6 unicast\n redistribute hmm route-map FABRIC-RMAP-REDIST-V6HOST\n maximum-paths ibgp 2 \nexit\n\nconfig profile GoldProfile-v6\n interface vlan $vlanId\n vrf member $vrfName\n ipv6 address $gatewayIpv6Address/$prefixLength\n fabric forwarding mode proxy-gateway\n no shutdown\n vlan $vlanId\n vn-segment $segmentId\n include profile vrf-common-v6\nend\n\nconfigure profile vrf-common-v4nv6\n vrf context $vrfName\n vni $include_l3_segid\n rd auto\n address-family ipv4 unicast\n route-target both auto\n address-family ipv6 unicast\n route-target both auto\n router bgp $asn\n vrf $vrfName\n address-family ipv4 unicast\n redistribute hmm route-map FABRIC-RMAP-REDIST-HOST\n maximum-paths ibgp 2 \n address-family ipv6 unicast\n redistribute hmm route-map FABRIC-RMAP-REDIST-V6HOST\n maximum-paths ibgp 2 \nexit\n\nconfig profile GoldProfile-v4nv6\n interface vlan $vlanId\n vrf member $vrfName\n ip address $gatewayIpAddress/$netMaskLength\n ipv6 address $gatewayIpv6Address/$prefixLength\n ip dhcp relay address $dhcpServerAddr use-vrf default\n fabric forwarding mode proxy-gateway\n no ip redirects\n no shutdown\n vlan $vlanId\n vn-segment $segmentId\n include profile vrf-common-v4nv6\nend\n","templateName":"Base_Leaf_Template","methodType":"POST","id":0,"templateNVPairs":"{\"0\":{\"text\":\"leaf-SR123456\",\"annotations\":[{\"value\":\"\\\"The host name of the switch\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"},{\"value\":\"true\",\"key\":\"UseDNSReverseLookup\"},{\"value\":\"true\",\"key\":\"IsSwitchName\"}],\"name\":\"SWITCH_NAME\"},\"1\":{\"text\":\"172.22.31.23\",\"annotations\":[{\"value\":\"\\\"Management IP address used by DCNM to monitor this device\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsVPCPeerLinkSrc\"},{\"value\":\"true\",\"key\":\"IsManagementIP\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"MGMT_IP\"},\"2\":{\"text\":\"24\",\"annotations\":[{\"value\":\"\\\"Management Prefix\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"MGMT_PREFIX\"},\"3\":{\"text\":\"172.22.31.1\",\"annotations\":[{\"value\":\"\\\"Default Gateway IP address\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"DEFAULT_GATEWAY\"},\"4\":{\"text\":\"cisco123\",\"annotations\":[{\"value\":\"\\\"Plain text or 5 encrypted\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"ADMIN_PASSWORD\"},\"5\":{\"text\":\"leaf\",\"annotations\":[{\"value\":\"\\\"The role of the switch. e.g. leaf, spine\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"},{\"value\":\"true\",\"key\":\"IsSwitchRole\"}],\"name\":\"SWITCH_ROLE\"},\"6\":{\"text\":\"eth1/4-8\",\"annotations\":[{\"value\":\"\\\"The comma and dash separated list of fabric ports\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"},{\"value\":\"true\",\"key\":\"IsFabricPort\"}],\"name\":\"FABRIC_INTERFACES\"},\"7\":{\"text\":\"eth1/10-12\",\"annotations\":[{\"value\":\"\\\"The comma and dash separated list of host ports\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"},{\"value\":\"true\",\"key\":\"IsHostPort\"}],\"name\":\"HOST_INTERFACES\"},\"8\":{\"text\":\"12\",\"annotations\":[{\"value\":\"\\\"Backbone VLAN ID\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"BACKBONE_VLAN\"},\"9\":{\"text\":\"172.22.31.15\",\"annotations\":[{\"value\":\"\\\"Backbone IP address/prefix\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"BACKBONE_IP\"},\"10\":{\"text\":\"2345::2346\",\"annotations\":[{\"value\":\"\\\"Backbone IPv6 address/prefix\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"BACKBONE_IPV6\"},\"11\":{\"text\":\"172.22.31.10\",\"annotations\":[{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"BGP_ROUTER_IP\"},\"12\":{\"text\":\"172.22.31.12\",\"annotations\":[{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"BGP_RR_IP\"},\"13\":{\"text\":\"172.22.31.2\",\"annotations\":[{\"value\":\"\\\"IP Address of the Auto-config LDAP Server\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"LDAP_SERVER_IP\"},\"14\":{\"text\":\"172.22.31.3\",\"annotations\":[{\"value\":\"\\\"IP Address of the XMPP Server\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"XMPP_SERVER_IP\"},\"15\":{\"text\":\"xmpp.cisco.com\",\"annotations\":[{\"value\":\"\\\"FQDN of the XMPP Server\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"XMPP_SERVER\"},\"16\":{\"text\":\"leaf_group\",\"annotations\":[{\"value\":\"\\\"Space separated XMPP Spine Group Names\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"XMPP_GROUPS\"},\"17\":{\"text\":\"xmpp_123\",\"annotations\":[{\"value\":\"\\\"Password\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"XMPP_PASSWORD\"},\"18\":{\"text\":\"True\",\"annotations\":[{\"value\":\"\\\"True if VPC should be configured\\\"\",\"key\":\"Description\"},{\"value\":\"true\",\"key\":\"IsMandatory\"}],\"name\":\"ENABLE_VPC\"},\"19\":{\"text\":\"3\",\"annotations\":[{\"value\":\"true\",\"key\":\"IsVPCDomainID\"}],\"name\":\"VPC_DOMAIN_ID\"},\"20\":{\"text\":\"172.22.31.24\",\"annotations\":[{\"value\":\"true\",\"key\":\"IsVPCPeerLinkDst\"}],\"name\":\"VPC_PEER_DST\"},\"21\":{\"text\":\"2\",\"annotations\":[{\"value\":\"true\",\"key\":\"IsVPCPeerLinkPortChannel\"},{\"value\":\"true\",\"key\":\"IsVPCPort\"}],\"name\":\"VPC_PEER_LINK_PORT_CHANNEL_NUMBER\"},\"22\":{\"text\":\"eth3/4\",\"annotations\":[{\"value\":\"true\",\"key\":\"IsVPCPeerLinkPort\"}],\"name\":\"VPC_PEER_LINK_IF_NAMES\"},\"23\":{\"text\":\"{{2,eth4/4}}\",\"annotations\":[],\"name\":\"VPC_ARRAY\"}}"}],"poapSwitchCol":[{"switchName":"leaf-SR123456","publish":"true","lanGroup":2,"deviceType":"N6K","systemImageName":"n6000-system-image.bin","virutalDeviceContextName":"vdc","kickstartImageName":"n6000-kick-image.bin","methodType":"POST","imageServerId":1,"serialNumber":"SR123456","switchStatus":"Not Discovered","configServerId":1,"username":"admin","mgmtIp":"172.22.31.23","publishStatus":"Published","tier":0,"id":0,"password":"cisco123"}]
}
Response
HTTP/1.1 202 Accepted