Automation for Cisco ACI using Cisco’s UCS Director
In the above example it’s UCSD’s self service portal with 4 workflows (each users group can have a different portal)
- New segment (BD & EPG)
- Add physical server (single port)
- Add physical server (port-channel)
- Add physical server (VPC)
Demo:
–
New segment workflow
This workflow built from tasks that Creates BD, Subnet, EPG, associate EPG to virtual domain and add contracts (Provider & Consumer)
Running the workflow will ask this user inputs
UCSD for advanced users
- In some other workflow i had to update EPG contract’s label, I did not found a task for that in UCSD built in tasks, So i created a REST API workflow as a compound workflow and used it in a different workflow to send REST API calls to the APIC in order to configure the label,
- I also had to get node ID from an interface object (from user’s input table) so i used a javascript task in order to parse it
–
It is possible to run UCSD workflows from VMware VRA via REST API
In this example i am running UCSD’s “New segment” workflow from VRA at our lab, (VRA ask for segment name & IP and then VRO run a rest API call to UCSD with the user’s input data
VRO Rest API call:
The VRO script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
var operationUrl = "rest?formatType=json&opName=userAPISubmitWorkflowServiceRequest&opData=%7Bparam0:'New_Segment',param1:%7B'list':[%7B'name':'Name','value':'"+NetworkName+"'%7D,%7B'name':'IP%20address','value':'"+IPAddr+"'%7D]%7D,param2:-1%7D"; System.log("Host: " + restHost + ", operation: " + operationUrl + ", Request Type: " + requestType.name); var request = restHost.createRequest(requestType, operationUrl, requestContent); request.setHeader("X-Cloupia-Request-Key","0C3B2DCBCB294ED681BD988BA520889E"); System.log("request: " + request.fullUrl); var response = request.execute(); System.log("response: " + response.contentAsString); result = new Properties(); result.put("statusCode", response.statusCode); result.put("contentLength", response.contentLength); result.put("headers", response.getAllHeaders()); result.put("contentAsString", response.contentAsString); |
–
Summery
- Building flows with UCSD are not so user friendly, But once you build it its works fine
- Most of daily ACI operation are preconfigured at UCSD, so you can do almost everything without scripting
- the User’s Self-service portal is friendly and
- rollbacks are very easy (1 mouse click)
–