fix(xo-web/network): fix inability to create bonded network (#4489)

Fixes xoa-support#1725
This commit is contained in:
badrAZ
2019-09-05 13:39:31 +02:00
committed by Julien Fontanet
parent 03eb2d81f0
commit a6e1860f0d
2 changed files with 16 additions and 13 deletions

View File

@@ -15,6 +15,7 @@
- [PBD] Obfuscate cifs password from device config [#4384](https://github.com/vatesfr/xen-orchestra/issues/4384) (PR [#4401](https://github.com/vatesfr/xen-orchestra/pull/4401))
- [XOSAN] Fix "invalid parameters" error on creating a SR (PR [#4478](https://github.com/vatesfr/xen-orchestra/pull/4478))
- [Patching] Avoid overloading XCP-ng by reducing the frequency of yum update checks [#4358](https://github.com/vatesfr/xen-orchestra/issues/4358) (PR [#4477](https://github.com/vatesfr/xen-orchestra/pull/4477))
- [Network] Fix inability to create a bonded network (PR [#4489](https://github.com/vatesfr/xen-orchestra/pull/4489))
> Users must be able to say: “I had this issue, happy to know it's fixed”

View File

@@ -188,12 +188,6 @@ const NewNetwork = decorate([
pifs,
vlan,
} = state
const poolIds = [pool.id]
const pifIds = [pif.id]
for (const network of networks) {
poolIds.push(network.pool.id)
pifIds.push(network.pif.id)
}
return bonded
? createBondedNetwork({
bondMode: bondMode.value,
@@ -205,13 +199,21 @@ const NewNetwork = decorate([
})
: isPrivate
? networks.length > 0
? createCrossPoolPrivateNetwork({
xoPoolIds: poolIds,
networkName: name,
networkDescription: description,
encapsulation: encapsulation,
xoPifIds: pifIds,
})
? (() => {
const poolIds = [pool.id]
const pifIds = [pif.id]
for (const network of networks) {
poolIds.push(network.pool.id)
pifIds.push(network.pif.id)
}
return createCrossPoolPrivateNetwork({
xoPoolIds: poolIds,
networkName: name,
networkDescription: description,
encapsulation: encapsulation,
xoPifIds: pifIds,
})
})()
: createPrivateNetwork({
poolId: pool.id,
networkName: name,