Skip to content

Commit

Permalink
Migrating codebase to support Python 2 and Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jtorasak committed Jan 22, 2020
1 parent cdc3b08 commit 5f8f28c
Show file tree
Hide file tree
Showing 4 changed files with 983 additions and 158 deletions.
10 changes: 7 additions & 3 deletions os-discovery-tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ total 468
## Setup Steps
---
### I. Pre-requisites/dependent components for setting up the Control Node
1. A Virtual/Physical Linux machine with access to your on-prem network. **We will call this the Control Node**. Ensure that you have the latest version of Python 2 (2.7 or later) installed.
- Note: This utility does not support Python 3.
1. A Virtual/Physical Linux machine with access to your on-prem network. **We will call this the Control Node**. Ensure that you have Python 3 (3.7 or later) installed.
- Note: Using Python 3 is highly recommended to run this utility. To continue using Python 2, use the get_linux_inv_to_intersight.py2 file.
2. **Generate Intersight API keys** with your user account from the Cisco Intersight GUI and use them as described in the next section.
3. **Install Intersight Python SDK**: Clone this repository on the **Control Node** as described below and follow the build instructions available here: https://github.com/CiscoUcs/intersight-python.
3. **Install Enum module**: Ensure Enum module is installed. If Enum module is not installed, you can install using:
```Bash
$ pip install enum34
```
4. **Install Intersight Python SDK**: Clone this repository on the **Control Node** as described below and follow the build instructions available here: https://github.com/CiscoUcs/intersight-python.
```Bash
$ git clone https://github.com/CiscoUcs/intersight-python.git
```
Expand Down
2 changes: 1 addition & 1 deletion os-discovery-tool/debian-os-name.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
cat /etc/lsb-release | grep VERSION | head -n1 | awk -F"=" '{print $2}' | xargs | awk '{print "Ubuntu "$1" "$2}'
cat /etc/*-release | grep VERSION | head -n1 | awk -F"=" '{print $2}' | xargs | awk '{print "Ubuntu "$1" "$2}'
Loading

0 comments on commit 5f8f28c

Please sign in to comment.