intersight_example

published

A prototype for anyone who wants to get started integrating with Intersight. Its based on the intersight_rest-Python library provided by Cisco.

Use Case Description

This tool builds a brief overview of the hardware known by intersight and presents it to the user. This tool should make the life easier for anyone who wants to build a brief overview of the hardware known by intersight, but its main purpose is to demonstrate how to get started integrating with Intersight.

Installation

these installation instructions assumes you have a python environment with python-pip installed.

pip install -r requirements.txt

Configuration

In order to get authentication set up, you need to add an API key to your intersight environment. See this link for information on how to get this done. Once you've downloaded the secret_key and the api_key, save those to individual files and reference them using environment variables as described below:

export INTERSIGHT_PRIVATE_KEY_PATH="./intersight/secret_key" // this would be the Secret key from Intersight
export INTERSIGHT_PUBLIC_KEY_PATH="./intersight/api_key" // this would be the API Key ID from Intersight

Usage

python intersight_example.py

DevNet resources

If you want to try this out in a demo-environment, have a look at the following resources

  1. Devnet Learning Labs
  2. DevNet Sandbox

Known issues

The intersight_rest module will not check the format of the supplied credentials on its, so we had to do that using pyopenssl
We've done a pretty lazy error handling on the Intersight query-method, so that should be extended before this prototype is used as a boiler plate
for something thats going into production.

Getting help

If you have questions, concerns, bug reports, etc., please create an issue against this repository.

Getting involved

This project is supposed to work as a tutorial on how to get started with Intersight. If you have any suggestions on what else to include, feel free to reach ut by creating an issue.


Licensing info

Copyright (c) 2020, Miradot AB

This code is licensed under the MIT License. See LICENSE for details.


Credits and references

  1. intersight_rest
View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Products

    Intersight
  • Programming Languages

    Python
  • License

    MIT License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.