cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4386
Views
10
Helpful
13
Replies

DCNM REST API

Dave Lewis
Level 1
Level 1

Hello,

I have DCNM (7.2.2a) operating for generating configurations from templates which are then retrieved via POAP. This is working fine and I am now in the process of writing some automation tools utilising the REST API to generate the start-up configurations and publish the POAP definition. 

However I am running into some issues and the API documentation seems to be a mixture of incomplete and incorrect. Here's what I've got working:

Get session token; Get DCNM version; Get list of config/image servers; Get list of published templates; Get list of LAN groups; Get list of DHCP scopes; listing of switch definitions; Get a particular switch definition; 

So, if anyone has got this working I'd really appreciate some answers to the following questions:

1) The call to get the LAN groups only shows top-level groups and not nested groups. Is there a parameter I can pass to get these as well?

2) The call to create a start-up configuration (/templates/populate-template/{template name}) expects an array of template parameters and values. The documentation says "You will get the templateParams in get template data API response". However the call to get an individual template appears to return a completed POAP configuration rather than an empty template. I have found using a GET on /templates/{template name} (not documented anywhere, I just guessed it based on the list of templates call) returns a list of variables/parameters but not the actual template content. Is this what I should be using to create the start-up configuration?

3) What's the difference between 'create switch definition' and 'create poap definition'? The description for 'create switch' in the documentation talks of creating a POAP definition anyway (although it is a different URL) but the parameters section makes no sense.

4) You will get the templateParams in get template data API response

I'm sure I'll have more questions once I get this part working! Thank you in advance to anyone who can assist.

I have used  7.2 REST API guide here and the DFA API guide (unfortunately mostly SOAP rather than REST) here

Dave