Howdy out there in Automation Land! I hope everyone is getting ready for summer and enjoying those last few weeks of school before the kids run home for their summer break. I had a great response from the python comparison blog before so I decided to take another stab at it and do a more "complex" version. This version is going to aim at making API calls. We are no longer looking at just some basic coding examples, we are wanting to make calls to servers and handle the responses from those calls... so speaking of lots of calls... how about this movie poster?
Little scary and a little exciting at the same time... right? Anyways, we are going to look at a couple of things and a couple of tools that will be vital to you writing API calls and handling them in both Python and Cisco Process Orchestrator.
So we will want to write an easy "GET" call and an easy "POST" call. I needed to fine something easy to execute against as well so I found this...
It is a great place to test some web calls against and make the most out of your testing. It is a fake web server that will return output to you. It is perfect for our demo here as you can copy exactly what I am doing and there is no authentication scheme needed to follow.
The other tools that I love for this are http://jsonpath.com/ for your json path query needs and the XML Tools plugin for https://notepad-plus-plus.org/ to deal with your XPath Query needs. This would both be useful, but more so if you are doing work in CPO.
Here is the "finished" code we will work on in the VOD:
See... pretty simple stuff but makes it easy for us to do a comparison between Python and CPO. Just like it was done before, simple code, can grow into something much better and more complex and hopefully will allow you to see and understand more in the CPO space.
If you have any questions or want more information... please comment/post below!
Standard End-O-Blog Disclaimer:
Thanks as always to all my wonderful readers and those who continue to stick with and use CPO. Big things are on the horizon and I hope that you will continue to use CPO and find great uses for it! If you have a really exciting automation story, please email me it! (see below) I would love to compile some stories and feature customers or individual stories in an upcoming blog!!!
AUTOMATION BLOG DISCLAIMER: As always, this is a blog and my (Shaun Roberts) thoughts on CPO and automation, my thoughts on best practices, and my experiences with the product and customers. The above views are in no way representative of Cisco or any of it's partners, etc. None of these views, etc are supported and this is not a place to find standard product support. If you need standard product support please do so via the current call in numbers on Cisco.com or email email@example.com
Hello,We have one fabric composed by only 1 MDS 9148 switches, and now, we want to add a new 9148 S MDS switch to this fabric.one VSAN (100) and one zone set activated on this switch.Now, we need to add a new switch in fabric. This new switch is also one ...
Hi All, Spine Leaf designs I have seen so far show a single link from Leaf to each Spine and the recommended solution to increase aggregate fabric throughput is to add another Spine. Is it a valid design to have multiple links from Leaf to Spine to a...
I found two different theory to handle l3 traffic for unknown IP in ACI one is stated below which is from White Paper 739989 and in other cisco live document I have seen that this will be treated via spine proxy method. "For (L3) routed traffic to an...
I found below note in cisco white paper i.e 739989 - end point learning but unable to understand it. "An exception exists for remote MAC address learning when a packet is incoming from L3Out to Cisco ACI. If ARP traffic is coming from an L3Out SVI ra...
Dears ,Please check as the ACI sandbox does not accept any simple action on it from yesterday ? even creation of a tenant returns "Error: 400 - the messaging layer was unable to deliver the stimulus (connection error, Connection refused)"