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
hi guys, I have to choose server farm switch but i dont have enough experince for that. My environment : 10 servers in VCenter cluster, brocade SAN switch for storage Tech spec:- 10G- standart L3 switch- non stoping Upgrade- may be MPLS for...
I need to reboot a HX nodes for a new config to take effect. the thing is each memory of the nodes is almost full when you check each host in the vcenter (let's say 90% of the memory of each host is used) The question is if I reboot the nodes 1 by 1;...
We have a N3K-C3524P-XL with 24 port enable by default; And we need additional 24 port license recently.How do we apply the license? using command install license xxx is ok? and do we need reboot the box, or do we need downtime?
in Cisco UCS C240 M5 L server windows 2016 OS installation PCI NIC's are not appearing , Please can some one help me , How to configure it , Also please share the drivers link to installation with compatible to OS.We tried to install firmware with windows...
Hi Guys, Hope everyone is doing good!!Inputs available : Src IP, Dest IP, Protocol and Port NumberUsing the above inputs, I need to figure out if there are any contracts available between the EPGs and display them. Please point me to CLIs and as well...