Skip to content

huoqifeng/golang-zhmcclient

 
 

Repository files navigation

golang-zhmcclient

zhmcclient - A golang client library for the IBM Z HMC Web Services API

Generate Fake APIs

cd ./pkg/zhmcclient
go get github.com/maxbrunsfeld/counterfeiter/v6
export COUNTERFEITER_NO_GENERATE_WARNING=true
go generate ./...

Build

make sample-build
make sample-build-mac
make sample-build-docker

Unit Test

# 'FILE' corresponds to the filename w/o .go extentsion
# 'PKG' package to be tested
# If only PKG is provided all files (go modules) under the package will be tested
make unit-test PKG=pkg/zhmcclient FILE=lpar

Sample Usage

make sample-build
export HMC_ENDPOINT="https://192.168.195.118:6794"
export HMC_USERNAME=${username}
export HMC_PASSWORD=${password}
./bin/sample

or

make sample-build-mac
export HMC_ENDPOINT="https://192.168.195.118:6794"
export HMC_USERNAME=${username}
export HMC_PASSWORD=${password}
./bin/sample-mac

Contributing

Third party contributions to this project are welcome!

In order to contribute, create a Git pull request, considering this:

  • Test is required.
  • Each commit should only contain one "logical" change.
  • A "logical" change should be put into one commit, and not split over multiple commits.
  • Large new features should be split into stages.
  • The commit message should not only summarize what you have done, but explain why the change is useful.
  • The commit message must follow the format explained below.

What comprises a "logical" change is subject to sound judgement. Sometimes, it makes sense to produce a set of commits for a feature (even if not large). For example, a first commit may introduce a (presumably) compatible API change without exploitation of that feature. With only this commit applied, it should be demonstrable that everything is still working as before. The next commit may be the exploitation of the feature in other components.

For further discussion of good and bad practices regarding commits, see:

License

The zhmcclient package is licensed under the Apache 2.0 License.

About

A GoLang client library for the IBM Z HMC Web Services API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.4%
  • Other 0.6%