Name: hpe-onesphere-go
Owner: Hewlett Packard Enterprise
Description: null
Created: 2017-12-04 17:36:26.0
Updated: 2018-03-02 01:20:55.0
Pushed: 2018-02-23 06:50:35.0
Homepage: null
Size: 25
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
The GO language binding package for GO developers to call HPE OneSphere APIs
go1.9.2 and above. You can install the latest version from:
s://golang.org/dl/
Copy the onesphere folder into your GO project folder.
Example:
age main
rt (
osbinding "./onesphere"
"fmt"
main() {
osbinding.Connect("https://onesphere-host-url", "username", "password")
fmt.Println("Token:", osbinding.Token)
fmt.Println("Status:", osbinding.GetStatus())
fmt.Println("Session:", osbinding.GetSession("full"))
fmt.Println("Account:", osbinding.GetAccount("full"))
fmt.Println("ProviderTypes:", osbinding.GetProviderTypes())
fmt.Println("ZoneTypes:", osbinding.GetZoneTypes())
fmt.Println("ServiceTypes:", osbinding.GetServiceTypes())
fmt.Println("Roles:", osbinding.GetRoles())
fmt.Println("Users:", osbinding.GetUsers())
fmt.Println("TagKeys:", osbinding.GetTagKeys("full"))
fmt.Println("Tags:", osbinding.GetTags("full"))
osbinding.Disconnect()
All the APIs return data in JSON format the same as those returned from HPE OneSphere composable APIs.
Some APIs are not yet implemented.