HewlettPackard/hpe-onesphere-python

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Python Language Binding for HPE OneSphere APIs

The Python language binding package for Python developers to call HPE OneSphere APIs

Prerequisites

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
Usage

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()
APIs

All the APIs return data in JSON format the same as those returned from HPE OneSphere composable APIs.

Not Implemented Yet

Some APIs are not yet implemented. The following message will be returned in this case.

Example:

essionIdp is not implemented yet.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.