HewlettPackard / oneview-redfish-toolkit

HPE OneView Redfish Toolkit provides a REST service to answer DMTF's Redfish compliant requests by querying HPE OneView
Apache License 2.0
18 stars 21 forks source link

Retrieve Service Root UUID from OneView's appliance #42

Closed ricardoas closed 7 years ago

ricardoas commented 7 years ago

As oneview-redfish-toolkit user, I point to http://host:port/redfish/v1 to retrieve ServiceRoot information whose UUID is equivalent to the UUID from the queried OneView's appliance.

ricardoas commented 7 years ago

With the launch of version 4.1.0 of python-hpOneView we can now query the appliance info and retrieve use its UUID. There is an example of how to do that here!

ffdarkpenguin commented 7 years ago

pip install --upgrade hpOneView Collecting hpOneView Requirement already up-to-date: future>=0.15.2 in ./redfish-venv/lib/python3.4/site-packages (from hpOneView) Installing collected packages: hpOneView Found existing installation: hpOneView 4.0.0 Uninstalling hpOneView-4.0.0: Successfully uninstalled hpOneView-4.0.0 Successfully installed hpOneView-4.1.0

./teste.py hpOneView version: 3.3.0 Traceback (most recent call last): File "./teste.py", line 24, in pprint(ov_conn.appliance_node_information.get_status()) AttributeError: 'OneViewClient' object has no attribute 'appliance_node_information'

teste.py: from pprint import pprint import hpOneView from hpOneView.oneview_client import OneViewClient from hpOneView.exceptions import HPOneViewException

config = { 'ip': 'ov-ff', 'api_version': 300, 'credentials': { 'userName': 'administrator', 'password': 'ff123123' } }

print('hpOneView version: {}'.format(hpOneView.version)) ov_conn = OneViewClient(config) pprint(ov_conn.appliance_node_information.get_status())

ffdarkpenguin commented 7 years ago

it was a problem in my environment. ignore the error.