mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Quobyte API update **What this PR does / why we need it**: Quobyte vendor API update The current version supports both UUID/name of the volume for the storage class. **Release note**: ```release-note NONE ``` |
||
---|---|---|
.. | ||
BUILD | ||
LICENSE | ||
README.md | ||
quobyte.go | ||
rpc_client.go | ||
types.go |
README.md
Quobyte API Clients
Get the quobyte api client
go get github.com/quobyte/api
Usage
package main
import (
"log"
quobyte_api "github.com/quobyte/api"
)
func main() {
client := quobyte_api.NewQuobyteClient("http://apiserver:7860", "user", "password")
client.SetAPIRetryPolicy(quobyte_api.RetryInfinitely) // Default quobyte_api.RetryInteractive
req := &quobyte_api.CreateVolumeRequest{
Name: "MyVolume",
RootUserID: "root",
RootGroupID: "root",
ConfigurationName: "BASE",
}
volumeUUID, err := client.CreateVolume(req)
if err != nil {
log.Fatalf("Error:", err)
}
log.Printf("%s", volumeUUID)
}