fix(Xapi#canSrHaveNewVdiOfSize): better content_type check (#573)

Fixes vatesfr/xo-web#2215
This commit is contained in:
Pierre Donias 2017-06-13 09:25:59 +02:00 committed by Julien Fontanet
parent a4ab8e712d
commit 23ce94fdae

View File

@ -353,4 +353,8 @@ export const useUpdateSystem = host => {
} }
export const canSrHaveNewVdiOfSize = (sr, minSize) => export const canSrHaveNewVdiOfSize = (sr, minSize) =>
sr != null && sr.content_type === 'user' && sr.physical_size - sr.physical_utilisation >= minSize sr != null &&
// content_type values are not documented: this may be incorrect
sr.content_type !== 'disk' && // removable
sr.content_type !== 'iso' && // read only
sr.physical_size - sr.physical_utilisation >= minSize