From 9b2c56815b6f7ddebaa7fb4c17479a1960123043 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 16 Jul 2013 15:36:35 +0200 Subject: [PATCH] Various updates. --- src/api.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/api.js b/src/api.js index 47cf0de..8836b71 100644 --- a/src/api.js +++ b/src/api.js @@ -514,3 +514,37 @@ Api.fn.xo = { }; }, }; + +Api.fn.host = { + 'getAll': function () { + return this.xo.hosts.get(); + }, +}; + +Api.fn.network = { + 'getAll': function () { + return this.xo.networks.get(); + }, +}; + +Api.fn.storage = { + 'getAll': function () { + return this.xo.srs.get(); + }, +}; + +Api.fn.template = { + 'getAll': function () { + return this.xo.vms.get({ + 'is_template': true, + }); + }, +}; + +Api.fn.vm = { + 'getAll': function () { + return this.xo.vms.get({ + 'is_template': true, + }); + }, +};