cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
31688
Views
0
Helpful
2
Replies

Automated Intersight Device Claim - ModuleNotFoundError

dszolucha
Level 1
Level 1

I am trying to use python script to auto claim 1000+ IMC servers with Intersight. I have followed Dave Soper article -  Automated Intersight Device Claim - Cisco Community  - Automated Intersight Device Claim - Cisco Community

 

I have cloned entire Automated Intersight Device Claim depository "intersight-python-master" to my local folder.

 

When I run the script in Git Bash:

py claim_device.py -a intersight_api_params -d devices

 

I am getting 2 different errors, depends on the path I use to run the script.

 

If I run it from "intersight-python-master" path:
I have error : ModuleNotFoundError: No module named 'device_connector' of

$ py claim_device.py -a intersight_api_params -d devices
Traceback (most recent call last):
File "claim_device.py", line 10, in
import device_connector
ModuleNotFoundError: No module named 'device_connector'

 

 

if I run in from intersight-python-master\examples path
I have a different error: No module named 'intersight.intersight_api_client'

$ py claim_device.py -a intersight_api_params -d devices
Traceback (most recent call last):
File "claim_device.py", line 8, in
from intersight.intersight_api_client import IntersightApiClient
ModuleNotFoundError: No module named 'intersight.intersight_api_client

 

$ python -V
Python 3.7.0


$ pip list
Package Version
certifi 2021.5.30
cffi 1.14.5
chardet 4.0.0
cryptography 3.4.7
idna 2.10
intersight 1.0.9.5808
pem 21.2.0
pip 22.0.4
pycparser 2.20
pycryptodome 3.14.1
pycryptodomex 3.14.1
PySimpleGUI 4.45.0
python-dateutil 2.8.2
requests 2.25.1
setuptools 62.0.0
six 1.16.0
tabulate 0.8.9
urllib3 1.26.5
wheel 0.37.1

 

Any help appreciated.

Derek

2 Replies 2

Brian Morrissey
Cisco Employee
Cisco Employee

See if the newer repo & examples help:

https://github.com/CiscoDevNet/intersight-python-utils/tree/master/config_targets

 

I think the CiscoUCS repo is being deprecated, could be the old examples not working with the new SDK

Sergiu.Daniluk
VIP Alumni
VIP Alumni

How did you installed intersight python module? From pip repository or github?

 

Thanks,

Sergiu