The Cisco Intersight Account Reset Tool is designed to increase the efficiency of developers, engineers, sellers and trainers working with Cisco Intersight by automating the Intersight account reset process.
The Cisco Intersight Account Reset Tool will automatically remove any devices, profiles, policies and/or users created under an Intersight account. By removing the burden of having to manually reset accounts, the Cisco Intersight Account Reset Tool enables more time to be spent on other tasks. For developers and engineers building applications and platforms for Cisco Intersight, the development and testing process of new features is simplified. For sellers and trainers demonstrating the Cisco Intersight product, downtime between customer or student engagements is reduced. The Cisco Intersight Account Reset Tool also has the ability to exempt specified users and devices from the account reset process.
Use of the Cisco Intersight Account Reset Tool is at your own risk and intended for development, testing, demonstration and training environments. Please do not use on production systems.
- Python 3 installed, which can be downloaded from https://www.python.org/downloads/.
- The Cisco Intersight SDK for Python, which can be installed by running:
More information on the Cisco Intersight SDK for Python can be found at https://github.com/CiscoUcs/intersight-python.
pip install git+https://github.com/CiscoUcs/intersight-python.git
- An API key from your Intersight account. To learn how to generate an API key for your Intersight account, more information can be found at https://intersight.com/help/features#rest_apis.
- Please ensure that the above prerequisites have been met.
- Download the intersight_account_reset_tool.py file for the Cisco Intersight Account Reset Tool from here on GitHub.
- Edit the intersight_account_reset_tool.py file to set the key_id variable using the following instructions:
- Open the intersight_account_reset_tool.py file in an IDLE or text editor of choice.
- Find the comment "MODULE REQUIREMENT 1".
- Underneath, you will find the variable key_id = "". The variable is currently empty.
- Fill in between the quotes of the key_id variable value with the ID of your API key. For example:
key_id = "5c89885075646127773ec143/5c82fc477577712d3088eb2f/5c8987b17577712d302eaaff"
- Edit the intersight_account_reset_tool.py file to set the key variable using the following instructions:
- Open the intersight_account_reset_tool.py file in an IDLE or text editor of choice.
- Find the comment "MODULE REQUIREMENT 2".
- Underneath, you will find the variable key = "". The variable is currently empty.
- Fill in between the quotes of the key variable value with your system's file path to the SecretKey.txt file for your API key. For example:
key = "C:\\Keys\\Key1\\SecretKey.txt"
- Save the changes you have made to the intersight_account_reset_tool.py file.
- The intersight_account_reset_tool.py file is now ready for use. The file can be ran directly or as a script. See the "Options:" section for information on how to exempt specified users or devices under an Intersight account from the reset process.
The Cisco Intersight Account Reset Tool provides the ability to exempt specified users and devices from the Intersight account reset process. The following is a list of the exemptions and how to setup each:
-
User Exemptions - Excludes specified users from the Intersight account reset process.
- Open the intersight_account_reset_tool.py file in an IDLE or text editor of choice.
- Find the comment "MODULE OPTION 1 - User Exemptions".
- Underneath, you will find the list exempt_users = []. The list is currently empty.
- Fill in between the square brackets of the exempt_users list with the email address of any users that should not be removed by the Account Reset Tool. Each email address entry should be placed in single or double quotes and separated by a comma. The email address of the user that owns the API key will not be removed by default and is automatically exempted. Leave the list blank if there are no other user exemptions. Here is an example with entries for two user sample email addresses:
exempt_users = ["user1@email.com", "user2@email.com"]
-
Device Exemptions - Excludes specified devices from the Intersight account reset process.
- Open the intersight_account_reset_tool.py file in an IDLE or text editor of choice.
- Find the comment "MODULE OPTION 2 - Device Exemptions".
- Underneath, you will find the list exempt_devices = []. The list is currently empty.
- Fill in between the square brackets of the exempt_devices list with the hostname, product ID, or serial number of any devices that should not be removed by the Account Reset Tool. Each entry should be placed in single or double quotes and separated by a comma. If a hostname or product ID is entered, all devices sharing that same hostname or product ID will be exempted. For Cisco UCS domains with dual Fabric Interconnects, be sure to provide the serial number of each Fabric Interconnect individually. Leave the list blank if there are no device exemptions. Here is an example with entries for three devices using sample serial numbers:
exempt_devices = ["ABV1304000V", "EZL252770MU", "WIA344370GE"]
- Combinations of attributes for different devices can also be used as well for exemptions. Here is an example of three entries using a sample serial number for the first device, a sample hostname for the second device, and a product ID for any device that is a Cisco HyperFlex HX220c M5 All Flash server node:
exempt_devices = ["ABV1304000V", "hostname1@company.org", "HXAF220C-M5SX"]
The Cisco Intersight Account Reset Tool is a modified version of part of the automation solution used to support the following Cisco Data Center product demonstrations on Cisco dCloud:
- Cisco HyperFlex Edge 4.5 with Intersight v1 (All Flash, 2-Node)
- Cisco HyperFlex Edge 4.5 with Intersight v1 (Hybrid, 2-Node)
- Cisco HyperFlex Edge 4.5 with Intersight v1 (All Flash, 3-Node)
Cisco dCloud is available at https://dcloud.cisco.com, where product demonstrations and labs can be found in the Catalog.
Here are similar tools to help administer and manage Cisco Intersight.
- Cisco Intersight Universal API Calls
- HyperFlex Edge Automated Deployment Tool for Cisco Intersight
- HyperFlex Notification Tool for Cisco Intersight
Ugo Emekauwa