feat(xo-server/rest-api): export hosts' SMT status

Fixes https://xcp-ng.org/forum/post/71374
This commit is contained in:
Julien Fontanet 2024-02-20 16:29:57 +01:00
parent eedaca0195
commit 7fc5d62ca9
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,7 @@
- Disable search engine indexing via a `robots.txt`
- [Stats] Support format used by XAPI 23.31
- [REST API] Export host [SMT](https://en.wikipedia.org/wiki/Simultaneous_multithreading) status at `/hosts/:id/smt` [Forum#71374](https://xcp-ng.org/forum/post/71374)
### Bug fixes

View File

@ -253,6 +253,10 @@ export default class RestApi {
const host = req.xapiObject
res.json(await host.$xapi.listMissingPatches(host))
},
async smt({ xapiObject }, res) {
res.json({ enabled: await xapiObject.$xapi.isHyperThreadingEnabled(xapiObject.$id) })
},
}
collections.pools.routes = {