TechWiseTV Workshop: Q&A Cisco Developer Program

4
Q&A © 2015 Cisco and/or its affiliates. All rights reserv ed. This document is Cisco Public. Page 1 of 4 What Can You Build with Cisco APIs? February 2, 2017 Q. How about advanced ports settings? A. You can find the full list of NX-OS modules available today at http://docs.ansible.com/ansible/list_of_netw ork_modules.html#nxos . Q. Is it possible to configure advanced HSRP settings? Via script? A. You can see the full HSRP options here: http://docs.ansible.com/ansible/nxos_hsrp_module.html. For anything not supported by the module, you can use nxos_config to send raw configuration commands. Q. What does a .yml file do? Is it just an Ansible thing? A. A .yml file is just the data format, similar to a .xml or .json file. Definitely not just an Ansible thing. Q. How is Ansible any different than Hewlett Packard network automation for making configuration changes? Can you roll back anything that was pushed by Ansible? A. I don't know HP netw ork automation, but some of the differences are that Ansible is an open-source automation system and doesn't apply only to netw orks, but can apply to application deployment and so on. Q. Is YML the primary language for Cisco Nexus? A. YAML is just a data-formatting language and has no specific tie to Cisco Nexus®. Q. What if I need to check things out on a switch before applying part or all of your configuration, or what if I need to vary the configuration update depending on the preexisting configuration? A. Ansible provides you w ays to do verification before proceeding. Q. Are the modules NX-OS only? A. There are many modules available for Ansible. Q. Automating infrastructure configuration using IoT SDKs can use common data formats to accelerate digital convergence. Will XML as a common configuration format be within Cisco's strategic horizon? A. My understanding is that YAML and NetConf/RESTConf are the common formats going forw ard. We have learning labs on this at https://learninglabs.cisco.com/.

Transcript of TechWiseTV Workshop: Q&A Cisco Developer Program

Page 1: TechWiseTV Workshop: Q&A Cisco Developer Program

Q&A

© 2015 Cisco and/or its affiliates. All rights reserv ed. This document is Cisco Public. Page 1 of 4

What Can You Build with Cisco APIs?

February 2, 2017

Q. How about advanced ports settings?

A. You can f ind the full list of NX-OS modules available today at

http://docs.ansible.com/ansible/list_of_netw ork_modules.html#nxos.

Q. Is it possible to configure advanced HSRP settings? Via script?

A. You can see the full HSRP options here: http://docs.ansible.com/ansible/nxos_hsrp_module.html. For anything not supported by the module, you can use nxos_config to send raw configuration commands.

Q. What does a .yml file do? Is it just an Ansible thing? A. A .yml f ile is just the data format, similar to a .xml or .json f ile. Definitely not just an Ansible thing.

Q. How is Ansible any different than Hewlett Packard network automation for making configuration

changes? Can you roll back anything that was pushed by Ansible?

A. I don't know HP netw ork automation, but some of the differences are that Ansible is an open-source automation

system and doesn't apply only to netw orks, but can apply to application deployment and so on.

Q. Is YML the primary language for Cisco Nexus? A. YAML is just a data-formatting language and has no specif ic tie to Cisco Nexus®.

Q. What if I need to check things out on a switch before applying part or all of your configuration, or what if

I need to vary the configuration update depending on the preexisting configuration?

A. Ansible provides you w ays to do verif ication before proceeding.

Q. Are the modules NX-OS only?

A. There are many modules available for Ansible.

Q. Automating infrastructure configuration using IoT SDKs can use common data formats to accelerate

digital convergence. Will XML as a common configuration format be within Cisco's strategic horizon?

A. My understanding is that YAML and NetConf/RESTConf are the common formats going forw ard. We have

learning labs on this at https://learninglabs.cisco.com/.

Page 2: TechWiseTV Workshop: Q&A Cisco Developer Program

© 2017 Cisco and/or its affiliates. All rights reserv ed. This document is Cisco Public. Page 2 of 4

Q. I remember that Ansible has a concept of gathering facts when used to manage servers . Are those

required when writing deployment playbooks?

A. You can gather facts from the netw ork devices as part of a playbook, but this is not required. What is nice is that

the facts can be used as variables w ithin playbooks.

Q. Will there be a TAC group to support this?

A. The Cisco® products are supported directly through the TAC, including the netw ork controllers. Developer-/API-

specif ic support is available through https://developer.cisco.com/site/devnet/home/index.gsp through Cisco Spark™ chat and forums, and you can also purchase case-based support for the APIs.

Q. As network engineers w ith zero programming background, where can we start to learn coding related to

networks?

A. A good place to start for NX-OS is the NX-OS dev center here: https://developer.cisco.com/site/nx-os/.

Q. Python and Ansible: What is the big difference between them?

A. Ansible is more of an orchestration and automation engine, w hereas Python is a programming language. Python

is a full-f ledged programming language, w hereas Ansible is something closer to a scripting tool.

Q. How is it authenticating from Ansible playbooks to Cisco Nexus devices?

A. Authentication in Ansible is done through keys or user names and passw ords. In the demo, the user names and

passw ords are stored as local environment variables that Ansible defaults to check.

Q. Can you provide resources for the DevNet website?

A. A great place to start for netw orking is the netw orking DevCenter here:

https://developer.cisco.com/site/netw orking/. You can also check out the learning labs for some guided learning

here: https://learninglabs.cisco.com/.

Q. Everything seems very fragmented. We have got Ansible, Netconf, APIC-EM, and Python. There seems

to be so much stuff. As network engineers, we are used to very stable and consistent techniques. Is the

consistent path to develop these skills?

A. Absolutely agree. This is an exciting time, w ith many new standards and tools being developed across IT. As

netw ork engineers, w e need to become comfortable w ith the direction. The good new s is that w ith much of the new

stuff, w e can improve reliability.

Q. Are the configuration changes pushed via SSH (CLI)?

A. Ansible modules are each w ritten in Python and convert the instructions from the .yml playbooks into Python

function inputs. The w ay the actual sw itches are configured can be over SSH or using NX-API.

Q. Does this only run single threaded?

A. Ansible spaw ns several threads to enable configuration of multiple devices at a time.

Q. Can we have access to the links and resources mentioned in this presentation? A. Resources and links from each presenter can be found on this blog here:

https://communities.cisco.com/community/developer/sandbox/blog/2017/01/31/live-in-321-devnet-on-techw ise-tv.

Q. Do all platforms (Cisco IOS® Software, Cisco IOS-XR Software, NX-OS, ASA, and so on) support this?

A. Anyone can build new modules for Ansible using Python. You can f ind the full list of netw orking devices

supported by Ansible out of the box at http://docs.ansible.com/ansible/list_of_netw ork_modules.html.

Page 3: TechWiseTV Workshop: Q&A Cisco Developer Program

© 2017 Cisco and/or its affiliates. All rights reserv ed. This document is Cisco Public. Page 3 of 4

Q. Ansible uses NX-OS APIs using modules based on JSON and connecting to the switches using SSH,

correct?

A. Ansible modules are each w ritten in Python and convert the instructions from the .yml playbooks into Python

function inputs. The w ay the actual sw itches are configured can be over SSH or using NX-API.

Q. My network devices sit behind a bastion host. Would I run this type of scripting from there or the

desktop?

A. There are a few different w ays to implement Ansible to communicate w ith end devices using bastion hosts and

the like. If the management ports on sw itches are isolated from your desktop, you w ould need to set up

appropriately.

Q. I've heard of Git and GitHub. Are they the same thing?

A. They are not. GitHub is a commercial implementation of the open-source Git protocol, similar to Red Hat and

Linux.

Q. Can the Cisco UCS PE equipment layout be built out using an API?

A. For Cisco UCS® PE deployment, not yet. For all the Cisco UCS configurations, yes.

Q. I would like to check out your developer site.

A. Check out the Cisco UCS dev center here: https://developer.cisco.com/site/ucs-dev-center/.

Q. Is there an API to configure the Cisco UCS PE emulated hardware buildout prior to starting Cisco UCS

Manager inside the emulator?

A. Not yet. There is a feature enhancement request for this, but it is not yet committed.

Q. What does Cisco Spark do?

A. Cisco Spark at a basic level is a persistent chat client, but packed w ith lots of collaboration features. You can

have one-on-one chats and group chats, have calls and conferences, and share lots of media. More information is

available here: https://w ww.ciscospark.com/.

Q. When using automation and scripting tools such as PowerTool (PowerShell) or Python for Cisco UCS

automation, the target can be Cisco UCS Manager or Cisco UCS Director (to handle more than just one

Cisco UCS domain), right?

A. The Cisco UCS Pow erTool and Python can be used against Cisco UCS Manager, Central, and IMC. Cisco UCS

Director has a REST API, but no Pow erShell modules yet.

Q. Are there any plans to develop more data objects w ithin the Meraki API (for example, percentage CPU,

temperature, number of associated clients on an access point, and so on)?

A. Extending the APIs is a key part of every product roadmap at Cisco. Specif ic details about w hat is coming and

w hen w ould need to come from product management.

Q. How can I send APIs to NX-OS or to the Cisco UCS system?

A. NX-OS offers tw o main APIs: NX-API and NETCONF/YANG. Learn more by visiting these links:

https://developer.cisco.com/site/nx-api/

https://developer.cisco.com/site/nx-os/

Cisco UCS offers an XML API: https://developer.cisco.com/site/ucs-dev-center/docs/.

Page 4: TechWiseTV Workshop: Q&A Cisco Developer Program

© 2017 Cisco and/or its affiliates. All rights reserv ed. This document is Cisco Public. Page 4 of 4

Q. What training would you recommend to get started with programmability, SDNs , and APIs?

A. In particular, probably the DevNet Express for DNA, netw ork programmability ones, and maybe the DevNet

beginner tracks. Learn more here: https://learninglabs.cisco.com/tracks.

Q. I have been trying to import a config-all xml, which I backed up from an existing Cisco UCS pod. The

Cisco UCS PE shows successful import, but I don't end up with any hardware items.

A. Cisco UCS PE hardw are needs to be configured via the Cisco UCS PE interface. A config-all is the only logical

configuration that can be placed onto the Cisco UCS PE emulated hardw are.

Q. Can we use the user friend name when using the API rather than a unique number system? A. No, you w ill f irst need to take the user name and query for the UUID associated to that user. In Cisco Spark, you

can use an email address as w ell: https://developer.ciscospark.com/endpoint-messages-post.html.

Q. Is Cisco Meraki the same as Luis.ai or WIT.ai?

A. They aren't too similar. Meraki is a netw ork and endpoint management tool and orchestrator. It does not have to do w ith natural language processing.

Q. My Cisco UCS pod is running 2.2(7d), so I tried a Cisco UCS PE 2.2(5a), which is the closest I could find,

but I still had the same results.

A. While there is no API for Cisco UCS PE hardw are configuration, you can point the Cisco UCS PE at a running

Cisco UCS instance, and it w ill import all the hardw are from the live Cisco UCS instance.

Q. How can I communicate w ith the NX-OS device to send API codes? Is there any recommended third-

party program to do so such as Postman?

A. Postman is an excellent tool to use if you're just starting. APIs are RESTful, so you can call them

programmatically w ith any language that supports RESTFUL API calls.