{"id":19546037,"url":"https://github.com/hewlettpackard/oneview-golang","last_synced_at":"2025-04-26T19:32:13.606Z","repository":{"id":1996367,"uuid":"43533919","full_name":"HewlettPackard/oneview-golang","owner":"HewlettPackard","description":"Golang bindings for OneView api's","archived":false,"fork":false,"pushed_at":"2025-03-26T05:39:46.000Z","size":7646,"stargazers_count":27,"open_issues_count":6,"forks_count":20,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-04T17:37:07.587Z","etag":null,"topics":["composable-architecture","golang","hpe-image-streamer","hpe-oneview","infrastructure-as-code","oneview-api","oneview-client","oneview-golang","synergy"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HewlettPackard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-02T03:19:41.000Z","updated_at":"2025-03-26T05:39:35.000Z","dependencies_parsed_at":"2024-02-27T05:28:15.203Z","dependency_job_id":"9aa19aa9-4d2a-4085-95d3-111056ae5840","html_url":"https://github.com/HewlettPackard/oneview-golang","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HewlettPackard%2Foneview-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HewlettPackard%2Foneview-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HewlettPackard%2Foneview-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HewlettPackard%2Foneview-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HewlettPackard","download_url":"https://codeload.github.com/HewlettPackard/oneview-golang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251041505,"owners_count":21527208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composable-architecture","golang","hpe-image-streamer","hpe-oneview","infrastructure-as-code","oneview-api","oneview-client","oneview-golang","synergy"],"created_at":"2024-11-11T03:42:47.524Z","updated_at":"2025-04-26T19:32:08.597Z","avatar_url":"https://github.com/HewlettPackard.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HPE OneView SDK for GoLang\n\n## Build Status \n|      OV Version | 9.20 | 9.10 |  9.00 | 8.90  |8.80  | 8.70 | 8.60 | 8.50 | 8.40 |  8.30|  8.20|  8.10|   8.00|  7.20|   7.10|   7.00 |   6.60 |   6.50 |  6.40 | 6.30 |  6.20 | 6.10 | 6.00 |\n| -------------: |  -------------: |  -------------: |  -------------: |  --------------:| --------------:| --------------:| --------------: |--------------: |--------------: |  -----------: |-----------: | ------------: | -------------: |-----------: | ----------: |-----------: |-----------: | -----------: |-----------: |-----------: |-----------: |-----------: |-----------: |\n| SDK Version/Tag |[v9.2.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/9.2.0)|[v9.1.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/9.1.0)|[v9.0.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/9.0.0)|[v8.9.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.9.0)|[v8.8.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.8.0)|[v8.7.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.7.0)|[v8.6.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.6.0)|[v8.5.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.5.0)|[v8.4.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.4.0)|  [v8.3.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.3.0) |  [v8.2.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.2.0)|  [v8.1.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.1.0) |  [v8.0.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v8.0.0) |  [v7.2.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v7.2.0) |  [v7.1.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v7.1.0) |   [v7.0.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v7.0.0)|   [v6.6.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.6.0)|   [v6.5.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.5.0) |  [v6.4.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.4.0) |  [v6.3.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.3.0) |  [v6.2.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.2.0) |  [v6.1.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.1.0) | [v6.0.0](https://github.com/HewlettPackard/oneview-golang/releases/tag/v6.0.0) |\n|    Build Status  |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/11390506472)|[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/10714234089)|[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/8918939284)|[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/8815149994)|[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/8155057510) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/7462504443) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/6569616388) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/5841518992) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/5332373278) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/4373178855) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/3655352317)|[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/3426806672)|[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/2977426178) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/2514847697) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/2014176911) |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/2007977274)  |[![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/1675861580) | [![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/1675861580) | [![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/1394488243) | [![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/1212617100) | [![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/998462546) | [![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/789405541) | [![Build status](https://github.com/HewlettPackard/oneview-golang/actions/workflows/ci.yml/badge.svg)](https://github.com/HewlettPackard/oneview-golang/actions/runs/638584153) |\n## Introduction\n\nHPE OneView makes it simple to deploy and manage today’s complex hybrid cloud infrastructure. HPE OneView can help you transform your data center to software-defined, and it supports HPE’s broad portfolio of servers, storage, and networking solutions, ensuring the simple and automated management of your hybrid infrastructure. Software-defined intelligence enables a template-driven approach for deploying, provisioning, updating, and integrating compute, storage, and networking infrastructure.\n\nThe HPE OneView Go SDK provides library to easily interact with HPE OneView. The HPE OneView Go SDK enables developers to easily build integrations and scalable solutions with HPE OneView.\n\nYou can find the latest supported HPE OneView Go SDK [here](https://github.com/HewlettPackard/oneview-golang/releases/latest)\n\n## What's New\n\nHPE OneView Go library extends support of the SDK to OneView REST API version 7000 (OneView v9.20)\n\nPlease refer to [notes](https://github.com/HewlettPackard/oneview-golang/blob/master/CHANGELOG.md) for more information on the changes , features supported and issues fixed in this version\n\n### HPE Synergy Image Streamer\n\nFrom Release 8.1, Image streamer is no longer supported.\n\n## Getting Started \n\n## Installation and Configuration\n\n## Installation\nHPE OneView SDK for Go can be installed from Source or Docker container installation methods. You can either use a docker container which will have the HPE OneView SDK for Go installed or perform local installation.\n\n###  Docker Setup\nThe light weight containerized version of the HPE OneView SDK for Go is available in the [Docker Store](https://hub.docker.com/r/hewlettpackardenterprise/hpe-oneview-sdk-for-golang). The Docker Store image tag consist of two sections: \u003csdk_version-OV_version\u003e\n\n```bash\n# Download and store a local copy of oneview-golang and use it as a Docker Image.\n$ docker pull hewlettpackardenterprise/hpe-oneview-sdk-for-golang:v9.2.0-OV9.2\n# Run docker commands below given, which  will in turn create a sh session \n# where you can create files, issue commands and execute the examples.\n$ docker run -it hewlettpackardenterprise/hpe-oneview-sdk-for-golang:v9.2.0-OV9.2 /bin/sh\n```\n\n### Local Setup\n\n- Local installation requires Installing Go\n\n```bash \n# Install the dependent packages\n$ apt-get install build-essential git wget\n$ wget https://dl.google.com/go/go1.15.2.linux-amd64.tar.gz\n```\n\n```bash \n# untar with \"tar -zxvf go1.15.2.linux-amd64.tar.gz\"\n# move go/ to /usr/local/ \n# mv go1.15.2.linux-amd64.tar.gz /usr/local/ \n# mkdir ~/go\n```\n\n```bash \n# Setting GO Environment Variable and adding the GO installed directory to PATH \n$ export GOROOT=/usr/local/go\n$ export GOPATH=$HOME/go \n$ export PATH=$PATH:$GOROOT/bin:$GOPATH/bin\n```\n\n```go\n# Install Oneview Go SDK\n$ go get -u github.com/HewlettPackard/oneview-golang \n```\n\n## Configuration\n\n### Environment Variables\n\n```bash\n# Required\n$ export ONEVIEW_OV_ENDPOINT=\u003cov_endpoint\u003e\n$ export ONEVIEW_OV_USER=\u003cov_username\u003e\n$ export ONEVIEW_OV_PASSWORD=\u003cov_password\u003e\n$ export ONEVIEW_OV_DOMAIN=LOCAL\n$ export ONEVIEW_SSLVERIFY=false\n$ export ONEVIEW_APIVERSION=\u003cov_apiversion\u003e\n```\nNote: Currently this SDK supports OneView API 5200 minimally, where we can test OneView API 5200 version with this SDK. If API version is not provided then appliance's API version will be used. If API version used is not supported then error will be thrown.\n\n### OneView Client Configuration\n\nThe OneView Client configuration options that can be passed during OneView Client object creation:\n\n```go\n# Create a OneView client object:\nimport \"github.com/HewlettPackard/oneview-golang/ov\"\n\nvar ClientOV    *ov.OVClient\napiversion, _ := strconv.Atoi(os.Getenv(\"ONEVIEW_APIVERSION\"))\n\novc := ClientOV.NewOVClient(\n  os.Getenv(\"ONEVIEW_OV_USER\"),      # This is to set the Oneview UserName\n  os.Getenv(\"ONEVIEW_OV_PASSWORD\"),  # This is to set the Oneview Password\n  os.Getenv(\"ONEVIEW_OV_DOMAIN\"),    # This is to set the Domain, default is LOCAL\n  os.Getenv(\"ONEVIEW_OV_ENDPOINT\"),  # This is to set the IP Address of the Oneview Appliance\n  false,                             # This is to set the SSL, default is false\n  apiversion,                        # This is to set OV REST API Version. Defaults to OneView Max supported REST API Version.\n    \"*\")                              \n```\n\n:lock: Tip: Check the file permissions because the password is stored in clear-text.\n\n### Configuration Files\n\nConfiguration files can also be used to define client configuration (json or yaml formats). Here's an example json file:\n\n```json\n# oneview_config.json\n{\n  \"username\":     \"\u003cov_username\u003e\",  \n  \"password\":     \"\u003cov_password\u003e\",\n  \"endpoint\":     \"\u003cov_ip\u003e\",\n  \"domain\":       \"LOCAL\",\n  \"apiversion\":   \"\u003cov_apiversion\u003e\",\n  \"sslverify\":    false,\n  \"ifmatch\":      \"*\"\n}\n```\n\nand load via:\n\n```go\n# Create a OneView client object:\nimport \t\"github.com/HewlettPackard/oneview-golang/ov\"\n\nvar\tClientOV    *ov.OVClient\nconfig, _ := ov.LoadConfigFile(\"oneview_config.json\")\n\novc := ClientOV.NewOVClient(\n  config.UserName,       # This is to set the Oneview UserName\n  config.Password,       # This is to set the Oneview Password\n  config.Domain,         # This is to set the Domain, default is LOCAL\n  config.Endpoint,       # This is to set the IP Address of the \n  config.SslVerify,      # This is to set the SSL, default is false\n  config.ApiVersion,     # This is to set OV REST API Version. Defaults to OneView Max supported REST API Version.\n  config.IfMatch)\n```\n:lock: Tip: Check the file permissions if the password or token is stored in clear-text.\n\n## API Implementation\n\nA detailed list of the HPE OneView REST interfaces that have been implemented in this SDK can be found in the [endpoints-support.md](https://github.com/HewlettPackard/oneview-golang/blob/master/endpoints-support.md) file.\n\n\n## Getting Help \n\nAre you running into a road block? Have an issue with unexpected behavior? Feel free to open a new issue on the [issue tracker](https://github.com/HewlettPackard/oneview-golang/issues/new)\n\n## License\nThis project is licensed under the Apache 2.0 license. Please see [LICENSE](LICENSE) for more info.\n\n## Contributing and feature requests\n\nWe welcome your contributions to the HPE OneView for Go SDK library. \n\n**Contributing:** You know the drill. Fork it, branch it, change it, commit it, and pull-request it.\nWe are passionate about improving this project, and glad to accept help to make it better.\nFor more information refer [CONTRIBUTING.md](https://github.com/HewlettPackard/oneview-golang/blob/master/CONTRIBUTING.md) file.\n\nNOTE: We reserve the right to reject changes that we feel do not fit the scope of this project, so for feature additions, please open an issue to discuss your ideas before doing the work.\n\n**Feature Requests:** If you have a need that is not met by the current implementation, please let us know opening an new enhancement request/issue.\nThis feedback is important for us to deliver a useful product. \n\n\n## Testing your changes\n\nWe use docker to build and test, run this project on a system that has docker. If you don't use docker, you will need to install and setup go-lang locally as well as any other make requirements.  \n\nYou can use `USE_CONTAINER=false` environment setting for make to avoid using docker. Otherwise make sure to have these tools:\n- docker client and daemon\n- gnu make tools\n\nThe Tests in GoLang are divided into two segments one is doing the acceptance test and another drives the Unit Tests.\n\n#### With Docker\n```\n$ make test\n```\n\n#### Without docker\n* Install golang 1.5 or higher(We recommend using Go 1.15)\n* Install go packages listed in .travis.yml\n\nThe Test Data for these Tests are  supplied through JSON file stored at `test/data for example config_EGSL_tb200.json`\n\nThese Tests can be run locally, you must install the below dependencies as mention in .travis.yml and do export USE_CONTAINER=false\n\n```go\n$ go get github.com/mattn/goveralls\n$ go get -u golang.org/x/lint/golint\n```\n\nThese Tests are using make files to save the compile time. Below are the commands to run the tests.\n\n```bash\n$ sudo make vet\n$ sudo make test-short\n$ sudo make test-long\n$ sudo make coverage-send\n```\n\nNote: ```$ make test``` runs all the above mentioned tests.\n\n## Additional Resources \n\n### HPE OneView Documentation\n\n[HPE OneView Release Notes](http://hpe.com/info/OneView/docs)\n\n[HPE OneView Support Matrix](http://hpe.com/info/OneView/docs)\n\n[HPE OneView Installation Guide](http://hpe.com/info/OneView/docs)\n\n[HPE OneView User Guide](http://hpe.com/info/OneView/docs)\n\n[HPE OneView Online Help](http://hpe.com/info/OneView/docs)\n\n[HPE OneView REST API Reference](http://hpe.com/info/OneView/docs)\n\n[HPE OneView Firmware Management White Paper](http://hpe.com/info/OneView/docs)\n\n[HPE OneView Deployment and Management White Paper](http://hpe.com/info/OneView/docs)\n\n### HPE OneView Community\n\n[HPE OneView Community Forums](http://hpe.com/info/oneviewcommunity)\n\nLearn more about HPE OneView at [hpe.com/info/oneview](https://hpe.com/info/oneview)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhewlettpackard%2Foneview-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhewlettpackard%2Foneview-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhewlettpackard%2Foneview-golang/lists"}