Name: hpe-onesphere-python
Owner: Hewlett Packard Enterprise
Description: null
Created: 2017-12-04 17:36:07.0
Updated: 2018-03-02 01:21:18.0
Pushed: 2018-02-23 05:58:44.0
Homepage: null
Size: 34
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The Python language binding package for Python developers to call HPE OneSphere APIs
Python 3.5.2 and above, or Python 2.7.x. You can install the latest version from:
s://www.python.org/downloads/
Install the Requests package
://docs.python-requests.org/en/master/user/install/
or
pip install requests
Copy the onesphere into your Python project folder.
Example:
rt json
r Python 2 (2.7.x and above), import the onesphere.osbinding2
r Python 3 (3.5.2 and above), import the onesphere.osbinding3
rt onesphere.osbinding3 as osb
run():
osinst = osb.OSClient('https://onesphere-host-url', 'username', 'password')
print("GetStatus: " + json.dumps(osinst.GetStatus()))
print("GetConnectApp: " + json.dumps(osinst.GetConnectApp("windows")))
print("GetSession: " + json.dumps(osinst.GetSession()))
print("GetAccount: " + json.dumps(osinst.GetAccount()))
print("GetProviderTypes: " + json.dumps(osinst.GetProviderTypes()))
print("GetZoneTypes: " + json.dumps(osinst.GetZoneTypes()))
print("GetServiceTypes: " + json.dumps(osinst.GetServiceTypes()))
print("GetRoles: " + json.dumps(osinst.GetRoles()))
print("GetUsers: " + json.dumps(osinst.GetUsers()))
print("GetTagKeys: " + json.dumps(osinst.GetTagKeys()))
print("GetTags: " + json.dumps(osinst.GetTags()))
del osinst
_name__ == '__main__':
run()
All the APIs return data in JSON format the same as those returned from HPE OneSphere composable APIs.
Some APIs are not yet implemented. The following message will be returned in this case.
Example:
essionIdp is not implemented yet.