Add StorageOS volume plugin

This commit is contained in:
Simon Croome
2017-02-24 15:47:40 +00:00
parent 810efa6689
commit 5e2503e71f
113 changed files with 15630 additions and 3205 deletions

16
vendor/github.com/storageos/go-api/util.go generated vendored Normal file
View File

@@ -0,0 +1,16 @@
package storageos
import (
"fmt"
"strings"
)
// ParseRef is a helper to split out the namespace and name from a path
// reference.
func ParseRef(ref string) (namespace string, name string, err error) {
parts := strings.Split(ref, "/")
if len(parts) != 2 {
return "", "", fmt.Errorf("Name must be prefixed with <namespace>/")
}
return parts[0], parts[1], nil
}