fix(xo-server/config): configure plugins on config import (#6171)
See https://xcp-ng.org/forum/topic/5720/ztp-restore-xoa-from-backup
This commit is contained in:
parent
3ab2dad19b
commit
ee47a361b1
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||||
|
|
||||||
|
- [Plugins] Automatically configure plugins when a configuration file is imported (PR [#6171](https://github.com/vatesfr/xen-orchestra/pull/6171))
|
||||||
|
|
||||||
### Packages to release
|
### Packages to release
|
||||||
|
|
||||||
> Packages will be released in the order they are here, therefore, they should
|
> Packages will be released in the order they are here, therefore, they should
|
||||||
@ -30,3 +32,4 @@
|
|||||||
|
|
||||||
- xen-api minor
|
- xen-api minor
|
||||||
- @xen-orchestra/proxy patch
|
- @xen-orchestra/proxy patch
|
||||||
|
- xo-server patch
|
||||||
|
@ -27,7 +27,15 @@ export default class {
|
|||||||
app.addConfigManager(
|
app.addConfigManager(
|
||||||
'plugins',
|
'plugins',
|
||||||
() => this._pluginsMetadata.get(),
|
() => this._pluginsMetadata.get(),
|
||||||
plugins => Promise.all(plugins.map(plugin => this._pluginsMetadata.save(plugin)))
|
plugins =>
|
||||||
|
Promise.all(
|
||||||
|
plugins.map(async plugin => {
|
||||||
|
await this._pluginsMetadata.save(plugin)
|
||||||
|
if (plugin.configuration !== undefined && this._plugins[plugin.id] !== undefined) {
|
||||||
|
await this.configurePlugin(plugin.id, plugin.configuration)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user