Inventory Utilities #1640
Quali-Community
started this conversation in
Integrations
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Inventory Utilities
The purpose of this utility is to assist in common inventory tasks related to CloudShell.
It is driven by a python script and an associated Excel file.
Repository
Latest Release
README.md
Name
Inventory-Utilities
Owner
QualiSystemsLab
Type
Script
Category
Other
Min. Compatible CloudShell Version
8.0
Link
1.0.0
(Version / Tag)
TAR / ZIP
1.0.0 (TAR)
1.0.0 (ZIP)
Author
kalsky
Published On
09/10/2018 07:42 PM
Inventory Utilities
The purpose of this utility is to assist in common inventory tasks related to CloudShell.
It is driven by a python script and an associated Excel file.
The Excel file contains a number of tabs, each associate with a different function, along with an instructions tab, and a configuration tab.
You must ensure that the settings tab on the Excel file is filled out and correct prior to running the script.
The Excel file must reside in the same working folder as the script, and must be named 'Inventory.xlsx'
Settings Tab
There are a series of settings that need to be configured prior to running the script:
Installation
Executing
In your command line, navigate to the folder and run the python script: 'python inventory_utilities.py'
You will be presented with 9 options, plus the option to exit:
Options
Create and Autoload
The primary purpose of this function is to create a new, or update and existing, inventory item in CloudShell.
The Create and Autoload option will use the '1-CreateAndAutoLoad' tab in the Excel file.
The following columns are used in this tab:
Set Attributes
The primary purpose of this function is to set attribute values associated with a device, attributes not associated with the autoload.
This allows for the complete set of details to be set on the device when added to inventory.
Can also be used to update large sets of attribute values, such as updating 'enable password'.
The Set Attributes option will use the '2-SetAttributes' tab in the Excel file.
The following columns are used in this tab:
Set Connections
The primary purpose of this function is to set the connection map on a devices' sub-resource (Ports).
The Set Connections option will use the '3-SetConnections' tab in the Excel file.
This allows for an easy way to set or update existing connections on a device.
You should avoid putting in non-connectible device names into the Excel File. Ideally it should just be the connectable device names.
The following columns are used in this tab:
Bulk Load
This function will automatically run the following options in order:
This is designed to be an 'Easy Button' to preform the 3 major actions needed to completely load a new device into CloudShell.
Add Custom Attributes
The primary purpose of this function is to add new attributes to 2nd Gen Shells.
Currently there are two ways to do this, either via API (as done here), or to modify the 'shell-definition.yaml' file.
The Add Custom Attributes option will use the '0-AddCustomAttributes' tab in the Excel file.
If any of these attributes are included used by the 'Set Attributes' option, this needs to be ran first.
The following columns are used in this tab:
List Connections
The primary purpose of this function is to examine and capture all of a devices sub-modules (blades, ports, etc) and report what it's current connection is.
The List Connections option will use the '4-ListConnections' tab in the Excel file.
This function will generate (or overwrite) a file named current_connection.csv which will list out for each device the entire structure in the first column, and any mapped connections in the second.
Ideal use would be to then copy & paste the child names needed into the 'SetConnections' tab.
This ensures that all devices names are correct, and generally speeds the process.
The following columns are used in this tab:
Generate Inventory List
The primary purpose of this function is to provide a current list of all inventory in the system, organized by Family/Model.
There is no tab in the spreadsheet used.
This function will generate a .csv name 'inventory_report_YYYY_MM_DD_HH_MM.csv'
The report contains the following column headers:
Generate User List
The primary purpose of this function is to provide a current list of all users in the system.
There is no tab in the spreadsheet used.
This function will generate a .csv name 'user_report_YYYY_MM_DD_HH_MM.csv'
The report contains the following column headers:
Update Users
The primary purpose of this function is to allow basic user management in bulk.
The focus here is changing user status (Active/Admin), what Groups they are assigned to (access to equipment), reservation limitations (duration and max concurrent ownership).
Updating email is also allowed.
The Update Users option will use the '5-UpdateUsers' tab in the Excel file.
The following columns are used in this tab:
* Please allow 30-60 seconds for manual update changes to take effect.
Yaniv Kalsky 09/10/2018 07:52 PM
· 3978 ·
Beta Was this translation helpful? Give feedback.
All reactions