check snapshot feature

This commit is contained in:
Seungcheol Ko
2018-08-09 22:07:13 +09:00
parent 4312907f7b
commit 38aa575925
2 changed files with 14 additions and 0 deletions

View File

@ -254,6 +254,16 @@ func getRBDSnapshotOptions(snapOptions map[string]string) (*rbdSnapshot, error)
return rbdSnap, nil
}
func hasSnapshotFeature(imageFeatures string) bool {
arr := strings.Split(imageFeatures, ",")
for _, f := range arr {
if f == "layering" {
return true
}
}
return false
}
func attachRBDImage(volOptions *rbdVolume, userId string, credentials map[string]string) (string, error) {
var err error
var output []byte