feat(xen-api): work-around empty VBD#VDI XenServer issue (#3950)

This commit is contained in:
Julien Fontanet
2019-02-07 16:44:42 +01:00
committed by GitHub
parent 37af47ecff
commit 29b941868d
2 changed files with 6 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
### Enhancements
- [Home] Set description on bulk snapshot [#3925](https://github.com/vatesfr/xen-orchestra/issues/3925) (PR [#3933](https://github.com/vatesfr/xen-orchestra/pull/3933))
- Work-around the XenServer issue when `VBD#VDI` is an empty string instead of an opaque reference (PR [#3950](https://github.com/vatesfr/xen-orchestra/pull/3950))
### Bug fixes
@@ -15,6 +16,7 @@
### Released packages
- xen-api v0.24.2
- @xen-orchestra/fs v0.6.1
- xo-server-auth-saml v0.5.3
- xo-server v5.35.0

View File

@@ -1097,7 +1097,10 @@ export class Xapi extends EventEmitter {
props[`update_${field}`] = function(entries) {
return xapi.setFieldEntries(this, field, entries)
}
} else if (isOpaqueRef(value)) {
} else if (value === '' || isOpaqueRef(value)) {
// 2019-02-07 - JFT: even if `value` should not be an empty string for
// a ref property, an user had the case on XenServer 7.0 on the CD VBD
// of a VM created by XenCenter
getters[$field] = function() {
return objectsByRef[this[field]]
}