Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Merge 8a8194e into 0bacfe3
Browse files Browse the repository at this point in the history
  • Loading branch information
phlogistonjohn committed Feb 7, 2019
2 parents 0bacfe3 + 8a8194e commit 7a097ad
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client/cli/go/cmds/heketi_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"encoding/json"
"fmt"
"os"
"strings"

client "github.com/heketi/heketi/client/api/go-client"
"github.com/heketi/heketi/pkg/db"
Expand Down Expand Up @@ -45,6 +46,7 @@ var (
heketiStorageListFilename string
heketiStorageDurability string
heketiStorageReplicaCount int
heketiStorageOptions string
)

func init() {
Expand All @@ -68,6 +70,11 @@ func init() {
3,
"\n\tOptional: Replica value for durability type 'replicate'."+
"\n\tDefault is 3")
setupHeketiStorageCommand.Flags().StringVar(&heketiStorageOptions,
"gluster-volume-options",
"",
"\n\tOptional: Comma separated list of volume options."+
"\n\tSee volume create --help for details.")
setupHeketiStorageCommand.SilenceUsage = true
}

Expand Down Expand Up @@ -129,6 +136,10 @@ func createHeketiStorageVolume(c *client.Client, dt api.DurabilityType, replicaC
req.Size = HeketiStorageVolumeSize
req.Name = db.HeketiStorageVolumeName
req.Durability.Type = dt
// Check volume options
if heketiStorageOptions != "" {
req.GlusterVolumeOptions = strings.Split(heketiStorageOptions, ",")
}

switch dt {
case api.DurabilityReplicate:
Expand Down

0 comments on commit 7a097ad

Please sign in to comment.