feat(xo-server/RestApi): add networks, VBDs, VDIs and VIFs

This commit is contained in:
Julien Fontanet
2022-03-09 06:56:25 +01:00
parent 324ff44886
commit 756a206a9e
2 changed files with 7 additions and 1 deletions

View File

@@ -7,6 +7,8 @@
> Users must be able to say: “Nice enhancement, I'm eager to test it”
- [REST API] Expose networks, VBDs, VDIs and VIFs
### Bug fixes
> Users must be able to say: “I had this issue, happy to know it's fixed”

View File

@@ -75,9 +75,13 @@ export default class RestApi {
const collections = [
{ id: 'hosts', type: 'host' },
{ id: 'networks', type: 'network' },
{ id: 'pools', type: 'pool' },
{ id: 'vms', type: 'VM' },
{ id: 'srs', type: 'SR' },
{ id: 'vbds', type: 'VBD' },
{ id: 'vdis', type: 'VDI' },
{ id: 'vifs', type: 'VIF' },
{ id: 'vms', type: 'VM' },
]
api.get('/', (req, res) => sendObjects(collections, req, res))