|
@@ -201,12 +201,18 @@ func BridgeFSHandlerToGroup(fsh *fs.FileSystemHandler, sp *storage.StoragePool)
|
|
|
}
|
|
|
|
|
|
func DebridgeFSHandlerFromGroup(fshUUID string, sp *storage.StoragePool) error {
|
|
|
+ isBridged, err := bridgeManager.IsBridgedFSH(fshUUID, sp.Owner)
|
|
|
+ if err != nil || !isBridged {
|
|
|
+ return errors.New("FSH not bridged")
|
|
|
+ }
|
|
|
+
|
|
|
newStorageList := []*fs.FileSystemHandler{}
|
|
|
fshExists := false
|
|
|
for _, fsh := range sp.Storages {
|
|
|
if fsh.UUID != fshUUID {
|
|
|
- fshExists = true
|
|
|
newStorageList = append(newStorageList, fsh)
|
|
|
+ } else {
|
|
|
+ fshExists = true
|
|
|
}
|
|
|
}
|
|
|
|