Welcome¶
Welcome to Nutanix Python Reporting Lab - v1.0.
Difficulty level (1-5 stars):
Intended Audience¶
The information in this setup lab is intended for those looking to create a Python 3 and HTML reporting script that integrates with the Nutanix REST APIs.
Note
It is highly recommended that those new to software development or scripting follow the Nutanix Dev Setup Quick Lab before completing this lab.
What We Are Doing¶
The Nutanix Python Reporting Lab will cover a few key points.
Python + Nutanix API Intro
Creation of a Prism Central HTML report generator, via Prism Central API
What We Aren’t Doing¶
This lab is not intended as a ‘how to learn Python’ guide. While some exposure to Python development is certainly beneficial, lab attendees should be able to follow this lab without any prior exposure.
The resulting script has been written in a way that produces a modular & reusable structure, but would still need to be heavily modified for use in a production environment.
Assumptions¶
Those following this lab should be familiar with operating system operations, including the following:
Creating directories and folders in your chosen operating system
Creating new files (if using graphical tools, it is recommended this is done via your chosen code editor, e.g. Visual Studio Code, Sublime Text 3)
Note¶
This is one of the more detailed labs on the Nutanix Developer Portal. The entire script will be looked at, section by section.
Those with existing Python experience will be familiar with the intro/beginner sections; please feel free to skip over them, if this applies to you.
Requirements¶
To successfully complete this lab, you will need access to a suitable development environment. For example:
A suitable editor, e.g. Microsoft Visual Studio Code, Sublime Text 3 or equivalent
Prism Central 5.5.0.6 or later, on a Nutanix cluster running Acropolis 5.5 or later
Prism Central via the Nutanix demo system (for the Nutanix partner community)
Your development laptop/PC/VM will need Python >=3.6 or later installed. The lab script will not work with Python 2.x. Please see the Nutanix Dev Setup Quick Lab for detailed instructions on setting up your PC/laptop for these labs.
‘pip’ version appropriate for use with Python 3.7
Please note this script is not intended for use with Nutanix Community Edition.
Note
Using built-in editors such as Text Editor on OS X is not recommended. This is because there are often default settings that prevent copy/paste operations from completing successfully. Please do use an editor designed for code, such as those mentioned above.
Cluster Details¶
Although many Nutanix Developer labs can be run in a presenter-led environment, this quick lab is aimed to be run at your own pace and in your own environment.
No specific configuration is required beyond a Nutanix cluster as outlined above, with that cluster already connected to Prism Central 5.5 or later.