Closed bradawk1 closed 5 years ago
@bradawk1, You have opened this issue on the wrong repository.
Please refer the Python repository of OneView - https://github.com/HewlettPackard/python-hpOneView
Sorry, I put this in the wrong repository. I meant to put it in the OneView SDK for Python.
NP, Closing it, please open an issue on Python package.
Scenario/Intent
Just trying to understand the mechanics of starting to use the python OneView interface.
Environment Details
Steps to Reproduce
I've downloaded the sdk to ~/python-hpOneView. Not wanting to alter the sdk code, I created my working directory as ~/tasks and a ~/config.json with contents:
I ran python setup.py install --user I then copied one of the examples over to my tasks directory and edited it. Contents of server_hardware_types.py:
Expected Result
A listing of the server hardware types
Actual Result
Traceback (most recent call last): File "server_hardware_types.py", line 9, in
oneview_client = OneViewClient(config)
File "build/bdist.linux-x86_64/egg/hpOneView/oneview_client.py", line 124, in init
self.__connection = connection(config["ip"], config.get('api_version", self.DEFAULT_API_VERSION), config.get('ssl_certificate', False),
TypeError: string indices must be integers, not unicode
I've programmed in a lot of languages, but python is rather new to me. I'm not sure which indice it is referring to?