fix: google e2不支持本地盘

This commit is contained in:
Qu Xuan
2020-02-07 16:08:28 +08:00
parent 158750373b
commit 5537648dc7
+3
View File
@@ -150,6 +150,9 @@ func (self *SGoogleGuestDriver) ValidateCreateData(ctx context.Context, userCred
if localDisk > 8 {
return nil, httperrors.NewInputParameterError("%s disk cannot exceed 8", api.STORAGE_GOOGLE_LOCAL_SSD)
}
if localDisk > 0 && strings.HasPrefix(input.InstanceType, "e2") {
return nil, httperrors.NewNotSupportedError("%s for %s features are not compatible for creating instance", input.InstanceType, api.STORAGE_GOOGLE_LOCAL_SSD)
}
return input, nil
}