Compare commits

...

4292 Commits

Author SHA1 Message Date
Julien Fontanet
089cffcca1 feat(xo-server-load-balancer): 0.3.2 2018-06-28 14:14:48 +02:00
Julien Fontanet
88df5a8337 feat(xen-api): 0.16.11 2018-06-28 14:13:35 +02:00
Julien Fontanet
794c1cf89b feat(vhd-lib): 0.2.0 2018-06-28 14:10:08 +02:00
Julien Fontanet
9a5eea6e78 chore(CHANGELOG): 5.21.0 2018-06-28 13:58:44 +02:00
badrAZ
40568cd61f feat(xo-web/backup-ng/logs): copy full log and report a failed job (#3110)
Fixes #3100
2018-06-28 10:57:35 +02:00
Pierre Donias
358e1441cc fix(xo-server/pool.mergeInto): fail when product brands are different (#3118)
Fixes #3061
2018-06-28 10:10:55 +02:00
badrAZ
be930e127e fix(xo-web/vm/snapshots): creation from snapshot (#3117) 2018-06-28 10:03:19 +02:00
badrAZ
3656e83df5 feat(backup-ng/logs): add the job's name to the modal's title (#3115)
See #2711
2018-06-27 17:43:06 +02:00
badrAZ
abbb0450f8 feat(xo-web/backup-ng/logs): remove Mode column (#3116)
See #2711
2018-06-27 17:41:03 +02:00
Pierre Donias
8e4beeb00f feat(xo-web/backup-ng/health): legacy snapshots table (#3111)
Fixes #3082
2018-06-27 17:25:52 +02:00
Julien Fontanet
05d10ef985 feat(xo-web/settings/remotes): type defaults to NFS (#3114)
Fixes #3103
2018-06-27 17:04:55 +02:00
Pierre Donias
989d27154d fix(xo-web/backup/health): missing schedule subscription (#3104)
Also, move the table from `Backup/Health` to `Backup NG/Health`.
2018-06-26 16:12:29 +02:00
Pierre Donias
ec9957bd86 feat(xo-server,xo-web/tasks): disable cancel/destroy when not relevant (#3109)
* feat(xo-server,xo-web/tasks): disable cancel/destroy when not relevant

Fixes #3076

* cancellable/destroyable → allowedOperations

* Update index.js

* Update index.js
2018-06-26 15:40:53 +02:00
Julien Fontanet
dc8a7c46e0 feat(xo-server): dont create default remote (#3107)
Related to #3105
2018-06-26 14:47:24 +02:00
Pierre Donias
9ee2d8e0c2 feat(xo-web): new backup/health view (#3102)
Fixes #3090

Move "VM snapshots related to non-existent backups" table
from dashboard/health to backup/health

### Check list

> Check items when done or if not relevant

- [x] PR reference the relevant issue (e.g. `Fixes #007`)
- [x] if UI changes, a screenshot has been added to the PR
- [x] CHANGELOG updated
- [x] documentation updated

### Process

1. create a PR as soon as possible
1. mark it as `WiP:` (Work in Progress) if not ready to be merged
1. when you want a review, add a reviewer
1. if necessary, update your PR, and readd a reviewer

### List of packages to release

> No need to mention xo-server and xo-web.

### Screenshots

![capture_2018-06-25_12 18 01](https://user-images.githubusercontent.com/10992860/41858496-56af27d0-789a-11e8-9f86-e3ce1ac28e54.png)
2018-06-25 17:59:36 +02:00
badrAZ
6c62d6840a fix(backup-ng/new): "new-schedules" dont exist anymore (#3098) 2018-06-25 14:02:10 +02:00
badrAZ
2a2135ac71 fix(xo-server-load-balancer): make the metric "memoryFree" optional (#3073) 2018-06-22 19:00:27 +02:00
badrAZ
efaad2efb2 feat(backup-ng/new): ability to enable/disable a schedule (#3094)
Fixes #3062
2018-06-22 17:25:31 +02:00
badrAZ
3b244c24d7 feat(backup-ng/new): group saved & new schedules (#3093)
See #2711
2018-06-22 16:23:12 +02:00
badrAZ
915052d5f6 feat(backup NG): ability to cancel a running job (#3053)
Fixes #3047
2018-06-22 09:10:10 +02:00
Pierre Donias
05c6c7830d feat(xo-web/backups): add blog link to deprecation message (#3092)
Fixes #3089
2018-06-21 16:48:28 +02:00
badrAZ
0217c51559 fix(backup-ng/new): only list writable SRs for CR/DR (#3085)
Fixes #3050
2018-06-21 15:41:16 +02:00
badrAZ
0c514198bb feat: ability to save cloud configs (#3054)
Fixes #2984
2018-06-21 15:02:52 +02:00
Pierre Donias
0e68834b4c chore(xo-web): multiple minor fixes (#3091) 2018-06-21 12:10:38 +02:00
Julien Fontanet
ee99ef6264 feat(vhd-lib): createContentStream (#3086)
Export the raw content of the VHD as a stream.

This features is exposed in CLI: `vhd-cli raw input.vhd output.raw`

Related to #3083

Perf comparison between qemu-img and our vhd-cli to convert a 10GiB VHD file to raw:

```
> time qemu-img convert -f vpc -O raw origin.vhd expected.raw
1.40user 15.19system 1:01.88elapsed 26%CPU (0avgtext+0avgdata 24264maxresident)k
20979008inputs+20971520outputs (12major+4648minor)pagefaults 0swaps
> time vhd-cli raw origin.vhd actual.raw
21.97user 16.03system 1:09.11elapsed 54%CPU (0avgtext+0avgdata 65208maxresident)k
20956008inputs+20972448outputs (1major+754101minor)pagefaults 0swaps

> md5sum *.raw
b55ec6924be750edd2423e4a7aa262c3  actual.raw
b55ec6924be750edd2423e4a7aa262c3  expected.raw
```
2018-06-20 17:53:20 +02:00
badrAZ
bebb9bf0df fix(XapiStats/iowait): don't scale XAPI values (#3079)
Fixes #2969
2018-06-19 16:16:07 +02:00
badrAZ
4830ac9623 fix(xo-server/xapi-stats): specify the wanted step when requesting the RRD (#3078)
Fixes #3026
Fixes #3075
2018-06-18 18:32:16 +02:00
badrAZ
58b1d0fba8 fix(xo-server-load-balancer): issue whith a mutation of a var (#3077) 2018-06-18 16:01:26 +02:00
Julien Fontanet
cc4e69e631 feat(xo-server): 5.20.3 2018-06-16 17:05:54 +02:00
Julien Fontanet
e14fda6e8a feat(xen-api): 0.1.3 2018-06-16 17:05:27 +02:00
Julien Fontanet
ec48b77af3 feat(xen-api): add task record to task errors 2018-06-16 15:24:26 +02:00
Julien Fontanet
c7d6a19864 fix(xo-server/full backup NG): do not fork if 1 target 2018-06-16 15:24:26 +02:00
Julien Fontanet
7d714c8ce4 feat(xo-server): 5.20.2 2018-06-16 13:51:51 +02:00
Julien Fontanet
f70989c3a2 feat(delta NG): fix UUID of existing VHDs 2018-06-16 13:51:03 +02:00
Julien Fontanet
70490988b0 chore(xo-server/backupNg): add parseUuid util function 2018-06-16 13:51:03 +02:00
Julien Fontanet
d0795fdded feat(vhd-lib): make footer.{uuid,parentUuid)} a buffer 2018-06-16 13:51:03 +02:00
Julien Fontanet
1c736e9910 feat(xo-web): 5.20.2 2018-06-15 15:35:26 +02:00
Julien Fontanet
62979d5c22 feat(xo-server): 5.20.1 2018-06-15 15:35:00 +02:00
Julien Fontanet
ec8a4da73c feat(xo-vmdk-to-vhd): 0.1.3 2018-06-15 15:34:33 +02:00
Julien Fontanet
dea1bfee01 feat(xo-server-backup-reports): 0.12.2 2018-06-15 15:32:02 +02:00
Julien Fontanet
c18b82504a feat(xen-api): 0.16.10 2018-06-15 15:30:59 +02:00
Julien Fontanet
ed5460273f feat(vhd-lib): 0.1.2 2018-06-15 15:27:21 +02:00
Julien Fontanet
b91f8b21b9 feat(fs): 0.1.0 2018-06-15 15:26:48 +02:00
Julien Fontanet
5cea18e577 feat(delta NG): check VDIs before export (#3069) 2018-06-15 15:22:12 +02:00
Julien Fontanet
148eaa6a72 fix(xo-server/backup NG): retention checks (#3072)
They were broken by the introduction of `copyRetention`.
2018-06-15 12:13:55 +02:00
Rajaa.BARHTAOUI
80794211af feat(xo-server,xo-web/snapshots): fast-clone to create VM from snapshot (#3030)
Fixes #2937
2018-06-14 15:01:19 +02:00
Rajaa.BARHTAOUI
75dcbae417 chore(xo-web/backup): deprecate legacy backup creation (#3035)
Fixes #2956
2018-06-14 14:18:17 +02:00
Rajaa.BARHTAOUI
b19682b3c5 fix(xo-web/New VM): networks predicate in Self Service mode (#3027)
Fixes #3011
2018-06-14 13:25:08 +02:00
badrAZ
dd3b97cae2 feat(backup/overview): add tooltip to migrate action button (#3067)
Fixes #3042
2018-06-14 11:06:28 +02:00
Julien Fontanet
79891235f3 chore(CHANGELOG): add missing entry related to prev commit 2018-06-13 15:34:11 +02:00
Julien Fontanet
1e2f72ab6b feat(backup NG): new setting copyRetention (#2976)
Fixes #2895
2018-06-13 15:24:46 +02:00
Julien Fontanet
66d02e3808 feat(xo-server/backup NG): more logs (#3066) 2018-06-13 13:11:03 +02:00
Julien Fontanet
275e1f8f4c chore(xo-server): Xapi#_assertHealthyVdiChains is sync 2018-06-13 12:01:41 +02:00
Julien Fontanet
84dbbb0fbb chore(xo-server/backups-ng): add FIXME 2018-06-13 11:33:05 +02:00
Julien Fontanet
a36ef5209c fix(backup NG): only display the concerned tasks (#3063)
Allows us to add other tasks if necessary without breaking xo-web listing and the backup reports.
2018-06-12 13:18:46 +02:00
badrAZ
3497889302 fix(backup-ng): only display the concerned tasks 2018-06-12 11:53:43 +02:00
badrAZ
0a2f6b4ce7 feat(xo-web/backupNg/new): improve backupNg feedback (#2873)
See #2711
2018-06-12 11:52:19 +02:00
Julien Fontanet
f8be44d746 chore(xo-server): remove Xapi#barrier legacy type param 2018-06-11 18:00:16 +02:00
Julien Fontanet
379253c5ae chore(xen-api): lodash.forEach is unnecessary here 2018-06-11 17:57:02 +02:00
Julien Fontanet
aed1ba474c chore(xen-api): remove unnecessary test
`eventWatchers` is defined if event watching is enabled which is always the case here.
2018-06-11 17:55:47 +02:00
badrAZ
bc72e67442 feat(backup NG): new option to shutdown VMs before snapshot (#3060)
Fixes #3058
2018-06-11 17:25:18 +02:00
Julien Fontanet
26c965faa9 feat(xen-api/examples): handle cancelation 2018-06-11 15:48:43 +02:00
Pierre Donias
b3a3965ed2 feat(xo-web/SR): copy VDIs' UUIDs from Disks tab (#3059)
Fixes #3051
2018-06-11 14:57:37 +02:00
Julien Fontanet
7f88b46f4c chore(xen-api/examples): update deps 2018-06-08 15:36:29 +02:00
badrAZ
dd60d82d3d fix(xo-web/Backup-ng/logs): ability to retry a single failed/interrupted VM backup (#3052)
Fixes #2912
2018-06-08 10:52:38 +02:00
Julien Fontanet
4eeb995340 chore(CHANGELOG): update for next release 2018-06-08 10:32:00 +02:00
Julien Fontanet
1d29348e30 feat(xo-server-backup-reports): 0.12.1 2018-06-07 18:46:53 +02:00
Pierre Donias
a24db3f896 fix(xo-web/SortedTable): show grouped actions when all items selected (#3049)
Fixes #3048
2018-06-07 17:26:58 +02:00
Julien Fontanet
cffac27d0a feat(xo-server/jobs): implement cancelation (#3046)
Related to #3047

This is the first step toward Backup NG cancelation, the server side stuff should be ok (but need testing), so the next step is to expose it in the UI.
2018-06-07 17:20:06 +02:00
Julien Fontanet
b207cbdd77 feat(fs/read): read part of a file in an existing Buffer (#3036)
Easier to use and probably more efficient than `createReadStream` for this specific usage.
2018-06-07 17:19:33 +02:00
badrAZ
10baecefb9 fix(xo-server-backup-reports): not display size and speed if not have a transfer/merge (#3038) 2018-06-07 16:34:49 +02:00
badrAZ
42620323a9 fix(xo-web/Backup-ng): add label to Edit action (#3045)
Fixes #3043
2018-06-07 16:21:31 +02:00
Julien Fontanet
4d91006994 feat(xo-server/backupNg.getAllLogs): sort tasks (#3041) 2018-06-07 14:04:46 +02:00
badrAZ
a81f0b9a93 feat(xo-web/Backup NG/logs): display whether the export is delta/full (#3023)
See #2711
2018-06-07 12:30:44 +02:00
Julien Fontanet
2cee413ae1 chore(PR template): should reference issue 2018-06-07 12:14:58 +02:00
Nicolas Raynaud
53099eacc8 chore(xo-vmdk-to-vhd): split a file and rename some consts (#2966) 2018-06-06 16:49:18 +02:00
badrAZ
b628c5c07e fix(xo-server-backup-reports): handle the case when a transfer/merge fail (#3020) 2018-06-06 15:21:46 +02:00
Julien Fontanet
12889b6a09 fix(xo-server/Xapi#importDeltaVm): correctly copy task prop (#3034) 2018-06-06 14:26:19 +02:00
badrAZ
0c23ca5b66 feat(xo-web/Backup NG/logs): details are now dynamic (#3031) 2018-06-06 14:25:31 +02:00
Pierre Donias
d732ee3ade fix(xo-web/file restore NG): restrict to Premium (#3032) 2018-06-06 13:37:28 +02:00
badrAZ
65cb0bc4cf fix(xo-server-backup-reports): correctly send status to Nagios (#3019)
Fixes #2991
2018-06-05 17:55:06 +02:00
badrAZ
1ba68a94e3 fix(xo-server): vm.xenTools.* must be numbers (#3022) 2018-06-05 14:30:30 +02:00
Julien Fontanet
084430451a feat(xo-web): 5.20.1 2018-05-31 21:00:34 +02:00
Julien Fontanet
458a4d4efe fix(xo-web/backup NG logs): dont display size/speed if size is 0 2018-05-31 20:59:47 +02:00
Julien Fontanet
62eeab2a74 feat(xo-web): 5.20.0 2018-05-31 18:33:13 +02:00
Julien Fontanet
790b43910d feat(xo-server): 5.20.0 2018-05-31 18:33:13 +02:00
Julien Fontanet
ba65461c4d feat(xo-server-usage-report): 0.5.0 2018-05-31 18:29:45 +02:00
Julien Fontanet
5bd468791f feat(xo-server-backup-reports): 0.12.0 2018-05-31 18:28:21 +02:00
Julien Fontanet
37f71bb36c feat(xo-acl-resolver): 0.2.4 2018-05-31 18:26:53 +02:00
Julien Fontanet
2ed4b7ad3f feat(vhd-lib): 0.1.1 2018-05-31 17:59:02 +02:00
Julien Fontanet
7eb970f22a feat(fs): 0.0.1 2018-05-31 17:57:13 +02:00
badrAZ
13db4a8411 feat(Backup NG): improve logs (#3013) 2018-05-31 17:54:35 +02:00
badrAZ
49a7a89bbf feat(xo-web/new-vm): ability to use template vars in the CloudConfig (#3006)
Fixes #2140
2018-05-31 17:44:52 +02:00
Rajaa.BARHTAOUI
0af8a60c1c fix(xo-web/SR/disks): show VM templates attached to VDIs (#3012)
Fixes #2974
2018-05-31 17:32:34 +02:00
Rajaa.BARHTAOUI
e1650b376c fix(xo-web/Self new VM): do not auto-select resource set's 1st SR (#3007)
New behaviour: either auto-select the template's pool's default SR if
it's in the resource set or do not auto-select any SR at all

Fixes #3001
2018-05-31 16:57:52 +02:00
Rajaa.BARHTAOUI
873b40cc70 feat(xo-server,xo-web): allow setting remote syslog host (#2958)
Fixes #2900
2018-05-31 16:22:39 +02:00
Rajaa.BARHTAOUI
d45265b180 feat(xo-web): create single-server private network (#3004)
Fixes #2944
2018-05-31 11:25:08 +02:00
badrAZ
ff50b2848e feat(xo-server,xo-web): allow pool admins to create VMs (#2995)
Fixes #2350
2018-05-31 10:42:03 +02:00
Julien Fontanet
d67fae22ab chore: initial PR template 2018-05-30 18:10:11 +02:00
badrAZ
d809002558 feat(Backup NG): ability to retry a single failed VM backup (#3009)
Fixes 2912
2018-05-30 17:04:50 +02:00
Pierre Donias
5c30559d15 feat(xo-server,xo-web): handle XCP-ng patches (#3005) 2018-05-30 16:03:43 +02:00
Rajaa.BARHTAOUI
cbb5b011e1 fix(xo-web/SR/disks): show control domain VMs attached to VDIs (#3002)
Fixes #2999
2018-05-30 15:55:44 +02:00
Julien Fontanet
f5bff408a8 feat(xo-server/exportDeltaVm): dont check chain if no snapshot
Should fix a race condition with XenServer DB during Delta Backup NG.
2018-05-30 12:22:10 +02:00
Nicolas Raynaud
d7cfe4d3dc fix(vhd/merge): fix performance enhancement (#2980) 2018-05-30 10:26:15 +02:00
badrAZ
7be8f38c6b fix(xo-web/jobs/edit): support all types of inputs (#2997) 2018-05-30 10:20:22 +02:00
badrAZ
08a7e605ce feat(xo-web/backup logs): show # of calls for each state (#2860) 2018-05-30 09:58:48 +02:00
Julien Fontanet
4b57db5893 feat(xo-server/delta NG): validate parent VHD 2018-05-29 16:36:33 +02:00
Julien Fontanet
8b1ae3f3c9 fix(xo-server/delta NG): dont select tmp file as parent 2018-05-29 16:36:10 +02:00
Julien Fontanet
77d35a5928 chore(fs/Handler#list): prepend dir after filtering 2018-05-29 16:34:51 +02:00
Julien Fontanet
323d409e6c chore(package): require yarn >1.7
Previous releases prevented xo-web from being built to an incorrect resolution of dependencies.
2018-05-29 16:29:14 +02:00
Pierre Donias
9f2f2b7b69 fix(xo-web/render-xo-item): show SR container name (#3003)
Fixes #3000
2018-05-29 12:01:50 +02:00
Julien Fontanet
b44fa7beca chore(xo-server): bump xo:perf threshold to 500ms 2018-05-29 10:53:14 +02:00
Julien Fontanet
6d4e310b8e chore(vhd-cli/build): migrate to Babel 7 2018-05-28 18:18:44 +02:00
Julien Fontanet
6726530229 fix(tests): run all test with Babel 7
Temporarily disable xo-web tests which uses Babel 6.
2018-05-28 18:18:44 +02:00
Julien Fontanet
8351352541 chore(xo-remote-parser/build): migrate to Babel 7 2018-05-28 18:18:44 +02:00
Julien Fontanet
3f9e8d79ea chore(xo-collection/build): migrate to Babel 7 2018-05-28 18:18:44 +02:00
Julien Fontanet
685f2328bd chore(package): update dependencies 2018-05-28 14:54:55 +02:00
Pierre Donias
746567a8a7 fix(xo-acl-resolver,xo-web): SR & PIF ACLs inheritance (#2994) 2018-05-25 15:26:45 +02:00
Julien Fontanet
c116c41c42 chore(package): update dependencies 2018-05-25 11:42:55 +02:00
Pierre Donias
3768a7de37 fix(xo-web/select): do not auto-select disabled option (#2992) 2018-05-25 11:11:21 +02:00
Julien Fontanet
11ef0ee54f feat(rolling snapshots legacy): check VDI chains (#2986) 2018-05-24 16:39:06 +02:00
Julien Fontanet
33ae531e3a fix(package): update hashy to 0.7.1
Correctly handle hash with identifier `2b`.
2018-05-24 14:52:38 +02:00
Julien Fontanet
8cc9924751 feat(xo-server/importDeltaVm): add UUID of missing base VM 2018-05-24 00:04:52 +02:00
Julien Fontanet
c329ab863b feat(Backup NG): configurable concurrency (#2918) 2018-05-23 16:29:31 +02:00
Julien Fontanet
41820ea316 fix(xo-server/backup legacy): fix reports (#2979) 2018-05-23 15:56:40 +02:00
badrAZ
bf00f80716 fix(xo-web): update @julien-f/freactal to 0.1.1 (#2972)
This fix prevent the cursor from jumping to the end of the input when editing the backup's name.
2018-05-23 14:47:28 +02:00
Julien Fontanet
9baf0c74e4 chore(vhd-lib): move some deps to devDeps 2018-05-23 11:49:59 +02:00
Julien Fontanet
b59ccdf26f chore(package): update dependencies 2018-05-23 11:23:25 +02:00
Julien Fontanet
9cae978923 feat(xo-server): 5.19.9 2018-05-22 19:43:19 +02:00
Julien Fontanet
311d914b96 feat(xo-web/import): remove restriction for Free 2018-05-22 16:27:17 +02:00
Julien Fontanet
592cb4ef9e feat(xo-web): 5.19.8 2018-05-22 15:53:45 +02:00
Julien Fontanet
ec2db7f2d0 feat(xo-vmdk-to-vhd): 0.1.2 2018-05-22 15:53:03 +02:00
Julien Fontanet
71eab7ba9b feat(xo-web): 5.19.7 2018-05-22 15:36:54 +02:00
badrAZ
5e07171d60 fix(xo-server/backup-ng): fix incorrect condition (#2971) 2018-05-22 11:45:02 +02:00
Rajaa.BARHTAOUI
3f73e3d964 fix(xo-server,xo-web): message when no Xen tools (#2916)
Fixes #2911
2018-05-22 09:57:46 +02:00
badrAZ
0ebe78b4a2 feat(xo-server-usage-report): improve the report (#2970)
Fixes #2968
2018-05-21 16:25:40 +02:00
Julien Fontanet
61c3379298 feat(xo-server): 5.19.8 2018-05-21 11:00:19 +02:00
Julien Fontanet
44866f3316 feat(xo-web): 5.19.6 2018-05-21 10:42:37 +02:00
Julien Fontanet
4bb8ce8779 feat(vhd-lib): 0.1.0 2018-05-21 10:03:37 +02:00
Julien Fontanet
58eb6a8b5f feat(xo-server): 5.19.7 2018-05-18 18:44:34 +02:00
Julien Fontanet
52f6a79e01 fix(xo-server/backupNg/logs): include merge/transfer size (#2965) 2018-05-18 18:44:07 +02:00
Julien Fontanet
129f79d44b feat(xo-web): 5.19.5 2018-05-18 18:42:31 +02:00
Julien Fontanet
385c3eb563 feat(xo-vmdk-to-vhd): 0.1.1 2018-05-18 18:40:26 +02:00
Julien Fontanet
e56be51b45 chore(xo-server/backups-ng): remove incorrect TODO 2018-05-18 17:14:50 +02:00
Olivier Lambert
24ae65b254 fix(xo-server/sr.createNfs): nfsVersion → nfsOptions (#2904) 2018-05-18 16:28:02 +02:00
badrAZ
d5dffbacbd fix(xo-web/FormattedDuration): handle duration < 0 seconds (#2964) 2018-05-18 15:06:23 +02:00
Julien Fontanet
c6ae969a82 fix(xo-server/https): ask for passphrase (#2963)
Fixes #2962
2018-05-18 15:05:49 +02:00
Nicolas Raynaud
005a9fdc01 fix(xo-vmdk-to-vhd): various bugs (#2961) 2018-05-18 14:02:19 +02:00
Jerome Charaoui
f505d4d911 Fix SR creation when using options or NFSv4 (#2960) 2018-05-17 22:12:09 +02:00
badrAZ
8ada6b121e fix(backup-ng/logs): handle the case when transfer duration equals 0 (#2954) 2018-05-17 16:58:29 +02:00
Julien Fontanet
b9a87efb0d fix(xo-server/backupNg): dont fail on corrupted VHDs (#2957)
Corrupted VHD files (usually uncleaned temporary) could fail the job.
2018-05-17 11:27:02 +02:00
Pierre Donias
89485a82d2 feat(xo-web): make many objects' UUID copiable (#2955)
Fixes #2925

- host/tab-network
- pool/tab-network
- vm/tab-disks
- vm/tab-network
- vm/tab-snapshots
2018-05-16 17:39:47 +02:00
Pierre Donias
451f87c6b4 feat(xo-web/servers): allow unauthorized cert. when adding server (#2953)
Fixes #2926
2018-05-16 13:44:27 +02:00
Rajaa.BARHTAOUI
c3cb5a3221 feat(xo-server,xo-web): VM HA options (#2946)
Fixes #2917
2018-05-16 13:27:40 +02:00
Julien Fontanet
458609ed2e feat(xo-server): 5.19.6 2018-05-16 10:32:59 +02:00
Julien Fontanet
fcec8113f3 fix(xo-server/backupNg): await writeStream (#2951) 2018-05-16 10:32:38 +02:00
Julien Fontanet
ebbd882ee4 feat(xo-web): 5.19.4 2018-05-15 17:44:25 +02:00
Julien Fontanet
0506e19a66 chore(xo-server/backups-ng): update todo list 2018-05-15 17:44:09 +02:00
Pierre Donias
ecc62e4f54 fix(xo-web/xosan): install packs button condition (#2950) 2018-05-15 17:40:40 +02:00
Julien Fontanet
2b95eb4e4d feat(xo-web): 5.19.3 2018-05-15 16:11:53 +02:00
Julien Fontanet
bcde9e0f74 feat(xo-server): 5.19.5 2018-05-15 16:11:34 +02:00
Pierre Donias
114501ebc7 feat(XOSAN): allow user to update packs (#2782) 2018-05-15 16:11:04 +02:00
badrAZ
ebab7c0867 fix(backup-ng/logs): handle the case when transfer/merge duration equals 0 (#2949) 2018-05-15 16:10:17 +02:00
Julien Fontanet
0e2270fb6e feat(xo-web): 5.19.2 2018-05-15 14:46:33 +02:00
Julien Fontanet
593493ec0c feat(xo-server): 5.19.4 2018-05-15 14:46:07 +02:00
Julien Fontanet
d92898a806 feat(xo-vmdk-to-vhd): 0.1.0 2018-05-15 14:45:19 +02:00
Julien Fontanet
7890e46551 feat(xo-server-backup-reports): 0.11.0 2018-05-15 14:42:32 +02:00
Julien Fontanet
ef942a6209 feat(Backup NG): implrtment logs and reports (#2869) 2018-05-15 14:40:11 +02:00
Nicolas Raynaud
fdde916388 feat(xo-web/vms-import): redirect to VM or home page (#2942)
If a single VM has been imported, redirect to its page.

If multiple VMs has been imported, redirect to the homepage with all other VMs filtered out.
2018-05-14 17:42:11 +02:00
Julien Fontanet
31314d201b fix(xo-server/backupNg/delta): await deletion/merge 2018-05-14 15:38:11 +02:00
Julien Fontanet
a29a949c51 fix(xo-server/backupNg/delta): deleteFirst iff retention > 1 2018-05-14 15:37:09 +02:00
Julien Fontanet
cc1ce8c5f8 chore: update yarn.lock 2018-05-14 13:53:03 +02:00
Nicolas Raynaud
a21bf4ebe5 chore: major VHD code restructuring (#2808)
Related to #2792
2018-05-14 13:48:16 +02:00
Julien Fontanet
3d0420dbd9 fix(xo-server/backupNg): clean metadata on VM iself (#2945) 2018-05-14 11:47:34 +02:00
Julien Fontanet
04c74dd30f fix: missing bit of last commit 2018-05-11 20:17:02 +02:00
Julien Fontanet
2f256291ae fix(xo-server/backup legacy/delta import): autofix path (#2941)
Because the path might be incorrect and be `_full.vhd` instead of `_delta.vhd`.

I know…
2018-05-11 20:16:00 +02:00
Julien Fontanet
bcb66a4145 fix(xo-server/backup NG/listReplicatedVms): avoid templates and snapshots 2018-05-11 18:45:47 +02:00
Fabrice Marsaud
2d9368062e fix(xo-web/xoa-updater): dont block paying plans when updater is on error (#2939) 2018-05-11 17:18:24 +02:00
Pierre Donias
b110bacf61 fix(xo-server/patches): bulk install (#2935) 2018-05-09 17:32:11 +02:00
Julien Fontanet
78afdc0af5 feat(xo-web): 5.19.1 2018-05-07 13:19:59 +02:00
Julien Fontanet
ad6cd7985a feat(xo-server): 5.19.3 2018-05-07 13:07:21 +02:00
Julien Fontanet
a61661776d fix(xo-server/listVmBackupsNg): handle missing vhds field
This field is only present on delta backups
2018-05-07 11:02:14 +02:00
Julien Fontanet
1a9ebddcab fix(xo-server/listBackupNgPartitionFiles): missing await
Strange things though, it works in dev compilation mode…

Fixes #2929
2018-05-07 10:33:44 +02:00
Julien Fontanet
7ab907a854 feat(xo-server/backup NG): file restore (#2889) 2018-05-06 18:38:47 +02:00
Olivier Lambert
68a34f7cdb feat(changelog): update changelog 2018-05-05 12:05:56 +02:00
Rajaa.BARHTAOUI
da4ff3082d feat(xo-web/health): list VM snapshots related to non-existing backup jobs (#2899)
Fixes #2828
2018-05-04 15:59:11 +02:00
Rajaa.BARHTAOUI
9c05a59b5f feat(xo-web/SR/advanced): add VDI UUID in coalesce table (#2919)
Fixes #2903
2018-05-04 12:28:15 +02:00
Rajaa.BARHTAOUI
6780146505 feat(xo-web/patches): better "restart host" warnings (#2909)
Fixes #2866
2018-05-04 10:41:02 +02:00
Julien Fontanet
2758833fc6 feat(xo-server): 5.19.2 2018-05-03 19:12:48 +02:00
Julien Fontanet
2786d7ec46 fix(vhd/createSyntheticReadStream): sectorsPerBlock → sectorsPerBlockData 2018-05-03 19:11:01 +02:00
Julien Fontanet
945a2006c9 feat(xo-server/legacy backup/import): use synthetic stream (#2913) 2018-05-02 17:48:13 +02:00
badrAZ
b9e574e32f fix(SR/tab-stats): fix IOPS's and IOwait's values format (#2914) 2018-05-02 14:17:13 +02:00
Julien Fontanet
34f1ef1680 feat(xo-server): 5.19.1 2018-05-01 17:26:15 +02:00
Julien Fontanet
4ac4310bc1 fix(xo-server/importDeltaVm): remove extra return
It prevented the VBD creation in case of a new VDI.
2018-05-01 17:25:46 +02:00
Julien Fontanet
a10997ca66 feat(xo-web): 5.19.0 2018-05-01 16:13:20 +02:00
Julien Fontanet
0e52a4c7dc feat(xo-server): 5.19.0 2018-05-01 16:12:44 +02:00
Julien Fontanet
a4b3e22c2b feat(xo-server-perf-alert): 0.1.0 2018-05-01 16:10:10 +02:00
Julien Fontanet
441bd7c754 feat(xo-server-auth-saml): 0.5.2 2018-05-01 16:09:06 +02:00
badrAZ
ddbd32d1cb chore(xo-web/backup-ng/new): single effect to toggle modes (#2908) 2018-04-30 11:19:45 +02:00
Pierre Donias
a5b0cbeaea feat(xo-server-perf-alert): SR disk space (#2905) 2018-04-27 17:38:19 +02:00
Rajaa.BARHTAOUI
c6f3b2b1ce feat(xo-web/XOA update): display "Downgrade" when trial is over (#2845)
Fixes #1483
2018-04-27 10:05:27 +02:00
Pierre Donias
3d869d9fa1 chore(xo-web/health): remove irrelevant actions on VDIs (#2882) 2018-04-26 17:37:28 +02:00
Julien Fontanet
7a5229741f chore: disable tests on Node 9 due to upath error 2018-04-26 17:21:00 +02:00
Rajaa.BARHTAOUI
78e0c2d8fa feat(xo-web/SortedTable): support link actions (#2893) 2018-04-26 15:46:10 +02:00
Pierre Donias
5928984069 feat(xo-web/home): sort by container name (#2901)
Fixes #2680
2018-04-26 15:21:48 +02:00
Julien Fontanet
61a472f108 chore(xo-server/vhd/createReadStream): improve genericity (#2865)
It should now be pretty easy to make it work to generate a delta VHD, which should be very useful when mergin multiple deltas together (during deletion.
2018-04-24 18:06:58 +02:00
Julien Fontanet
e45f78ea20 fix(xo-web/backup-ng): delete backups sequentially (#2855)
- sequentially: to limit merge issues
- from newest to oldest: to avoid unnecessary merges
2018-04-23 16:35:34 +02:00
Olivier Lambert
b3ae9d88eb feat(vm): expose vendor device features in advanced tab. Fixes #2883 (#2894) 2018-04-23 15:02:40 +02:00
Pierre Donias
f7f26537be fix(xo-web/vm/network): bad import after file name change (#2892)
Fixes #2891

Introduced by 769c32a1b1
2018-04-23 14:08:56 +02:00
Julien Fontanet
96848fc6d4 fix(xo-server/importDeltaVm): create VBDs earlier (#2885)
To avoid orphan VDIs AMAP.
2018-04-20 17:33:36 +02:00
Julien Fontanet
51e6f0c79f feat(xo-server-usage-report): 0.4.2 2018-04-19 09:39:47 +02:00
badrAZ
4f94ad40b7 fix(xo-server-usage-report): handle missing metrics (#2880) 2018-04-18 16:30:30 +02:00
Pierre Donias
43e1eb9939 fix(xo-web/Ellipsis): handle patchedRender wrapping (#2881)
Also use Ellipsis on resource set name in home/VM view
2018-04-18 11:00:09 +02:00
Julien Fontanet
1f6d7de861 feat(xo-server-usage-report): 0.4.1 2018-04-17 14:03:32 +02:00
Julien Fontanet
bd623c2daf feat(xo-web): 5.18.3 2018-04-17 11:36:00 +02:00
Pierre Donias
40c71c2102 fix(xo-web/SelectSr): "pool" typo (#2878)
Fixes #2875
2018-04-17 11:05:56 +02:00
Nicolas Raynaud
72a1580eff fix(xo-server/vhd-merge.integ.spec): increase timeout (#2874) 2018-04-17 11:04:30 +02:00
Julien Fontanet
9e2404a0d7 feat(xo-web): 5.18.2 2018-04-16 17:32:24 +02:00
Julien Fontanet
7dd84d1518 feat(xo-server): 5.18.3 2018-04-16 17:29:02 +02:00
Julien Fontanet
d800db5d09 fix(xo-web/backup-ng/new): fix empty srs & remotes
Send `undefined` instead of `false`.
2018-04-16 17:26:27 +02:00
Julien Fontanet
2714ccff38 fix(xo-server/backupNg.{create,edit}Job): check srs param 2018-04-16 17:15:35 +02:00
Julien Fontanet
1d493e411b fix(xo-server/backups-ng): correctly detect delta exports
Fixes #2833
2018-04-16 16:54:55 +02:00
Julien Fontanet
2a0c222f2d chore(xo-server): use xen-api 0.16.9 2018-04-16 16:30:59 +02:00
Julien Fontanet
641d68de0e feat(xen-api): 0.16.9 2018-04-16 16:29:41 +02:00
Julien Fontanet
2dd0fd660b chore(xo-server/backups-ng): update todo list 2018-04-16 16:28:09 +02:00
badrAZ
bb5441c7bc feat(xo-web/SelectSr): add container name to SRs that have the same names (#2824)
Fixes #1762
2018-04-16 16:16:55 +02:00
badrAZ
eeea9e662b fix(xo-web/backup-ng/new): rename edit button and change cancel icon (#2858)
See #2711
2018-04-16 15:49:54 +02:00
badrAZ
8d4874e240 fix(xo-web/backupNg/new): make the default retention equals 1 (#2872)
See #2711
2018-04-16 15:27:55 +02:00
badrAZ
a8ba4a1a8e feat(xo-web): stats for SRs (#2847) 2018-04-16 14:40:00 +02:00
Julien Fontanet
0c027247ec fix(normalize-packages): homepage for scoped packages 2018-04-15 23:41:27 +02:00
badrAZ
164cb39c1b fix(xo-web/backup/new): schedules values can be null (#2773) 2018-04-13 17:10:03 +02:00
Julien Fontanet
52503de645 fix(xo-web/initial fetch): support path prefix
Related to #2775
2018-04-13 17:01:43 +02:00
Julien Fontanet
83b8b5de61 fix(xo-web/updater): support path prefix
Related to #2775
2018-04-13 17:01:43 +02:00
Rajaa.BARHTAOUI
3e326c4e62 feat(xo-web/updater): disable upgrade button when not needed (#2816)
Fixes #1594
2018-04-13 16:46:58 +02:00
Julien Fontanet
a6b0690416 fix(xo-server): unmanaged VDI snapshots are VDI-unmanaged 2018-04-13 11:36:10 +02:00
Julien Fontanet
dcd007c5c7 fix(xen-api): fix sync test in watchTask (#2868) 2018-04-12 18:02:51 +02:00
Julien Fontanet
eb090e4874 fix(xen-api): getObject* should not return null 2018-04-12 11:06:08 +02:00
Julien Fontanet
4b716584f7 feat(xo-server): 5.18.2 2018-04-11 17:48:59 +02:00
Julien Fontanet
4bc348f39f fix(xo-server/vhd/createReadStream): emit empty if missing sectors 2018-04-11 17:47:43 +02:00
Julien Fontanet
9c75992fe4 feat(xo-web): 5.18.1 2018-04-11 17:32:58 +02:00
Julien Fontanet
4bb2702ac5 feat(xo-server): 5.18.1 2018-04-11 17:32:58 +02:00
Julien Fontanet
ea8133cb41 fix(xo-server/vhd/createReadStream): handle unallocated blocks (#2859)
Fixes #2857
2018-04-11 17:24:46 +02:00
Pierre Donias
fc40c7b03d fix(xo-web/new SR): create button not showing (#2854)
Fixes #2853
2018-04-11 10:21:06 +02:00
Julien Fontanet
7fe5b66fdb feat(xo-server-auth-saml): log profile when no name found 2018-04-10 19:09:30 +02:00
Julien Fontanet
0f1d052493 chore: update dependencies 2018-04-09 18:11:53 +02:00
badrAZ
56a182f795 fix(xo-web/backup-ng/new): dont add a target more than once (#2849)
Fixes #2848
2018-04-09 17:22:38 +02:00
Julien Fontanet
e8da1b943b fix(xo-server/backups-ng): create all forks at the same time (#2842)
Fixes #2790
2018-04-09 16:42:05 +02:00
Julien Fontanet
3913b0eba1 feat(xen-api): 0.16.8 2018-04-09 13:58:52 +02:00
Julien Fontanet
7990e45095 fix(xen-api): allow UUIDs for ro calls 2018-04-09 13:56:47 +02:00
Julien Fontanet
a7068ec166 fix(xo-server/importDeltaVm): better network matching (#2834)
Fixes #2093
2018-04-07 01:00:19 +02:00
Pierre Donias
55b35ac0cf NFS version and options (#2841)
Add NFS version & NFS options. Fixes #2706
2018-04-06 17:46:18 +02:00
Julien Fontanet
a251f8ca75 fix(xo-server/backups-ng): don't remove startable VMs (#2840)
Fixes #2724
2018-04-06 17:12:36 +02:00
Rajaa.BARHTAOUI
172ce2c7a1 feat(xo-web/jobs/new): use SortedTable (#2670)
See #2416
2018-04-06 16:45:46 +02:00
Olivier Lambert
3cef668a75 feat(xo-web,xo-server): create HBA SR (#2836)
Fixes #1992
2018-04-06 16:01:48 +02:00
Olivier Lambert
e6deb29070 fix(SR): incorrect case in deviceConfig for iSCSI probe (#2839) 2018-04-06 15:03:04 +02:00
Olivier Lambert
51609d45a2 feat(xo-web,xo-server): expose VM Xen Tools version (#2838)
Fixes #2650
2018-04-06 14:26:44 +02:00
Rajaa.BARHTAOUI
5cb6dc6d92 feat(xo-web): create new disk from SR view (#2726)
Fixes #2229
2018-04-06 13:54:32 +02:00
Nicolas Raynaud
c5174a61b7 chore(xo-server/debounce): reduce test flakiness (#2831) 2018-04-06 10:14:25 +02:00
badrAZ
93e987982c fix(xo-web/logs): displays the correct calls state when the job is interrupted (#2734)
Fixes #2732
2018-04-05 16:46:43 +02:00
Julien Fontanet
fc421428fd fix: missing ESLint config changes 2018-04-05 16:15:26 +02:00
Julien Fontanet
7400bd657a chore: coding style fixes 2018-04-05 15:53:57 +02:00
Julien Fontanet
da62cba3f8 chore: update dependencies 2018-04-05 11:00:03 +02:00
Patrick Tully
461cc7e547 fix(xo-web/icons.scss): remove extra commas (#2817) 2018-04-05 10:57:18 +02:00
badrAZ
b898ed4785 feat(xo-server/xapi-stats): new implementation (#2648) 2018-04-04 14:20:30 +02:00
Julien Fontanet
149530e73f feat(cron): 1.0.3 2018-04-03 17:21:21 +02:00
Julien Fontanet
7e627c953e fix(cron): selecting the first sunday of the month 2018-04-03 17:21:21 +02:00
Pierre Donias
bc86984f19 chore(xo-server/createNetwork): set other_config.automatic to false (#2825)
Fixes #2818

If a network has its other_config.automatic value set to any value other than
false then XenCenter's New VM wizard will create a VIF connected to this network
See https://citrix.github.io/xenserver-sdk/#network
2018-04-03 15:32:39 +02:00
Julien Fontanet
e40f3acdd4 feat(xo-web): 5.18.0 2018-03-30 18:04:11 +02:00
Julien Fontanet
63d93224e0 feat(xo-server): 5.18.0 2018-03-30 18:03:53 +02:00
badrAZ
c87356c319 feat: ability to delete a default template (#2812)
Fixes #2666
2018-03-30 18:03:12 +02:00
Julien Fontanet
74f4a83aea feat(xo-server-usage-report): 0.4.0 2018-03-30 17:55:57 +02:00
Julien Fontanet
e67038a04d feat(xo-server-auth-saml): 0.5.1 2018-03-30 17:54:30 +02:00
badrAZ
1fa73b57a2 feat(xo-web/dashboard/overview): add filters for pools and hosts (#2769)
Fixes #1631
2018-03-30 17:44:36 +02:00
badrAZ
73c746fdd3 fix(xo-web/backup-ng/new): xoa plan verification (#2813) 2018-03-30 17:22:21 +02:00
Julien Fontanet
ab1413b741 feat(xen-api): more info to task destroyed before completion error 2018-03-30 15:28:53 +02:00
Julien Fontanet
c087eaf229 chore(xo-server): increase blocked threshold from 10 to 50 2018-03-30 15:09:47 +02:00
Julien Fontanet
8b9f9ffa3e feat(xo-server/snapshotVm): increase concurrency to 2 2018-03-30 12:39:51 +02:00
Julien Fontanet
a83fa90d87 chore(xo-server/snapshotVm): avoid using waitObjectState 2018-03-30 12:39:50 +02:00
Julien Fontanet
505f06c1d8 chore(xo-server/backups-ng): dont fork streams if 1 target 2018-03-30 12:39:50 +02:00
Julien Fontanet
2ac1093543 chore(xo-server/backups-ng): rm unneeded defer decorators 2018-03-30 12:39:50 +02:00
Pierre Donias
b3d8ce2041 feat(xo-web/new-vm): hide IP field if IP pools are not configured (#2811)
Fixes #2739
2018-03-29 17:19:38 +02:00
Rajaa.BARHTAOUI
b47789bf82 feat(xo-web): confirm modal before manual backup run (#2717)
Fixes #2355
2018-03-29 15:06:50 +02:00
Julien Fontanet
0a5e1a9bce fix(xo-server/backups-ng): discriminate replicated against the VM (#2809)
Fixes #2807
2018-03-29 13:47:16 +02:00
Julien Fontanet
f333679319 fix(xo-server/backups-ng): dont snapshot on unhealthy vdi chain 2018-03-29 10:51:22 +02:00
Julien Fontanet
20d3faa306 fix(xo-server/backups-ng): delete unused snapshot on delta failure 2018-03-29 10:49:48 +02:00
Julien Fontanet
cf11ed0830 fix(xo-server/backups-ng): dont delete snapshot on failure 2018-03-29 09:47:32 +02:00
Julien Fontanet
acd390ac42 todo(xo-server/backups-ng): do not delete rolling snapshot in case of failure 2018-03-28 17:52:07 +02:00
badrAZ
8a2fbe3ab5 feat(xo-web/backup): ability to migrate legacy to NG (#2801)
Fixes #2711
2018-03-28 14:33:43 +02:00
Julien Fontanet
7a6e7ec153 fix(xo-web/backup-ng): display ids like in logs 2018-03-28 11:48:42 +02:00
Julien Fontanet
7d90346c91 feat(xen-api): 0.16.7 2018-03-28 11:46:45 +02:00
Julien Fontanet
abb5193ced chore(xen-api/getObject*): clearer error messages 2018-03-28 11:46:45 +02:00
Julien Fontanet
52e845834e chore(xen-api): more explicit tests 2018-03-28 11:46:45 +02:00
Julien Fontanet
c1c17fad44 fix(xen-api/getObject): match obj.$id against refs 2018-03-28 11:46:45 +02:00
Julien Fontanet
d7b4025893 todo(xo-server/backups-ng): detect and gc uncomplete replications 2018-03-28 11:46:45 +02:00
Rajaa.BARHTAOUI
934356571c feat(xo-web/home): fix toolbar in header (#2798)
Fixes #1581
2018-03-28 11:29:27 +02:00
Julien Fontanet
738d98eb42 chore(xo-server): update http-server-plus to 0.10
Fixes #2803
2018-03-28 00:11:17 +02:00
Nicolas Raynaud
7e689076d8 chore(xo-server/vhd-merge): various updates (#2767)
Fixes #2746 

- implement parent locators
- tests
- remove `@nraynaud/struct-fu`
2018-03-27 18:39:36 +02:00
Rajaa.BARHTAOUI
0b9d031965 feat(xo-web/jobs/overview): use SortedTable (#2677)
See #2416
2018-03-27 16:56:56 +02:00
badrAZ
53f470518b feat(xo-server-usage-report): various improvements (#2788)
Fixes #2770
2018-03-27 16:07:29 +02:00
Rajaa.BARHTAOUI
664d648435 feat(xo-web/vm/disks): use SortedTable (#2429)
See #2416
2018-03-27 11:13:05 +02:00
Julien Fontanet
0d718bd632 feat(xo-server/backup NG): merge VHD in a worker (#2799) 2018-03-27 10:13:05 +02:00
badrAZ
ed5e0c3509 feat(xo-web/xoa/update): warn before upgrade if jobs running (#2795)
Fixes #2250
2018-03-26 18:01:29 +02:00
Julien Fontanet
20d5047b55 chore(xo-server/ag2s): use async-iterator-to-stream instead 2018-03-26 16:32:46 +02:00
Pierre Donias
4cfe3ec06e fix(xo-server/new-vm): race condition on VIFs (#2796)
Fixes #2794
2018-03-26 11:18:36 +02:00
Julien Fontanet
87664ff16a chore(xo-server-auth-saml): config description 2018-03-26 11:10:16 +02:00
Pierre Donias
adf278fc83 fix(xo-web/home): pagination (#2791)
Fixes #2730
2018-03-21 16:54:29 +01:00
Pierre Donias
a4d0fa62d2 chore(xo-web/restore): minor improvements & fixes (#2789)
Fixes #2692
2018-03-21 15:51:12 +01:00
Pierre Donias
ff59d091f1 fix(xo-server-cloud): check token before getResourceDownloadToken call (#2783) 2018-03-20 15:36:03 +01:00
Pierre Donias
4cac99d79a feat(xo-web/home): put sort criteria in URL (#2780)
Fixes #2585
2018-03-20 10:41:03 +01:00
Rajaa.BARHTAOUI
d1a046279d feat(xo-web/modal): autofocus strong-confirm text input (#2749) 2018-03-19 15:34:52 +01:00
Julien Fontanet
cb9fa5c42b chore: update dependencies 2018-03-19 14:55:19 +01:00
Julien Fontanet
05f9e6895b feat(xo-web): 5.17.3 2018-03-16 17:49:31 +01:00
Julien Fontanet
63b5ee6f96 feat(xo-server): 5.17.4 2018-03-16 17:49:11 +01:00
Julien Fontanet
36d2de049f feat(xo-server/vhd): createReadStream (#2763)
A stream to a synthetic full VHD.
2018-03-16 17:47:10 +01:00
Julien Fontanet
86b0d5e2b7 fix(xo-server/backupNg.importVmBackup): do not try to detect base VDI 2018-03-16 17:38:56 +01:00
Julien Fontanet
d34f641130 fix(xo-server/backupNg.importVmBackup): do not try to detect base VM 2018-03-16 17:30:42 +01:00
Julien Fontanet
39d7b4c7bd fix(xo-server/backupNg.importVmBackup): fix VM name for delta 2018-03-16 17:15:18 +01:00
Julien Fontanet
ad0d4156fb fix(xo-server/backupNg.importVmBackup): add missing version for delta 2018-03-16 17:15:18 +01:00
badrAZ
80187e2789 feat(xo-web/self-service): add the internal networks to the networks' select (#2664) 2018-03-16 16:57:44 +01:00
badrAZ
89e25c9b81 fix(xo-web/dashboard/overview): missing patches not fetched (#2772)
Fixes #2768
2018-03-16 16:37:57 +01:00
Julien Fontanet
ca51d59815 chore(xo-server/chainVhd): allow parent and child to be in different dirs (#2762) 2018-03-16 16:24:45 +01:00
Julien Fontanet
433f445e99 fix(xo-server/backups): no checksum files for VHDs (#2761)
Because keeping them up-to-date after chainings and merges is too expensive (requires reading the whole file).

In legacy backups they were keeping up-to-date and great costs and never used for verification anyway.
2018-03-16 16:24:25 +01:00
Julien Fontanet
474a765e1b chore(xo-server/chainVhd): remove checksum recomputing (#2759)
It's high time to remove this.
2018-03-16 16:24:02 +01:00
badrAZ
7d4b17380d feat(Backups NG): fourth iteration (#2756) 2018-03-16 16:23:19 +01:00
Julien Fontanet
b58b1d94cd fix(xo-server/xapi): add missing import 2018-03-16 16:21:20 +01:00
Olivier Lambert
16e7257e3b feat(host/pool): clearer memory info (#2771)
Fixes #2750
2018-03-16 14:19:59 +01:00
Julien Fontanet
ca1a46f980 chore(xo-server/backups-ng): add todo items 2018-03-14 15:52:26 +01:00
Julien Fontanet
596bd12f59 chore(xo-server/vhd): add format cheatsheet 2018-03-14 15:51:02 +01:00
badrAZ
301ab65c01 fix(xo-web/backup/overview): fix the race condition between subscriptions (#2766)
Fixes #2733
2018-03-14 14:15:47 +01:00
Pierre Donias
35f210e074 fix(xo-server/xosan): make tmpBoundObjectId unique (#2760)
Fixes #2758
2018-03-13 16:05:38 +01:00
Julien Fontanet
c239b518e0 chore(xo-server/checksum): documentation 2018-03-13 15:57:08 +01:00
Julien Fontanet
f45935aa44 chore(xo-server/vhd-merge): abstract FD handling (#2757)
Due to our smart implementation, the Vhd class does not need to be aware of the fact that the file is already opened.
2018-03-13 15:09:21 +01:00
Julien Fontanet
782505b292 feat(xo-server): close inactive HTTP connections on stop 2018-03-13 10:22:06 +01:00
Julien Fontanet
1368e3b86d chore: update dependencies 2018-03-13 10:06:23 +01:00
Julien Fontanet
ab9c24401e feat(xo-web): 5.17.2 2018-03-12 17:54:09 +01:00
Julien Fontanet
831f4e48d1 feat(xo-server): 5.17.3 2018-03-12 17:53:34 +01:00
Julien Fontanet
f5511449af fix(xo-server/vm.create): work around a race condition (#2755)
Fixes #2747
2018-03-12 17:52:53 +01:00
Julien Fontanet
80c1e39b53 feat(Backups NG): third iteration (#2729) 2018-03-12 17:26:20 +01:00
badrAZ
3ce4e86784 fix(xo-web/sorted-table): returns undefined if userData is empty (#2752)
Fixes #2748
2018-03-12 17:19:15 +01:00
Julien Fontanet
fb617418bb feat(xo-server): 5.17.2 2018-03-09 19:12:00 +01:00
Pierre Donias
9fb0f793b2 fix(prettierrc): add trailingComma to avoid conflicts with eslint (#2744) 2018-03-09 11:55:02 +01:00
Julien Fontanet
3b21a097ab fix(xo-web): handle incorrect filters (#2743)
Fixes #2740
2018-03-09 11:30:22 +01:00
Rajaa.BARHTAOUI
ef09a42a89 feat(xo-web): disconnect VDI from Health view (#2655)
See #2505
2018-03-08 14:48:30 +01:00
Julien Fontanet
74d8f2a859 fix(xo-server): test with Babel 7 2018-03-08 11:00:00 +01:00
Julien Fontanet
48910f9c0f fix(xo-server/remote-handlers): do not swallow sync() value 2018-03-08 10:51:24 +01:00
Julien Fontanet
788a1accbd feat(xo-server): update to Babel 7 (#2731) 2018-03-08 10:11:14 +01:00
Julien Fontanet
b254e7e852 chore: update dependencies 2018-03-08 00:13:54 +01:00
Julien Fontanet
e288fa1b8a feat(xo-web): 5.17.1 2018-03-07 21:22:18 +01:00
Julien Fontanet
eb9ec68494 feat(xo-server): 5.17.1 2018-03-07 21:21:33 +01:00
Julien Fontanet
10ab4f2d79 fix(xo-server): work around minor Babel issue 2018-03-07 21:11:20 +01:00
badrAZ
b1986dc275 feat(Backups NG): second iteration (#2718) 2018-03-07 20:57:28 +01:00
Julien Fontanet
831e36ae5f fix(xo-server/exportDeltaVm): cannot assign ro name_label 2018-03-07 20:41:20 +01:00
Julien Fontanet
77a2d37d98 fix(xo-server/exportDeltaVm): do not leak the snapshot name
Fixes #2727
2018-03-07 20:30:09 +01:00
Julien Fontanet
37b90e25dc fix(xo-server/jobs): userIds are strings
Fixes #2728
2018-03-07 20:17:22 +01:00
Julien Fontanet
41f16846b6 chore(xo-server): addChecksumToReadStream → createChecksumStream (#2725)
`addChecksumToReadStream` was overly complicated and its usage was limited.

`createChecksumStream` is similar but does not pipe the readable stream in by itself.
2018-03-06 17:48:21 +01:00
Julien Fontanet
3e89c62e72 chore(xo-server): replace eventToPromise with fromEvent 2018-03-06 16:40:29 +01:00
Julien Fontanet
b7d3762c06 chore(xo-server): delete unused schedules on clean 2018-03-06 16:39:00 +01:00
Julien Fontanet
481bc9430a chore(xo-server/utils): remove unnecessary moment-timezone import 2018-03-06 16:38:07 +01:00
Julien Fontanet
13f2470887 chore(xo-server): remove createRawObject
Replace both `createRawObject()` and `Object.create()` by `{ __proto__: null }`.
2018-03-06 16:36:41 +01:00
Julien Fontanet
0308fe4e6e chore(xo-server): add checksum handling for VM import 2018-03-06 16:36:13 +01:00
Julien Fontanet
197273193e chore(xo-server): explicitly check for a schedule 2018-03-06 16:35:42 +01:00
Julien Fontanet
e4b11a793b chore(xo-server): move checksum streams into own module 2018-03-06 16:34:22 +01:00
Julien Fontanet
927d3135c4 chore(xo-server): rename removeSchedule to deleteSchedule 2018-03-06 16:32:59 +01:00
Julien Fontanet
aa533c20d6 fix(xo-server): respect compression param 2018-03-06 16:31:11 +01:00
Julien Fontanet
7fd615525a chore(xen-api): TODO do not cancel a finished task 2018-03-06 16:26:05 +01:00
Julien Fontanet
6abf3fc0af feat: add code of conduct 2018-03-06 10:18:05 +01:00
Julien Fontanet
6bb0929822 chore(xo-server/backupNg): remove unnecessary destructuring 2018-03-03 10:51:57 +01:00
Julien Fontanet
feebc04e55 chore(xo-server/BackupsNg): remove schedule default value
A backup NG job cannot be run without a schedule anyway
2018-03-03 10:26:45 +01:00
Julien Fontanet
2d406cd7c1 chore(xo-server/backupNg): rename importVmbackup{Ng,} 2018-03-03 10:25:01 +01:00
Julien Fontanet
788bfe632f chore(xo-server/exportDeltaVm): pass cancel token to _snapshotVm 2018-03-03 10:21:10 +01:00
Julien Fontanet
1149102f37 chore(xo-server/exportDeltaVm): pass name to _snapshotVm
Instead of setting it manually afterward.
2018-03-03 10:20:35 +01:00
Julien Fontanet
8bd949f618 chore(xo-server/exportDeltaVm): use _snapshotVm directly 2018-03-03 10:19:51 +01:00
Julien Fontanet
489b142a66 chore(xo-server): remove unnecessary getObject in exportDeltaVm 2018-03-03 10:15:24 +01:00
Julien Fontanet
cbbbb6da4f chore(xo-server): doc attrs of VMs created by Backup NG 2018-03-03 10:14:06 +01:00
Julien Fontanet
6701c7e3af chore(xo-server): use checksumFile helper unlink 2018-03-03 10:07:09 +01:00
Julien Fontanet
ecd460a991 feat(xo-web): 5.17.0 2018-03-02 19:57:24 +01:00
Julien Fontanet
b4d7648ffe feat(xo-server): 5.17.0 2018-03-02 19:57:04 +01:00
Julien Fontanet
eb3dfb0f30 feat(Backups NG): first iteration (#2705) 2018-03-02 19:56:08 +01:00
Julien Fontanet
2b9ba69480 fix(xo-server): getJob return the correct job 2018-03-02 19:53:16 +01:00
Julien Fontanet
8f784162ea chore(xo-server): Xapi#exportDeltaVm make streams writable 2018-03-02 19:52:35 +01:00
Julien Fontanet
a2ab64b142 chore(xo-server): Xapi#exportDeltaVm accept a snapshot 2018-03-02 19:52:00 +01:00
Julien Fontanet
052817ccbf chore(xo-server): RemoteHandler#rename handle cheksum 2018-03-02 19:51:03 +01:00
Julien Fontanet
48b2297bc1 chore(xo-server): handle nested job props (#2712) 2018-03-02 19:29:08 +01:00
Nicolas Raynaud
e76a0ad4bd feat(xo-server): improve VHD merge speed (#2643)
Avoid re-opening/closing the files multiple times, introduce a lot of latency in remote FS.
2018-03-02 19:08:01 +01:00
Olivier Lambert
baf6d30348 fix(changelog): remove useless spaces 2018-03-02 18:31:32 +01:00
Olivier Lambert
7d250dd90b feat(changelog): move and update changelog 2018-03-02 18:30:22 +01:00
Rajaa.BARHTAOUI
efaabb02e8 feat(xo-web): confirm modal before host emergency shutdown (#2714)
Fixes #2230
2018-03-02 18:05:58 +01:00
Julien Fontanet
0c3b98d451 fix(xo-server): forward createOutputStream errors with checksum 2018-03-02 15:29:26 +01:00
Julien Fontanet
28d1539ea6 fix(xo-server): fix Xapi#snapshotVm
It was broken by #2701.
2018-03-02 10:53:49 +01:00
Julien Fontanet
8ad02d2d51 feat(xo-web): ActionButton accept data-* props instead of handlerParam (#2713) 2018-03-02 09:57:26 +01:00
Julien Fontanet
1947a066e0 chore: disable flow for test
Still some config issues which I have to fix.
2018-03-01 16:30:02 +01:00
Julien Fontanet
d99e643634 chore(xo-server): inject schedule in jobs (#2710) 2018-03-01 16:27:51 +01:00
Rajaa.BARHTAOUI
65e1ac2ef9 chore(xo-web): consistently use "Username" label (#2709)
Fixes #2651
2018-03-01 15:58:48 +01:00
Julien Fontanet
64a768090f fix(xo-server): typo, executor → executors 2018-03-01 13:37:40 +01:00
Julien Fontanet
488eed046e chore(xo-server): pluggable job executors (#2707) 2018-03-01 12:10:08 +01:00
Julien Fontanet
dccddd78a6 chore(xo-web): rewrite smart-backup-pattern (#2698)
Fix a few issues
2018-02-28 17:07:16 +01:00
Julien Fontanet
3c247abcf9 chore(xo-web): add exact prop to NavLink (#2699) 2018-02-28 17:05:44 +01:00
Julien Fontanet
db795e91fd feat(complex-matcher): 0.3.0 2018-02-28 16:40:18 +01:00
Julien Fontanet
f060f56c93 feat(complex-matcher): number comparison (#2702)
`foo:>=42` matches `{ foo: 42 }` but not `"bar"` nor `{ foo: 37 }`.
2018-02-28 16:36:54 +01:00
Julien Fontanet
51be573f5e chore(xo-web): rewrite smart-backup-pattern 2018-02-28 16:23:29 +01:00
Julien Fontanet
4257cbb618 chore(xo-server): improve jobs code (#2696)
- add type filtering (default to `call`)
- support passing extra params to the call
- Flow typing
2018-02-28 16:22:41 +01:00
Julien Fontanet
e25d6b712d chore(xo-web): addSubscriptions provide initial props (#2697) 2018-02-28 16:09:56 +01:00
Julien Fontanet
b499d60130 chore(xo-server): improve scheduling code (#2695) 2018-02-28 15:59:19 +01:00
Julien Fontanet
68e06303a4 chore(xo-server): more cancelable Xapi methods (#2701) 2018-02-28 15:25:22 +01:00
badrAZ
60085798f2 fix(xo-web/jobs/vm.revert): use the snapshot's id instead of the vm's id (#2685)
Fixes #2498
2018-02-28 14:33:05 +01:00
badrAZ
c62cab39f1 feat(xo-web/VM): change the "share" button position (#2667)
Fixes #2663
2018-02-28 14:10:27 +01:00
Julien Fontanet
30483ab2d9 feat(xo-web): pass userData to SortedTable actions (#2700) 2018-02-28 13:43:41 +01:00
Julien Fontanet
c38c716616 chore(xo-server): use sepecific Babel plugins instead of stage-0 (#2694) 2018-02-28 12:59:23 +01:00
Julien Fontanet
ded1127d64 chore: mutualize Babel 7 config 2018-02-26 22:30:37 +01:00
Julien Fontanet
38d6130e89 chore(xo-cli): remove flow test 2018-02-26 21:58:32 +01:00
Julien Fontanet
ee47e40d1a feat(xo-web/logs): display real job status (#2688) 2018-02-26 18:02:39 +01:00
Julien Fontanet
80e66415d7 feat(xo-server): 5.16.2 2018-02-26 11:26:02 +01:00
Julien Fontanet
81e6372070 feat(xen-api): 0.16.6 2018-02-26 11:23:20 +01:00
Julien Fontanet
dbfbd42d29 fix(xo-server): identifiable names for VM export snapshots
Fixes #2668
2018-02-24 23:00:50 +01:00
Julien Fontanet
e0d34b1747 fix(xo-server): CR with lazy streams (#2675) 2018-02-23 17:50:17 +01:00
Julien Fontanet
9a8f9dd1d7 feat(xo-web): display attached VDI snapshots in Health (#2684)
Fixes #2634
2018-02-23 16:30:40 +01:00
Pierre Donias
75521f8757 fix(xo-server): do not count snapshots in self quotas (#2682)
Fixes #2626
2018-02-23 15:00:23 +01:00
Julien Fontanet
11d4cb2f04 fix(xo-server): detect interruption of full backups (#2686) 2018-02-23 13:07:48 +01:00
Rajaa.BARHTAOUI
d90cb09b56 feat(xo-web): disconnect VDIs from SR/disks view (#2602)
See #2505
2018-02-23 10:03:20 +01:00
Rajaa.BARHTAOUI
a02d393457 fix(xo-web/VM): allow self-service user to insert CD (#2647)
Fixes #2503
2018-02-22 16:42:43 +01:00
Julien Fontanet
01a5963947 feat(xen-api): allow createTask in read-only mode (#2679)
Fixes #2678
2018-02-22 15:50:35 +01:00
Julien Fontanet
7ef314d9f4 chore(lint-staged): rewritten in JS (#2676)
- simpler code, no need to hack around the shell
- no more double formatting
- no longer use git stash, simply cache files in memory
2018-02-22 11:45:44 +01:00
Julien Fontanet
2ff25d1f61 fix(xo-server): limit number of VDI exports (#2673)
Fixes #2672
2018-02-21 19:26:39 +01:00
Julien Fontanet
ede12b6732 fix(xo-server): limit number of VM exports (#2671)
Fixes #2669
2018-02-21 17:37:07 +01:00
Julien Fontanet
8a010f62fd chore(xo-server): remove unused Xapi#exportVdi 2018-02-21 17:32:30 +01:00
badrAZ
51da4a7e70 fix(xo-web/VM): show error when setting resource set fails (#2638)
Fixes #2620
2018-02-20 14:44:24 +01:00
Julien Fontanet
fd2580f5da feat(xo-cli): document config export (#2662) 2018-02-20 11:43:38 +01:00
Julien Fontanet
c5fdab7d47 feat(cron): 1.0.2 2018-02-20 11:42:19 +01:00
Julien Fontanet
ae094438b1 fix(cron): Schedule#next() with moment 2018-02-20 11:41:12 +01:00
Julien Fontanet
3e5af9e894 chore: update dependencies 2018-02-19 18:10:05 +01:00
Julien Fontanet
10093afb91 feat(cron): 1.0.1 2018-02-19 17:06:17 +01:00
Julien Fontanet
58032738b9 chore(cron): replace luxon with moment-timezone (#2657) 2018-02-19 17:04:04 +01:00
Julien Fontanet
89cbbaeeea chore: fix yarn.lock 2018-02-19 15:52:17 +01:00
Julien Fontanet
5ca08eb400 feat(xo-server): 5.16.1 2018-02-19 14:11:10 +01:00
Julien Fontanet
fad049d2ac feat(xo-web): 5.16.2 2018-02-19 14:10:37 +01:00
Julien Fontanet
87466cb5bd feat(value-matcher): 0.2.0 2018-02-19 14:08:38 +01:00
Julien Fontanet
bb69ad8019 feat(xo-server-backup-reports): 0.10.0 2018-02-19 14:02:13 +01:00
Julien Fontanet
d5373b85c7 feat(xen-api): 0.16.5 2018-02-19 13:59:17 +01:00
Julien Fontanet
d71e699582 feat(xo.getAllObjects): implement ndjson handler (#2500) 2018-02-19 13:41:44 +01:00
Julien Fontanet
f464751752 fix(xen-api): enforce event timeout (#2653) 2018-02-19 11:45:10 +01:00
badrAZ
d69f355206 feat(xo-web/jobs): show number of VMs in logs status selector (#2636)
Fixes #2618
2018-02-19 11:05:03 +01:00
badrAZ
769c32a1b1 fix(xo-web): the name 'ip' is used by the module ip-regex (#2654) 2018-02-19 10:05:10 +01:00
Julien Fontanet
44075d2ad5 chore: update dependencies 2018-02-18 21:53:23 +01:00
badrAZ
2b4ae3f1c2 feat(xo-server-backup-reports): improve the unhealthy VDI chain message (#2640)
Fixes #2639
2018-02-16 15:24:55 +01:00
Julien Fontanet
8689b48c55 fix(xo-server/authentication): fail fast with empty passwords
There is no reason to attempt authentication with empty passwords, and this work around issues with some LDAP servers which may allow binds with empty passwords.

See xoa-support#469.
2018-02-16 11:47:01 +01:00
Julien Fontanet
443882f4be feat(scripts): dev 2018-02-15 15:20:06 +01:00
Pierre Donias
9c3adaedf0 fix(select-objects/SelectSshKey): initialize state (#2646)
Fixes #2645
2018-02-15 12:38:04 +01:00
Julien Fontanet
4ba4d383f0 feat(backup): parallelism improvements (#2641)
Do not limit the concurrency at the job level, only limit VHD merges (2) and VM snapshots (1).
2018-02-15 12:14:39 +01:00
Julien Fontanet
947febcdaa chore(xo-server): update limit-concurrency-decorator to 0.3.0 2018-02-14 17:05:25 +01:00
badrAZ
b0a152612e feat(backup): new "skipped" state (#2612)
Fixes #2591
2018-02-14 11:22:30 +01:00
badrAZ
c9991655cf fix(xo-server): remove VM from nonexistent resource sets (#2637) 2018-02-13 16:58:05 +01:00
badrAZ
8971d218bb feat: share a vm in a resource set (#2611)
Fixes #2589
2018-02-13 15:24:20 +01:00
Julien Fontanet
8b05486945 fix(xo-server/scheduling): use local TZ by default 2018-02-13 14:50:10 +01:00
Julien Fontanet
42cd5d8e58 chore(xo-server/utils): remove scheduleFn 2018-02-13 14:49:50 +01:00
Julien Fontanet
31f420937e chore: fix yarn.lock 2018-02-13 14:41:12 +01:00
badrAZ
952d086c5e feat: use @xen-orchestra/cron (#2619)
Fixes #2616
2018-02-13 14:39:26 +01:00
Julien Fontanet
422a04795f chore: update dependencies 2018-02-13 12:05:52 +01:00
Julien Fontanet
28a8807cfb chore(xo-web): remove unused package.json entries 2018-02-13 11:16:02 +01:00
Julien Fontanet
c6327a953b chore(cron): improve documentation 2018-02-13 10:44:21 +01:00
Julien Fontanet
cc71f2e4a3 feat(cron): 1.0.0 2018-02-12 12:21:22 +01:00
Julien Fontanet
701086ec26 feat(cron): add Schedule#startJob() 2018-02-12 12:17:05 +01:00
Julien Fontanet
20acaebb68 fix(xo-server/vhd-merge): explicit error when no block found 2018-02-11 13:38:24 +01:00
Julien Fontanet
22997cd903 chore: improve Babel 7 configs
- easier to customize
- all target configuration is done in package.json
2018-02-10 23:09:29 +01:00
Julien Fontanet
7cb720b11f chore: format all code (#2632) 2018-02-09 17:56:03 +01:00
Julien Fontanet
8bf35b2a63 feat(xo-web): 0.16.1 2018-02-09 15:34:17 +01:00
Julien Fontanet
8b72690c17 feat(xo-server-cloud): 0.2.2 2018-02-09 15:33:51 +01:00
Julien Fontanet
a0cc768af9 feat(scripts): benchmarks (#2631) 2018-02-09 15:01:00 +01:00
Pierre Donias
9fc73e03a2 fix(XOSAN): ask for registration (#2628)
Fixes #2625
2018-02-09 13:36:30 +01:00
badrAZ
edd57f7205 feat(dashboard/health): add pool filter (#2583)
Fixes #2302
2018-02-08 20:22:32 +01:00
Julien Fontanet
8b155b62dc feat: restore prettier (#2630) 2018-02-08 17:45:16 +01:00
Julien Fontanet
bf5daa1a9b feat: better lint-staged (#2629) 2018-02-08 17:31:30 +01:00
Julien Fontanet
4f154e33bc fix(value-matcher): add AndPattern to Pattern union 2018-02-08 10:52:35 +01:00
Julien Fontanet
395bcade67 chore: fix issue template 2018-02-08 09:55:00 +01:00
Julien Fontanet
985a038482 chore: improve normalization 2018-02-07 17:40:55 +01:00
Julien Fontanet
2da04c5bb1 fix: lint & tests 2018-02-07 14:43:14 +01:00
Julien Fontanet
1baf8cfaa6 chore: update dependencies 2018-02-07 14:03:34 +01:00
Julien Fontanet
956a9a7dde chore: xen-orchestra is now the main repo 2018-02-07 10:40:09 +01:00
Julien Fontanet
d7bb457fd0 chore(xo-web): adapt to monorepo 2018-02-07 10:39:32 +01:00
Julien Fontanet
563ff38c25 Merge branch 'xo-web/master' 2018-02-07 10:18:09 +01:00
Julien Fontanet
05caaa0814 feat(xo-web): move all files to packages/xo-web 2018-02-07 10:18:09 +01:00
Julien Fontanet
1f283d285a feat(cron): 0.2.0 2018-02-06 17:30:36 +01:00
Julien Fontanet
adaa7ca413 feat(cron): wait promise before next run (#47) 2018-02-06 17:29:28 +01:00
Julien Fontanet
247e797d2b feat(cron): 0.1.2 2018-02-06 15:42:26 +01:00
Julien Fontanet
9c7c030b00 fix(cron): handle setTimeout max delay (#45) 2018-02-06 15:41:19 +01:00
Julien Fontanet
867c9ea66c fix(cron): correctly compute the delay 2018-02-06 15:28:54 +01:00
badrAZ
59985adc5d feat(backups): improve smart backup feedback (#2320)
Fixes #2253
2018-02-06 14:39:51 +01:00
Julien Fontanet
fd4504f0ee chore(xen-api): tested with XS 7.2 & 7.3 2018-02-06 14:36:33 +01:00
Julien Fontanet
6c6aacc64e feat(cron): 0.1.1
New release due to publish issue.
2018-02-06 12:04:49 +01:00
Julien Fontanet
678adc0726 feat(cron): 0.1.0 2018-02-06 10:22:17 +01:00
Julien Fontanet
be3b684866 feat(cron): better API (#40) 2018-02-06 10:20:11 +01:00
Julien Fontanet
179aadafa4 feat(xo-server): update value-matcher to 0.1.0 2018-02-05 15:52:05 +01:00
Julien Fontanet
f9dc129601 chore(value-matcher): remove unused @babel/polyfill 2018-02-05 15:47:24 +01:00
Julien Fontanet
6beea2d208 feat(value-matcher): 0.1.0 2018-02-05 15:44:02 +01:00
Julien Fontanet
57ef84ad3b feat(value-matcher): add __and operator (#43) 2018-02-05 15:34:55 +01:00
Julien Fontanet
9d9fdcff1e feat(normalize-packages): remove lint-staged 2018-02-05 14:34:45 +01:00
Julien Fontanet
83e82e4789 chore: remove legacy ghooks config 2018-02-05 14:18:10 +01:00
Julien Fontanet
4a12e0b6a0 chore: predev scripts should run prebuild 2018-02-05 14:16:54 +01:00
Julien Fontanet
642118959e chore: always use yarn to run scripts 2018-02-05 14:15:57 +01:00
Julien Fontanet
600011be17 fix(test): make flow ignore node_modules 2018-02-05 13:38:54 +01:00
Julien Fontanet
6765251332 fix(test): build modules required for tests 2018-02-05 13:38:28 +01:00
Julien Fontanet
afa5b046cb fix(test): ignore some no-missing-import errors 2018-02-05 12:05:22 +01:00
Julien Fontanet
138d5627b5 chore(complex-matcher): remove unnecessary invoke 2018-02-04 16:35:57 +01:00
badrAZ
682d9e88ec feat(SortedTable): add actions property (#2609)
Fixes #2596
2018-02-02 15:34:12 +01:00
Julien Fontanet
191c531bad chore(README): xo-server is now here 2018-02-01 17:44:27 +01:00
Julien Fontanet
f026e51c54 fix(xo-server): pass appDir to appConf 2018-02-01 16:30:39 +01:00
Julien Fontanet
693afc52ff chore(gitignore): add missing entry 2018-02-01 14:38:19 +01:00
Julien Fontanet
b22914e88a chore(xo-server): adapt to monorepo 2018-02-01 14:23:17 +01:00
Julien Fontanet
50b081608f Merge branch 'xo-server/master' 2018-02-01 14:17:39 +01:00
Julien Fontanet
214528a880 feat(xo-server): move all files to packages/xo-server 2018-02-01 14:17:39 +01:00
Julien Fontanet
4f13b32f9a fix(collection/redis): rebuidIndexes don't fail on missing items (#651)
Instead of failing when an id refers to a no missing item, simply remove it from the index.
2018-02-01 14:15:57 +01:00
Julien Fontanet
8ce8f5763c chore(cron): update dependencies 2018-02-01 11:52:45 +01:00
Pierre Donias
1e5b2f54c3 chore: use debounce-input-decorator (#2608) 2018-02-01 11:34:42 +01:00
Julien Fontanet
348bc16d6d feat: cron (#34) 2018-02-01 11:28:16 +01:00
Julien Fontanet
ff2c69102d chore(complex-matcher): new parser implementation (#37) 2018-02-01 11:27:49 +01:00
Julien Fontanet
9479b7dc74 chore(xen-api): typo
Fixes vatesfr/xo-web#2606
2018-02-01 11:02:07 +01:00
Julien Fontanet
39f4e13915 chore(package): update dependencies 2018-02-01 10:33:26 +01:00
Julien Fontanet
5ea9f26ec4 chore(package): update dependencies 2018-02-01 10:14:53 +01:00
Julien Fontanet
c1d9cc7e2a 5.16.0 2018-01-31 18:41:15 +01:00
Julien Fontanet
6b80124a35 5.16.0 2018-01-31 18:39:34 +01:00
badrAZ
83a3754fe5 feat(vm/tab-advanced): move in/out of a resource set (#2601)
Fixes #1913
2018-01-31 18:39:12 +01:00
badrAZ
bf9b53c4d9 feat(vm.set): move a vm in to/out of a Self Service Group (#649)
See vatesfr/xo-web#1913
2018-01-31 18:37:29 +01:00
Rajaa.BARHTAOUI
2b5f7dc8de feat(settings/remotes): use SortedTable (#2465)
See #2416
2018-01-31 15:13:25 +01:00
Julien Fontanet
4349911076 fix(SortedTable): sort info in the URL (#2604)
Fixes #2584
2018-01-31 14:48:41 +01:00
Rajaa.BARHTAOUI
152f68624c feat(tasks): use SortedTable (#2532)
See #2416
2018-01-31 13:54:03 +01:00
Pierre Donias
3770194598 feat(vm/tab-network): allow self-user to create VIF (#2603)
Fixes #2593
2018-01-31 13:21:03 +01:00
Pierre Donias
2b4a7c40e1 feat(vm): allow self-user to create interface (#650)
See vatesfr/xo-web#2593
2018-01-31 13:16:03 +01:00
Julien Fontanet
62a9158074 chore: update dependencies 2018-01-31 09:44:37 +01:00
Nicolas Raynaud
354fd88028 feat(xo-server-perf-plugin): initial release (#33) 2018-01-31 09:41:28 +01:00
Pierre Donias
1b191c2bc9 fix(settings/servers): sortCriteria (#2600) 2018-01-30 16:53:46 +01:00
Pierre Donias
f94212729a feat: can force delete a VM if operation is blocked (#2598)
Fixes #2525
2018-01-30 10:48:04 +01:00
Julien Fontanet
43e5398d99 fix(api/vm): coding style 2018-01-30 10:36:26 +01:00
Julien Fontanet
920107e13f chore(vm.delete): deleteDisks by default 2018-01-30 10:26:26 +01:00
Pierre Donias
d52bed9618 feat(vm/delete): force param to bypass blocked_operations (#648)
See vatesfr/xo-web#2525
2018-01-30 10:19:26 +01:00
badrAZ
5ecc31b977 feat(VM/Snapshots): add grouped deletion to the SortedTable (#2597)
Fixes #2595
2018-01-29 17:15:11 +01:00
badrAZ
ed3ecc6f4e fix(form/select): autoSelectSingleOption fixes (#2594)
Fixes #2590

- emit option, not its value
- support `simpleValue` behavior
- only trigger when there are no selected options
2018-01-29 14:54:47 +01:00
badrAZ
add10ea556 feat(dashboard): allow the user in self service to see its quotas (#2268)
Fixes #1538
2018-01-29 10:44:43 +01:00
Julien Fontanet
d627fad299 5.15.7 2018-01-27 13:28:39 +01:00
Julien Fontanet
6f8b31eaa2 chore(package): update xen-api to 0.16.4 2018-01-26 16:38:59 +01:00
Julien Fontanet
8d47c83117 feat(xen-api): 0.16.4 2018-01-26 16:32:46 +01:00
Julien Fontanet
75ddf2681e fix(xen-api): only remove ghost tasks (#36)
Do not trigger incorrect "task destroyed before completion".
2018-01-26 16:28:22 +01:00
Julien Fontanet
4ad72b2ef0 chore(xen-api): _sessionCall "args" is optionnal 2018-01-26 16:16:00 +01:00
Julien Fontanet
a7334061ef fix(xen-api): _sessionCall "args" is an array 2018-01-26 16:13:18 +01:00
badrAZ
c89c7dab60 feat(job/log): improve Unhealthy VDI Chain message (#2588)
Fixes #2586
2018-01-26 16:00:04 +01:00
Julien Fontanet
0e0e4aae69 feat(complex-matcher): 0.2.1 2018-01-26 15:21:18 +01:00
Julien Fontanet
971c039086 feat(complex-matcher): number are matched recursively 2018-01-26 15:17:46 +01:00
Julien Fontanet
5e8e1968e1 feat(normalize-packages): remove babel-jest 2018-01-26 13:30:52 +01:00
Julien Fontanet
76a1c827d1 chore(package): update dependencies 2018-01-26 13:29:56 +01:00
Julien Fontanet
a4ab028ad6 feat(complex-matcher): 0.2.0 2018-01-25 16:57:29 +01:00
Pierre Donias
d2fdf0586c feat(modal): strong confirmation modal (#2529)
Fixes #2522 

- New modal that requires the user to type a message to confirm an action
- Integration of this modal on bulk VMs deletion
2018-01-25 15:03:16 +01:00
Julien Fontanet
0825806093 5.15.6 2018-01-25 10:12:54 +01:00
Julien Fontanet
44b1bee080 Merge branch 'stable' 2018-01-25 10:11:21 +01:00
badrAZ
d87f54d4a4 feat(job/log): display start/end time for each call and precise its duration (#2284)
Fixes part of #2270
2018-01-24 18:14:35 +01:00
Julien Fontanet
dc12896b19 chore(package): update react-virtualized (#2556)
`form/select` has been redeveloped for the occasion with the following features:
- not clearable when required and not multiple
- when no options available, marked as loading
- when required and only one option, it is automatically selected
2018-01-24 14:51:12 +01:00
Pierre Donias
23e992de85 fix(vm/network): remove "attached?" default filter (#2581)
Fixes #2548
2018-01-24 14:47:05 +01:00
Julien Fontanet
6f6b047537 chore(package): update xen-api to 0.16.3
Fixes vatesfr/xo-web#2579
2018-01-24 14:09:54 +01:00
Julien Fontanet
9fc6013934 feat(xen-api): 0.16.3 2018-01-24 14:07:32 +01:00
Julien Fontanet
8a02d557f4 feat(xen-api): handle ghost tasks (#35)
See vatesfr/xo-web#2579
2018-01-24 14:06:46 +01:00
Julien Fontanet
1406f1f8e5 5.15.5 2018-01-19 13:11:03 +01:00
Julien Fontanet
d5f6b65861 fix(Xapi#remoteCopyVm): fix VM renaming 2018-01-19 13:09:12 +01:00
Pierre Donias
8d2bbe86d5 fix(vm/create): bad resource set condition (#647) 2018-01-19 13:02:47 +01:00
badrAZ
1a2f553094 fix(vm): hide cores per socket selector when no container (#2221) 2018-01-18 15:35:03 +01:00
badrAZ
4d69866532 feat(migrate-vm-modal): controlled form (#2259) 2018-01-18 10:40:07 +01:00
Julien Fontanet
bdddea2e29 feat(complex-matcher): support numbers (#32) 2018-01-17 12:06:44 +01:00
Julien Fontanet
be4ca0eede chore(complex-matcher): remove @babel/polyfill
Should be unnecessary.
2018-01-17 11:01:32 +01:00
Pierre Donias
495c97b44b fix(xo): links to /xoa/update & www-xo forum (#2571) 2018-01-16 16:53:59 +01:00
Pierre Donias
e817b3254e fix(vm/network): duplicate key error (#2570)
Fixes #2553
2018-01-16 11:41:27 +01:00
Julien Fontanet
dd6987efe9 fix(SortedTable): infinite loop when displaying last page (#2568)
Fixes #2569
2018-01-15 16:56:00 +01:00
Julien Fontanet
d7f8d12d88 chore(prop-types-decorator): deprecate 2018-01-15 12:48:22 +01:00
Julien Fontanet
504895a730 chore(package): update dependencies 2018-01-15 12:37:00 +01:00
Rajaa.BARHTAOUI
cde92836f3 feat(user/ssh): use SortedTable (#2514)
See #2416
2018-01-12 14:56:47 +01:00
Pierre Donias
9158e33546 fix(proxy-console): socket.close() → socket.end() (#646) 2018-01-11 16:47:12 +01:00
Rajaa.BARHTAOUI
c787988b06 feat(pool,vm/logs): use SortedTable (#2513) 2018-01-11 14:51:59 +01:00
Julien Fontanet
316d71b34d chore(xen-api): remove unused import 2018-01-11 11:22:16 +01:00
Julien Fontanet
1b344b7d9c 5.15.4 2018-01-10 11:32:01 +01:00
Pierre Donias
3df01cd0cf chore(patching/bulk): omit XS-upgrade patches (#645)
Fixes vatesfr/xo-web#2564
2018-01-10 11:28:04 +01:00
Julien Fontanet
d2331bb62f fix(api/vm): export start and importDeltaBackup 2018-01-10 11:23:31 +01:00
Julien Fontanet
51504cc6a3 5.15.3 2018-01-09 17:55:19 +01:00
Julien Fontanet
cd03ebe49d fix(package): update xen-api to 0.16.2 2018-01-09 17:55:07 +01:00
Julien Fontanet
86c7ae3693 fix(package): update xen-api to 0.16.2 2018-01-09 17:50:34 +01:00
Julien Fontanet
6e3b85e764 chore(Xapi): remove unnecessary default values 2018-01-09 17:50:20 +01:00
Julien Fontanet
b3bc9a2edd fix(package): update xen-api to 0.16.2 2018-01-09 17:48:04 +01:00
Julien Fontanet
90369acb63 fix(xen-api): remove undefined fields during preparation 2018-01-09 17:47:46 +01:00
Julien Fontanet
94e84ce55f fix(package): update xen-api to 0.16.1 2018-01-09 17:31:37 +01:00
Julien Fontanet
68cef1aa5d feat(xen-api): 0.16.1 2018-01-09 17:28:42 +01:00
Julien Fontanet
2f9ecb8fa8 fix(xen-api): fix integer param preparation 2018-01-09 17:28:13 +01:00
Julien Fontanet
6281374cf3 chore(package): update dependencies 2018-01-09 17:25:42 +01:00
Julien Fontanet
13580923ea fix(api/vm): export delete method 2018-01-09 15:19:23 +01:00
Julien Fontanet
898434b267 Revert "chore(package): use React 16 (#2552)"
This reverts commit c8669dc88f.

Let's go back to React 15 until we move away from react-bootstrap.
2018-01-09 14:21:03 +01:00
Julien Fontanet
6f6e760a25 feat(normalize-packages): remove package-lock.json 2018-01-09 11:36:37 +01:00
Julien Fontanet
38fb549709 feat(import-packages): no commit hooks on move 2018-01-09 11:36:27 +01:00
Julien Fontanet
6e44c65a07 chore: fixes various warnings (#2554) 2018-01-08 15:18:15 +01:00
Julien Fontanet
736b00b4e2 chore(test): minor conf 2018-01-08 14:47:50 +01:00
Julien Fontanet
b5a139619a chore(build): remove Gulp & co. 2018-01-08 14:47:39 +01:00
Julien Fontanet
03028bca50 chore(Pagination): own implementation instead of react-bootstrap (#2549) 2018-01-08 14:43:50 +01:00
Julien Fontanet
b835c5bd40 chore(api): decaffeinate vm (#644) 2018-01-08 14:31:04 +01:00
Julien Fontanet
a65b1325fc chore(api): decaffeinate vbd (#642) 2018-01-08 13:56:41 +01:00
Julien Fontanet
cfcd302294 chore(api): decaffeinate vdi (#643) 2018-01-08 12:00:30 +01:00
Julien Fontanet
a601154fc7 chore(api): decaffeinate host (#641) 2018-01-08 11:48:32 +01:00
Julien Fontanet
c8669dc88f chore(package): use React 16 (#2552) 2018-01-08 09:46:08 +01:00
Julien Fontanet
82240979c2 chore(react-select): autofocus → autoFocus (#2550) 2018-01-08 09:40:35 +01:00
Julien Fontanet
db5d495105 fix(addSubscription): export as default 2018-01-05 15:52:35 +01:00
Julien Fontanet
6e8dfe8833 chore(utils): remove unused checkPropsState 2018-01-05 15:48:21 +01:00
Julien Fontanet
242d9e20c4 chore(addSubscriptions): move into own module 2018-01-05 15:48:21 +01:00
Julien Fontanet
d4e46a0696 chore(package): update dependencies 2018-01-05 13:40:06 +01:00
Julien Fontanet
d5deaf72f7 5.15.2 2018-01-04 11:52:24 +01:00
Julien Fontanet
f9c942d526 fix(Xapi#createVbd): explicitly cast to boolean (#640)
Fixes vatesfr/xo-web#2558

Necessary because Xapi objects may contains integers instead of booleans.
2018-01-04 11:49:07 +01:00
Julien Fontanet
e446eb0cd0 chore(build): fix PostCSS warning 2018-01-03 18:26:02 +01:00
Julien Fontanet
b63efe579a fix(build): temporary use stage-0
The compiled code has an issue with stage-3 and plugins
2018-01-03 15:50:08 +01:00
Julien Fontanet
f3410f1491 chore(package): remove unused redux devtool 2018-01-03 15:03:09 +01:00
Julien Fontanet
b27ac11d56 chore(jsx): remove unnecessary braces 2018-01-03 10:00:32 +01:00
Julien Fontanet
a55d73614e chore(package): missing peer dependency 2018-01-02 22:29:02 +01:00
Julien Fontanet
25cd1957c7 chore(package): update Babel conf
- preset-es2015 → preset-env
- preset-stage-0 → preset-stage-3 + handpicked plugins
2018-01-02 22:20:55 +01:00
Pierre Donias
abd97abc24 fix(xosan): beta-is-over message (#2546) 2018-01-02 21:50:40 +01:00
Julien Fontanet
6ddfd909f0 chore(package): add clean script 2018-01-02 19:01:33 +01:00
Julien Fontanet
e054eec555 chore(gulpfile): fix sourcemaps 2018-01-02 19:01:33 +01:00
Olivier Lambert
e253657770 feat(home): bulk suspend VMs (#2551)
Fixes #2547
2018-01-02 17:16:11 +01:00
Olivier Lambert
041c32a4a7 feat(vm.start): resume VM if suspended (#639) 2018-01-02 16:47:42 +01:00
Julien Fontanet
102e629e16 chore(package): update dependencies 2018-01-02 10:04:27 +01:00
Julien Fontanet
2d0e3b93cc chore(import-packages): simplify move_commit implementation 2017-12-31 17:43:05 +01:00
Julien Fontanet
668d572549 feat(import-packages): add commit mode and make it the default 2017-12-31 13:15:19 +01:00
Julien Fontanet
e023809c8c feat(import-packages): import all branches 2017-12-31 00:46:41 +01:00
Julien Fontanet
0bcabb9f0d chore(Xapi#createVdi): better implementation (#637)
- accept a VDI record as sole parameter
- accept a high level size parameter which will be parsed if necessary
- remove unused `Xapi#_createVdi()`
2017-12-29 23:26:56 +01:00
Julien Fontanet
594a9d5399 chore(Xapi#createVbd): returns undefined (#638)
The returned ref is unused for now.
2017-12-29 23:26:24 +01:00
Julien Fontanet
242a02836c 5.15.1 2017-12-29 17:26:35 +01:00
Julien Fontanet
b144382831 5.15.1 2017-12-29 17:24:16 +01:00
Pierre Donias
6936f223f3 fix(new-xosan): suggestions can be null as well (#2544) 2017-12-29 17:24:00 +01:00
Julien Fontanet
7e64e1a11e 5.15.0 2017-12-29 16:09:36 +01:00
Pierre Donias
54772fad33 feat(xosan): license management (#628) 2017-12-29 16:07:49 +01:00
Julien Fontanet
892139908b fix(Xapi#resizeVdi): XS 7.3 support (#636)
Fixes vatesfr/xo-web#2542

According to the documentation, no SR backends were supporting `resize_online`.
2017-12-29 10:20:04 +01:00
Julien Fontanet
ba6393165d fix(Xapi#moveVdi): XS 7.3 support (#635) 2017-12-29 09:57:32 +01:00
Julien Fontanet
2174a9cec7 fix(precommit hook): pass if no tests found 2017-12-28 17:19:39 +01:00
Julien Fontanet
5fe03f2934 fix(Xapi#editVm): XS 7.3 support for memory (#634)
Fixes vatesfr/xo-web#2540
2017-12-28 15:22:03 +01:00
Julien Fontanet
09e7f04794 dont use set_memory_limits if VM is running 2017-12-28 15:05:11 +01:00
Julien Fontanet
feecd51770 inline constants 2017-12-28 14:52:02 +01:00
Julien Fontanet
b5a855b2ad fix(Xapi#editVm): XS 7.3 support for memory
Fixes vatesfr/xo-web#2540
2017-12-28 14:50:11 +01:00
badrAZ
0b6bb65c17 chore(JobExecutor): use value-matcher (#633) 2017-12-28 11:51:23 +01:00
Julien Fontanet
79ea50c829 feat(complex-matcher): 0.1.1 2017-12-27 16:39:57 +01:00
Julien Fontanet
8532d563de feat(complex-matcher): empty string is supported (#31) 2017-12-27 16:38:42 +01:00
Julien Fontanet
2e945e8349 chore(value-matcher): mark as public 2017-12-27 15:24:06 +01:00
Julien Fontanet
22e3037e85 feat(value-matcher): new package (#30) 2017-12-27 15:21:27 +01:00
Julien Fontanet
a505ded8a1 feat: run flow at root level 2017-12-27 10:49:31 +01:00
Julien Fontanet
bea7b90eb2 chore(xo-cli): update dependencies 2017-12-27 10:39:05 +01:00
Julien Fontanet
e1eb948c54 chore(package): update dependencies 2017-12-27 10:01:56 +01:00
Julien Fontanet
1b42523e2d feat(complex-matcher): new package (#28) 2017-12-22 13:08:24 +01:00
Julien Fontanet
ed7a40bc73 chore: update dependencies 2017-12-22 10:27:05 +01:00
Julien Fontanet
c8dc786008 chore: remove VM metadata export/import (#631) 2017-12-21 10:49:50 +01:00
Julien Fontanet
a6869638f5 chore(package): upgrade golike-defer to 0.4.1 (#632) 2017-12-21 09:55:13 +01:00
Julien Fontanet
3ef08d3d5e chore(package): update dependencies 2017-12-19 16:35:06 +01:00
Julien Fontanet
5b7a9fe969 fix(scripts/utils): ignore missing package.json 2017-12-18 14:10:13 +01:00
Julien Fontanet
97d54cab11 chore: update dependencies 2017-12-18 13:14:39 +01:00
Julien Fontanet
980a1cc205 chore(normalize-packages): remove ESLint config 2017-12-15 14:45:53 +01:00
Julien Fontanet
9517686e22 chore(normalize-packages): remove .travis.yml 2017-12-15 14:45:17 +01:00
Julien Fontanet
4905a0310a feat: use ESLint instead of standard (#630) 2017-12-15 14:18:47 +01:00
Julien Fontanet
d2f88d0a02 5.14.3 2017-12-15 14:04:42 +01:00
Julien Fontanet
76000d2563 feat(package): XenServer 7.3 support 2017-12-15 14:03:08 +01:00
Julien Fontanet
bc02d51882 feat(xen-api): 0.16.0 2017-12-15 13:59:34 +01:00
Julien Fontanet
aada9e4a33 feat(xen-api): XenServer 7.3 support (#27)
XenServer 7.3 has changed the error format.
2017-12-15 13:58:31 +01:00
Julien Fontanet
cf47a80676 chore(package): always use yarn 2017-12-14 18:51:47 +01:00
Julien Fontanet
c190067181 chore(README): always use yarn 2017-12-14 18:01:51 +01:00
Julien Fontanet
4490a2508b chore(package): update ignored files 2017-12-14 18:00:57 +01:00
Julien Fontanet
938e7704e6 chore(editorconfig): minor fixes and updates 2017-12-14 18:00:20 +01:00
Julien Fontanet
d93eda34c9 feat(XapiStats): limit concurrency (#627)
Avoid major memory issues.
2017-12-12 19:22:55 +01:00
Julien Fontanet
b84ad98fd0 chore(remote-handlers): minor changes 2017-12-12 12:40:55 +01:00
Julien Fontanet
abf526f91a chore(normalize-package): remove eslint 2017-12-12 12:31:39 +01:00
Julien Fontanet
c06020745e chore(import-packages): support git URLs 2017-12-12 12:08:21 +01:00
Julien Fontanet
431b85c98f chore(package): split pretest into pretest and test 2017-12-12 12:07:06 +01:00
Julien Fontanet
299fdc19d6 chore(scripts): coding style 2017-12-12 12:06:32 +01:00
Julien Fontanet
7531a25588 feat(XapiStats): limit concurrency 2017-12-12 10:00:49 +01:00
Julien Fontanet
d8f89191e8 5.14.2 2017-12-11 15:36:37 +01:00
Julien Fontanet
d9ad53d954 fix(backupVm): remove XVA on failure (#626)
Fixes vatesfr/xo-web#2524
2017-12-11 14:40:52 +01:00
Julien Fontanet
043fc5cdfc feat(NFS): force unmount (#625)
See vatesfr/xo-web#2496
2017-12-08 17:22:27 +01:00
Julien Fontanet
bf3f9b4ac2 chore(ci): test on old-LTS, LTS and stable 2017-12-05 18:37:03 +01:00
Julien Fontanet
4c91667d2c chore: remove dependency-check (#25) 2017-12-05 11:46:02 +01:00
Julien Fontanet
a3fe9aff94 chore(api): only set id from namespace if string 2017-12-05 09:00:07 +01:00
Julien Fontanet
ed45888d7f fix(xen-api): handle RO in createTask() and putResource() 2017-12-03 18:10:57 +01:00
Julien Fontanet
dbadc487ae chore(package): update dependencies 2017-12-03 18:10:57 +01:00
Julien Fontanet
a5b80655da chore: clean Babel configs (#24)
- avoid using stage-0
- remove deprecated preset-latest in favor of preset-env
2017-11-27 12:59:04 +00:00
Julien Fontanet
99d4789049 chore(xen-api): properly logout on disconnect() 2017-11-26 20:07:28 +00:00
Julien Fontanet
2de4163553 fix(xen-api): handle RO in callAsync() 2017-11-26 20:00:40 +00:00
Julien Fontanet
0fc0be19b2 feat(xen-api): XenApi#getRecord() 2017-11-26 20:00:40 +00:00
Julien Fontanet
3c271ffffd feat(xo-cli): prepare params 2017-11-26 20:00:40 +00:00
Julien Fontanet
155422bcb5 chore(package): remove dependency-check
Requires the code to be built.
2017-11-24 17:58:39 +01:00
Julien Fontanet
68b6dc5985 fix(xo#_watchObjects): call on start
The bug was introduced in bd18a92.
2017-11-24 17:43:12 +01:00
Julien Fontanet
1aa793886b feat(xo-server-transport-email): 0.5.0 2017-11-24 14:03:59 +01:00
Julien Fontanet
46cd2f10a5 feat(xo-server-auth-saml): 0.5.0 2017-11-24 14:02:06 +01:00
Julien Fontanet
337abe2a2b feat(xo-server-auth-ldap): 0.6.4 2017-11-24 14:00:37 +01:00
Julien Fontanet
0441103f0c feat(xo-cli): 0.10.1 2017-11-24 13:57:36 +01:00
Julien Fontanet
b5829e2484 chore(package): update dependencies 2017-11-24 13:35:51 +01:00
Julien Fontanet
c23be2185a chore(package): prepublish → prepublishOnly 2017-11-23 12:19:30 +01:00
Julien Fontanet
c43ea11017 fix(api): do not log nested passwords (#624)
Fixes vatesfr/xo-web#2506
2017-11-23 11:21:06 +01:00
Julien Fontanet
bd18a9270e feat(config): run clean after import (#623) 2017-11-22 15:18:02 +01:00
Julien Fontanet
e24cba9684 feat: more normalization
- remove config.commitizen
- remove left over devDependencies[babel-eslint]
- remove scripts.commitmsg
2017-11-21 14:55:35 +01:00
Julien Fontanet
084e96be0e chore: eslint instead of standard (#22)
Custom rules:

- comma dangle
- no `var`s
- use `const` AMAP
2017-11-21 14:35:44 +01:00
Julien Fontanet
5dfefe8d35 chore: eslint instead of standard 2017-11-21 11:47:21 +01:00
Julien Fontanet
4a6ba998d4 feat(xo-server-backup-reports): 0.9.1 2017-11-20 13:55:52 +01:00
Julien Fontanet
7f953c62af chore: update human-format to 0.9.0 2017-11-20 13:53:28 +01:00
Julien Fontanet
c9412b02af chore: update dev dependencies 2017-11-20 13:52:04 +01:00
Julien Fontanet
536a9d6e50 chore(xo-server-backup-reports): remove unnecessary babel-preset-stage-0 2017-11-20 13:47:45 +01:00
Julien Fontanet
4ee0944037 feat(xo-server-backup-reports): add plugin version in footer (#23) 2017-11-20 10:20:40 +01:00
Julien Fontanet
98f5db9fbd feat: standard and jest only on committed files 2017-11-17 15:45:15 +01:00
Julien Fontanet
bbefa3a009 5.14.1 2017-11-17 14:57:12 +01:00
Julien Fontanet
575fe300fa feat(xo-server-backup-reports): 0.9.0 2017-11-17 14:51:21 +01:00
badrAZ
4749e452c4 feat(xo-server-backup-reports): add merge size and speed (#21)
See vatesfr/xo-web#2426
2017-11-17 14:17:30 +01:00
badrAZ
0881b66ab6 feat(backups): get the merged data size and its duration for Delta backups (#618)
See vatesfr/xo-web#2426
2017-11-17 13:07:08 +01:00
Pierre Donias
50966dce5d fix(xapi-object-to-xo/vm): auto_poweron (#621)
Fixes vatesfr/xo-web#2489
2017-11-16 11:21:49 +01:00
Julien Fontanet
0e6bcefee6 feat: run clean at startup (#620)
Fixes vatesfr/xo-web#2492
2017-11-16 11:10:09 +01:00
Julien Fontanet
41ec831df0 feat(xo.clean): remove all but 1e4 most recent logs
See vatesfr/xo-web#2492
2017-11-15 11:11:32 +01:00
Nicolas Raynaud
f33ea6c47c feat(xosan): rc1 (#608) 2017-11-13 17:58:53 +01:00
Julien Fontanet
f419ec5702 chore(package): update dependencies 2017-11-13 17:36:10 +01:00
Julien Fontanet
24b7dc1c30 feat(xen-api): 0.15.1 2017-11-13 17:25:54 +01:00
Julien Fontanet
4619e387ad chore(Xapi#createCloudInitConfigDrive): ignore all import errors
Fixes vatesfr/xo-web#2478
2017-11-13 17:18:55 +01:00
Julien Fontanet
d7d2425435 chore(Xapi#createCloudInitConfigDrive): remove useless param 2017-11-13 17:15:05 +01:00
Julien Fontanet
2c99a4db0f feat(xen-api): expose putResource URL on failure 2017-11-13 16:03:58 +01:00
Olivier Lambert
8dd5428ef6 feat(vm.deltaCopy): add *Continuous Replication* tag to copies (#617)
Fixes vatesfr/xo-web#2473
2017-11-08 15:10:59 +01:00
Julien Fontanet
88d9111196 feat: run jest at root level 2017-11-08 15:04:07 +01:00
Julien Fontanet
8ec30ec76d chore(package): update xen-api to 0.15.0
Fibonacci backoff on XenAPI calls.
2017-11-08 11:34:24 +01:00
Julien Fontanet
17e9885586 feat(xen-api): 0.15.0 2017-11-08 11:02:33 +01:00
Julien Fontanet
826628b18f chore(normalize-packages): remove commitizen 2017-11-08 10:56:18 +01:00
Julien Fontanet
a49c9d646c fix(Travis): do not test on Node 4 2017-11-06 10:14:18 +01:00
Julien Fontanet
d7e2690430 fix(XoStore): import repair directly from level 2017-11-06 10:09:24 +01:00
Julien Fontanet
71ab2dedb9 chore(package): update dependencies 2017-11-06 10:00:38 +01:00
Julien Fontanet
9e9027d4c6 5.14.0 2017-10-31 17:47:24 +01:00
Pierre Donias
a43dfc62c2 feat(VM): create/destroy vGPUs (#615)
See vatesfr/xo-web#2413
2017-10-31 17:46:07 +01:00
Julien Fontanet
c84f61d388 feat: standard run at root level
Simplify & uniformize standard confirmation.
Single pass for all packages, which is faster.

Unfortunately, it breaks atom's linter-js-standard.
2017-10-30 10:59:35 +01:00
Julien Fontanet
11b1ff478e feat: use Yarn workspaces
Much faster installation which is very important for CI.

We'll see if it proves difficult for deps management.
2017-10-30 10:59:35 +01:00
Julien Fontanet
ea7c44b544 feat(xen-api): implements Fibonacci backoff (#17) 2017-10-28 13:14:15 +02:00
Julien Fontanet
56cf6fba2f feat(vm.deltaCopy): include time in replication name (#614)
Fixes vatesfr/xo-web#2431
2017-10-26 18:18:37 +02:00
Julien Fontanet
ef9f75514f feat(xapi-objects-to-xo): add gpuGroup and vgpuType (#613)
See vatesfr/xo-web#2413
2017-10-23 15:48:08 +02:00
Olivier Lambert
bd4644dd4f use camelCase everywhere 2017-10-23 15:40:39 +02:00
Olivier Lambert
f419cd6ac8 finalize all needed XAPI to XO objects for VGPU management 2017-10-23 15:21:35 +02:00
Olivier Lambert
e714303f96 use double escape to get the right type 2017-10-23 11:57:59 +02:00
Julien Fontanet
50581c539c chore(xo-cli): use modern ES 2017-10-23 11:14:46 +02:00
Olivier Lambert
6eed3f2fc7 last modifications 2017-10-21 18:50:09 +02:00
Olivier Lambert
7c5000d588 feat(objects): add gpu group and vgpu type 2017-10-20 22:30:11 +02:00
Julien Fontanet
ec0dd0b174 chore(recover-account): live → leave 2017-10-20 10:14:43 +02:00
Julien Fontanet
a5f55c5f92 5.13.2 2017-10-18 17:53:50 +02:00
Julien Fontanet
7412a6c01b fix(constant-stream): move outside of node_modules
npm 5 correctly not package all node_modules entries, therefore breaking
xo-server package.
Stop doing this for the moment.
2017-10-18 17:53:00 +02:00
Julien Fontanet
5983ea32fd 5.13.1 2017-10-18 17:20:58 +02:00
Pierre Donias
5716130e6f feat(patching): expose paid prop & do not install paid patches (#612)
See vatesfr/xo-web#2382
2017-10-18 17:14:41 +02:00
Julien Fontanet
37f0bffcaa feat(xo-cli): 0.10.0 2017-10-17 17:14:38 +02:00
Julien Fontanet
0e6a460332 feat(xo-cli): register supports expiresIn flag
See vatesfr/xo-web#1769
2017-10-17 17:13:33 +02:00
Julien Fontanet
28172607c6 feat(token.create): expiresIn param (#611)
Fixes vatesfr/xo-web#1769
2017-10-17 15:22:34 +02:00
Julien Fontanet
cdd9eed3d8 chore(utils/scheduleFn): add comment regarding month range 2017-10-16 15:25:30 +02:00
Julien Fontanet
34ef2700f2 fix(api): do not log password param (#610)
Fixes vatesfr/xo-web#2363
2017-10-16 10:06:24 +02:00
Julien Fontanet
38742d0668 chore(package): update xen-api to 0.14.3
Related to vatesfr/xo-web#2418
2017-10-09 12:37:19 +02:00
Julien Fontanet
0c9f6e0923 feat(xen-api): 0.14.3 2017-10-09 12:02:11 +02:00
Julien Fontanet
56d6347209 fix(xen-api): barrier compat with XS < 6.1 (#15)
New implementation needs to modify the pool record but is simpler and does not rely on `event.inject`.

Fixes vatesfr/xo-web#2418.
2017-10-09 11:58:02 +02:00
Julien Fontanet
2db582339a feat(xo-cli): 0.9.1 2017-10-05 20:48:23 +02:00
Julien Fontanet
7f6386dd8c fix(xo-cli): remove incorrect change 2017-10-05 20:47:47 +02:00
Julien Fontanet
92e33efc04 Merge remote-tracking branch 'xo-server-transport-slack/master' 2017-10-05 18:18:25 +02:00
Julien Fontanet
805409cb48 chore: remove husky from packages deps 2017-10-05 18:01:00 +02:00
Julien Fontanet
93400352ca Merge remote-tracking branch 'xo-vmdk-to-vhd/master' 2017-10-05 17:58:30 +02:00
Julien Fontanet
585b943a52 Merge remote-tracking branch 'xo-server-auth-google/master' 2017-10-05 17:44:35 +02:00
Julien Fontanet
a0bf1bca8b Merge remote-tracking branch 'xen-api/master' 2017-10-05 17:36:11 +02:00
Julien Fontanet
738e3a0fbe feat(normalize-packages): remove .editorconfig and .gitignore 2017-10-05 17:32:32 +02:00
Julien Fontanet
05f3171910 feat(import-packages): script to import packages into monorepo 2017-10-05 17:30:39 +02:00
Julien Fontanet
f0771e4fed chore: update root deps
Do not use yarn workspaces for the moment because it's still quite buggy.
2017-10-05 16:15:00 +02:00
Julien Fontanet
a3cd3b3fb1 feat(xo-cli): 0.9.0 2017-10-05 15:41:14 +02:00
Julien Fontanet
323577f1ca chore(package): update dependencies 2017-10-05 15:38:49 +02:00
Julien Fontanet
d22619adc7 feat(list-objects): move filter to server-side 2017-10-05 13:30:20 +02:00
Julien Fontanet
d9ab8e83dc fix(XoBackups#deltaCopyVm): wait for the VDI exports to finish (#603)
It should prevent the creation of orphan snapshots on the source side.
2017-10-03 11:49:41 +02:00
Julien Fontanet
d5e783e7e6 chore(package): update dependencies 2017-10-02 11:42:08 +02:00
Julien Fontanet
f20604d3ad 5.13.0 2017-09-29 15:03:22 +02:00
Nicolas Raynaud
6b17e80e28 feat(xosan): beta 2+ (#601) 2017-09-29 14:46:34 +02:00
Nicolas Raynaud
c996b61eae fix(pif.reconfigureIp): send '' to XAPI for null values (#607)
Fixes vatesfr/xo-web#2346
2017-09-28 19:24:39 +02:00
Julien Fontanet
025cb6c6ca chore: update yarn.lock
Due to new releases of yarn
2017-09-28 14:56:53 +02:00
Pierre Donias
1715dadf8f feat(self): handle add/remove VDI on VM (#605)
See vatesfr/xo-web#2348
2017-09-27 17:36:23 +02:00
Olivier Lambert
70d75d1c69 fix(iscsi): fix chapUser/chapPassword case (#606)
Fixes vatesfr/xo-web#2339
2017-09-26 19:50:25 +02:00
Julien Fontanet
1b76ad4252 feat(xo.getAllObjects): accepts filter and limit params (#604) 2017-09-25 10:56:12 +02:00
Julien Fontanet
22772a5fac feat(xo-server-recover-account): password generation support
Fixes vatesfr/xo-web#2360
2017-09-20 11:54:06 +02:00
Julien Fontanet
3bd7798eda fix(HTTPS): correctly use secure options
Extra TLS options where not used due to incorrect code, it is now fixed.
2017-09-15 11:43:02 +02:00
Julien Fontanet
a6c2622f6b chore(Xo#getObjects): remove unused code 2017-09-13 17:15:15 +02:00
Julien Fontanet
454412d9d4 chore(utils/lightSet): minor improvement in clear method 2017-09-13 14:38:40 +02:00
Julien Fontanet
1037083ed2 chore(JobExecutor): remove unused property 2017-09-08 17:36:44 +02:00
Nicolas Raynaud
7f87a03830 fix(XOSAN): estimated gluster size could be wrong (#602) 2017-09-08 09:59:38 +02:00
Julien Fontanet
4815af35cf feat(Collection/Redis): case insensitive indexes (#600)
Fixes vatesfr/xo-web#2337
2017-09-06 16:58:52 +02:00
badrAZ
f5fc17c10e feat(jobs): fail the smart backup job when it's empty (#594)
See vatesfr/xo-web#2253
2017-09-04 16:14:20 +02:00
Julien Fontanet
06ad1dcb02 fix(XoBackups#deltaCopyVm): do not always delete base (#599)
Only when there are no VMs with the TAG_SOURCE_VM for this source VM.
2017-09-04 16:03:15 +02:00
Julien Fontanet
cb4276a2ee chore(package): update dependencies 2017-09-04 15:44:09 +02:00
badrAZ
cf5f9d4080 fix(Xapi#CreateVm): wait for the cloned vifs to be correctly deleted (#574) 2017-09-04 15:18:42 +02:00
Julien Fontanet
f5febef10f 5.12.1 2017-08-31 18:32:01 +02:00
Julien Fontanet
f89d8d22a0 fix(vm.deltaCopy): fix initial case 2017-08-31 18:31:30 +02:00
Julien Fontanet
757a1e2353 5.12.0 2017-08-31 18:04:49 +02:00
Nicolas Raynaud
08d7c189eb feat(xosan): beta 2 (#598) 2017-08-31 17:35:48 +02:00
Julien Fontanet
5e11e87a0c feat(vm.deltaCopy): retention param (#597)
See vatesfr/xo-web#1692
2017-08-31 17:20:58 +02:00
Julien Fontanet
84d7ba5758 chore(package): update dependencies 2017-08-28 11:57:12 +02:00
Julien Fontanet
083f3df29d 5.11.3 2017-08-09 16:23:20 +02:00
Julien Fontanet
429fa1553b fix(package): update xen-api to 0.14.2
Fixes vatesfr/xo-web#2304
2017-08-09 16:20:29 +02:00
Julien Fontanet
15809333c1 0.14.2 2017-08-09 16:17:51 +02:00
Julien Fontanet
815855964e chore(package): update dev dependencies 2017-08-09 16:17:28 +02:00
Julien Fontanet
5649a10c44 fix(Xapi#barrier): handle merged events 2017-08-09 16:15:38 +02:00
Julien Fontanet
075f94d438 5.11.2 2017-08-08 13:05:21 +02:00
Julien Fontanet
a2b06972d0 fix(Xapi#_deleteVm): fix parallel calls
Fixes vatesfr/xo-web#2297
2017-08-08 13:03:44 +02:00
Julien Fontanet
5bb27131a3 0.14.1 2017-08-08 12:57:04 +02:00
Julien Fontanet
d06aacbe25 feat(xapi#barrier): can be done on a specific object
The function now returns an up-to-date record of the object.
2017-08-08 12:56:35 +02:00
Olivier Lambert
5488a2d60a Merge pull request #593 from vatesfr/setPoolMaster
feat(pool): ability to designate a new master
2017-08-03 11:37:31 +02:00
badrAZ
851182a92e feat(pool): ability to designate a new master
See vatesfr/xo-web#2213
2017-08-03 11:21:53 +02:00
Julien Fontanet
f263097008 5.11.1 2017-08-02 14:19:56 +02:00
Julien Fontanet
21fee6122f fix(vm.deltaCopy): correctly destroy VDIs (2) (#591) 2017-08-02 14:17:38 +02:00
Julien Fontanet
68a94da44c feat(vm.deltaCopy): force param to bypass VDI chains check (#592) 2017-08-02 12:41:20 +02:00
Julien Fontanet
1ded2f8101 5.11.0 2017-07-31 18:30:54 +02:00
Julien Fontanet
e3d436a019 fix(vm.deltaCopy): correctly destroy VDIs (#589) 2017-07-31 18:30:31 +02:00
Julien Fontanet
d9a5764dda 0.14.0 2017-07-31 18:04:32 +02:00
Julien Fontanet
9859afe8b7 feat(Xapi#barrier): waits for all events to have been received 2017-07-31 18:04:00 +02:00
Julien Fontanet
76357fb918 fix(CollectionRedis): do not fail when entry does not exist (#590) 2017-07-31 14:35:31 +02:00
Pierre Donias
2a6c476189 fix(vm.create): assign device to VDIs (#586) 2017-07-27 19:39:08 +02:00
Julien Fontanet
7132a68a73 fix(Xapi#_getUnhealthyVdiChainLength): do not fail on missing VDI 2017-07-27 11:26:47 +02:00
badrAZ
b9e2a28915 feat(sr): get the non-healthy vdi chains (#587)
See  vatesfr/xo-web#2178
2017-07-26 14:04:30 +02:00
Julien Fontanet
465c25e71c chore(package): update dependencies 2017-07-25 13:06:55 +02:00
Julien Fontanet
c6851cd31e chore(package): update dev dependencies 2017-07-25 12:59:55 +02:00
badrAZ
026e4a8982 fix(server.set): some props requires server to be disconnected (#580) 2017-07-18 10:59:19 +02:00
Pierre Donias
e5bd024de2 fix(Xapi#createBondedNetwork): mac param should be a string (#588) 2017-07-17 20:58:15 +02:00
Julien Fontanet
f05117b6a4 5.10.2 2017-07-07 15:11:11 +02:00
badrAZ
4932f417b6 fix(CollectionRedis): update indexes on update/remove (#581) 2017-07-07 14:52:29 +02:00
Pierre Donias
6d0dcce5e3 fix(vdi.set): properly get resource set when resizing (#585) 2017-07-06 10:35:09 +02:00
Julien Fontanet
1194f7e1b3 feat(xo.clean): rebuild Redis indexes (#583) 2017-07-06 10:19:57 +02:00
Julien Fontanet
a4087530c5 0.13.7 2017-07-05 18:05:28 +02:00
Julien Fontanet
d5fae68b98 fix(cli): fix URL handling 2017-07-05 18:05:24 +02:00
Julien Fontanet
457483f373 5.10.1 2017-07-05 17:46:36 +02:00
Pierre Donias
7f706bdbe9 fix(Xapi#findAvailableSharedSr): should not be async (#584)
Fixes vatesfr/xo-web#2262
2017-07-05 17:46:22 +02:00
Julien Fontanet
9f7c01599e chore(Xapi#connect): use auth var directly 2017-07-05 17:17:54 +02:00
Julien Fontanet
b462f57060 fix(Xapi#uploadPoolPatch): fix patch upload (#582)
Fixes vatesfr/xo-web#2254
2017-07-05 10:44:24 +02:00
Julien Fontanet
28faaf32d2 chore(package): update xen-api to 0.13.6 2017-07-05 10:36:35 +02:00
Julien Fontanet
9a0090570c 0.13.6 2017-07-05 10:35:20 +02:00
Julien Fontanet
5ef22f9921 fix(Xapi#watchTask): do not parse task result
It is not always a XML-RPC value.
2017-07-05 10:35:00 +02:00
Julien Fontanet
1239f80018 feat(cli): accept credentials as part of the URL 2017-07-05 10:08:34 +02:00
Julien Fontanet
49d1d060d6 chore(README): various changes 2017-07-05 10:07:38 +02:00
Julien Fontanet
c21c6f3a55 fix(Xapi#uploadPoolPatch): fix patch upload
Fixes vatesfr/xo-web#2254
2017-07-04 17:45:36 +02:00
Julien Fontanet
1b161843ed fix(backup.list): do not fail on unparseable files
This method used to fails when encountering non-XO files, it should silently ignore them.
2017-07-04 14:44:37 +02:00
Julien Fontanet
084650e8ba feat(utils/asyncMap): collection can be a promise 2017-07-04 14:06:40 +02:00
Julien Fontanet
dd5c32f889 chore(utils): no longer export isPromise 2017-07-04 14:06:22 +02:00
Julien Fontanet
2cfa31609e chore(*): update dev dependencies 2017-07-04 11:07:35 +02:00
Julien Fontanet
64101c8337 chore: update dependencies 2017-07-04 10:42:44 +02:00
Julien Fontanet
241fed25a2 chore(xo-server-auth-github): remove trace dep
Conflicts with Node 8.
2017-07-04 10:42:44 +02:00
Julien Fontanet
209b34e451 Update README.md 2017-07-03 09:25:58 +02:00
Julien Fontanet
b73add61c6 5.10.0 2017-06-30 18:14:24 +02:00
Julien Fontanet
46067a4e56 fix(vm.migrate): handle empty optional sr param
Fixes vatesfr/xo-web#2248
2017-06-30 17:30:00 +02:00
badrAZ
6089ebae2a fix(vdi.set): cannot exceed the limited size defined in the resourceSet (#571)
If this VDI is attached to a single VM in a resource set, check user and limits.

Fixes vatesfr/xo-web#2198
2017-06-30 17:13:47 +02:00
Nicolas Raynaud
58ec9f4676 update noVNC to latest upstream version (#455)
See vatesfr/xo-web#404
2017-06-30 16:57:03 +02:00
badrAZ
d4f8d98d2b feat(vm.importDeltaBackup): custom VDI→SR mapping (#567)
See vatesfr/xo-web#2070
2017-06-30 15:52:12 +02:00
Julien Fontanet
9df1716480 chore(XoBackups#deltaCopyVm): remove debug 2017-06-30 14:58:38 +02:00
Julien Fontanet
9c34e64d0e chore: improve backup/export/import code (#575)
Should fixes vatesfr/xo-web#2227
2017-06-30 13:09:04 +02:00
Julien Fontanet
5e50ed15bd feat(xo-server-cloud): 0.2.1 2017-06-29 17:49:55 +02:00
Julien Fontanet
b0bff55dac fix(xo-server-cloud): reopen connection on close 2017-06-29 17:49:09 +02:00
Julien Fontanet
81cad34170 chore(xo-server-cloud): add yarn.lock 2017-06-29 17:47:08 +02:00
Julien Fontanet
c38379e229 chore(xo-server-cloud): update dependencies 2017-06-29 17:46:57 +02:00
Julien Fontanet
49ae88ff98 fix(XapiStats): do not use Xapi#getResource().readAll() 2017-06-29 17:27:18 +02:00
Julien Fontanet
33548c95aa debug: display end of export VDI stream 2017-06-29 15:11:48 +02:00
Julien Fontanet
1c2748c04b chore(Xapi#importDeltaVm): use asyncMap 2017-06-29 15:11:48 +02:00
Julien Fontanet
40041cd727 chore(Xapi): import pCatch directly from promise-toolbox 2017-06-29 15:11:48 +02:00
Julien Fontanet
cfc6374995 chore: replace ::pCatch(noop) with ::ignoreErrors() 2017-06-29 15:11:48 +02:00
Julien Fontanet
e3f1545cdb chore(XoBackups#rollingDeltaVmBackup): use cancel token 2017-06-29 15:11:48 +02:00
Julien Fontanet
bc853da09a chore(Xapi#exportDeltaVm): make it cancelable 2017-06-29 15:11:48 +02:00
Julien Fontanet
7bcece7f76 chore(Xapi#exportDeltaVm): remove unnecessary function 2017-06-29 15:11:48 +02:00
Julien Fontanet
168f48eea9 fix(Xapi#createCloudInitConfigDrive): ignore VDI_IO_ERROR while importing 2017-06-29 15:11:48 +02:00
Julien Fontanet
fd81f24030 fix(Xapi#createCloudInitConfigDrive): delete VDI on failure 2017-06-29 15:11:48 +02:00
Julien Fontanet
d851a8147d chore(Xapi#importVdiContent): rename stream to body 2017-06-29 15:11:48 +02:00
Julien Fontanet
e0e4099750 fix(XoBackups#deltaCopyVm): better use $onFailure 2017-06-29 15:11:48 +02:00
Julien Fontanet
adc54c8c51 chore(Xapi): use task param with {put,get}Resource 2017-06-29 15:11:48 +02:00
Julien Fontanet
0350838438 chore(package): update xen-api to 0.13.3 2017-06-29 15:11:48 +02:00
Julien Fontanet
5f10d9af5e chore(package): update http-request-plus to 0.4.0 2017-06-29 15:11:48 +02:00
Julien Fontanet
07945ef8a6 0.13.5 2017-06-29 15:09:17 +02:00
Julien Fontanet
35d7fa4a85 fix(Xapi#putResource): behave if close occurs before finish 2017-06-29 15:07:17 +02:00
Olivier Lambert
ad3a0d4c39 feat(host): forget a host in XAPI. Fixes vatesfr/xo-web#1934 (#578)
See vatesfr/xo-web#1934
2017-06-29 11:37:23 +02:00
Nicolas Raynaud
c6ca365e26 fix(Xapi#create{,Bonded}Network): clean in case of partial failure (#576) 2017-06-28 16:26:10 +02:00
Julien Fontanet
589d21bac0 chore(package): update promise-toolbox to 0.9.5 2017-06-27 11:32:13 +02:00
Julien Fontanet
0eb7bcd013 chore(Xapi#_createTask): replace with upstream Xapi#createTask 2017-06-27 11:32:13 +02:00
Julien Fontanet
87f694f698 chore(Xapi#_watchTask): replace with upstream Xapi#watchTask 2017-06-27 11:32:08 +02:00
Julien Fontanet
fbb6870310 0.13.4 2017-06-27 09:51:08 +02:00
Julien Fontanet
81efe25fbc chore(package): update http-request-plus to v0.4.0 2017-06-27 09:50:32 +02:00
Julien Fontanet
63d440677b fix(Xapi#*Resource): correctly link cancel token to tasks 2017-06-27 09:49:26 +02:00
Julien Fontanet
2e0df47581 chore(Xapi#putResource): no need to inject session_id in query again 2017-06-26 12:19:52 +02:00
Julien Fontanet
a84ced70a6 chore(package): update dependencies 2017-06-26 12:17:04 +02:00
Julien Fontanet
4a9498e25e 0.13.3 2017-06-26 10:03:34 +02:00
Julien Fontanet
1978e218f4 feat(Xapi#*Resource): task can be a ref to an existing task
Or a promise to a ref.
2017-06-23 21:24:27 +02:00
Julien Fontanet
2ab912c4f4 feat(Xapi#*Resource): link the cancel token with the task 2017-06-23 21:24:27 +02:00
Julien Fontanet
ca329fa2ff feat(Xapi#*Resource): use task by default if watching events 2017-06-23 21:24:27 +02:00
Julien Fontanet
db122ed8c5 0.13.2 2017-06-23 11:06:48 +02:00
Julien Fontanet
28d7f106b2 feat(Xapi#putResource): opt-in task creation and watching 2017-06-23 11:05:19 +02:00
Julien Fontanet
d6e46adfde feat(Xapi#getResource): opt-in task creation and watching 2017-06-23 11:05:19 +02:00
Julien Fontanet
93109fe9b8 chore(Xapi#watchTask): reject if task has been destroyed before settling 2017-06-22 19:03:52 +02:00
Julien Fontanet
439992d96f feat(Xapi#createTask): create an ephemeral task
Ephemeral means the task is automatically destroyed when settled.
2017-06-22 18:33:22 +02:00
Julien Fontanet
ff1653383b chore(package): update xen-api to 0.13.1 2017-06-22 15:41:23 +02:00
Julien Fontanet
f94fe0b325 0.13.1 2017-06-22 15:39:31 +02:00
Julien Fontanet
cc543ae33a chore(examples): usage for --raw 2017-06-22 15:34:08 +02:00
Julien Fontanet
5df1e62d53 chore(Xapi#putResource): always close the connection when data has been sent 2017-06-22 15:29:08 +02:00
Julien Fontanet
1dff6f81fc feat(examples): also accept UUID and name labels 2017-06-21 14:33:15 +02:00
Julien Fontanet
de7672bdfb feat(better-stacks): ignore modules starting with internal 2017-06-20 15:30:40 +02:00
Julien Fontanet
975da2c057 chore(package): update dependencies 2017-06-20 15:30:40 +02:00
Julien Fontanet
ecf2d95318 fix(Xapi#watchTask): correctly handle already settled tasks 2017-06-20 15:06:43 +02:00
Julien Fontanet
a1af272180 chore(Xapi#putResource): avoid unnecessary function creation 2017-06-20 14:52:24 +02:00
Julien Fontanet
72f0793aeb fix(Xapi#putResource): consume the response stream 2017-06-20 14:42:36 +02:00
Julien Fontanet
e150be6a3e 0.13.0 2017-06-14 14:05:01 +02:00
Julien Fontanet
d71b13f2a2 feat(Xapi#putResource): handle redirects 2017-06-14 14:04:43 +02:00
Julien Fontanet
66c88b37a4 chore(package): update http-request-plus to v0.3.0 2017-06-13 17:43:30 +02:00
Julien Fontanet
a7198d2e83 chore(examples): various improvements and fixes 2017-06-13 17:40:50 +02:00
Julien Fontanet
d3584b5820 feat: expose isOpaqueRef() 2017-06-13 14:03:04 +02:00
Julien Fontanet
e2e6267dd7 fix(Xapi#putResource): handle aborted connection 2017-06-13 14:03:00 +02:00
Pierre Donias
23ce94fdae fix(Xapi#canSrHaveNewVdiOfSize): better content_type check (#573)
Fixes vatesfr/xo-web#2215
2017-06-13 09:25:59 +02:00
Julien Fontanet
aa5baecdc3 feat(examples): moved into their own directory 2017-06-12 17:53:52 +02:00
Julien Fontanet
601b2aa6bb fix(Xapi#putResource): do not fail on early cancel hack 2017-06-12 17:36:48 +02:00
Julien Fontanet
d09ba38dbd feat(Xapi#constructor): url can contain credentials 2017-06-12 16:53:06 +02:00
Julien Fontanet
b847c2b7b5 chore(resources): add TODO 2017-06-12 16:53:06 +02:00
Julien Fontanet
30e44cb533 chore(Xapi#callAsync): use _sessionCall instead of call 2017-06-12 16:18:00 +02:00
Julien Fontanet
d43b83081b 0.12.3 2017-06-08 17:23:54 +02:00
Julien Fontanet
699363c548 chore(package): update promise-toolbox to v0.9.4
Fix an minor issue regarding Cancel#toString().
2017-06-08 17:21:16 +02:00
Julien Fontanet
6ea3eb4ba6 feat(Xapi#callAsync): cancellable async call 2017-06-08 17:21:16 +02:00
Julien Fontanet
4aa20b6f6a fix(Xapi#watchTask): handle already settled tasks 2017-06-08 17:21:16 +02:00
Julien Fontanet
9c8ea27238 feat(cli): auto Promise.all 2017-06-08 17:21:16 +02:00
Julien Fontanet
22c515b0e7 feat(Xapi#watchTask): returns a promise which settled when the task finishes 2017-06-08 17:21:16 +02:00
Julien Fontanet
a4ab8e712d 5.9.4 2017-06-08 10:22:01 +02:00
Julien Fontanet
fd75326bb8 fix(Xapi#_assertHealthyVdiChain): fix for NFS SR prior XS 7.1 (#568)
Fixes vatesfr/xo-web#2207
2017-06-08 10:18:40 +02:00
Julien Fontanet
51e09ecfcc feat(jobs): no concurrent runs (#570) 2017-06-08 09:43:19 +02:00
Julien Fontanet
72a53c0c09 Revert "fix: ensure a scope is used"
This reverts commit 3fbfbb1b2687de3d7c056a6790ad735b19eb9254.

No longer necessary, this is now fixed in vatesfr/xo-server@8c7d254244
2017-06-02 16:02:36 +02:00
Julien Fontanet
05e75c9a26 fix(Xo#registerPlugin): do not error if plugin not configured (#566) 2017-06-02 15:16:27 +02:00
Julien Fontanet
8c7d254244 fix(plugin.configure): auto inject default values (#565) 2017-06-02 14:48:15 +02:00
Julien Fontanet
9a5a0d7a2b fix: ensure a scope is used 2017-06-02 10:20:20 +02:00
Julien Fontanet
a18d88a3f1 chore(configuration): typo 2017-06-02 09:59:53 +02:00
Julien Fontanet
c49d68e457 5.9.3 2017-06-01 23:00:19 +02:00
Julien Fontanet
13fd265e49 fix(Xapi#_assertHealthyVdiChain): fix incorrect test
Related to 1336920a1a
2017-06-01 22:58:47 +02:00
Julien Fontanet
ea7b03a00c 5.9.2 2017-06-01 15:54:46 +02:00
Julien Fontanet
1336920a1a fix(Xapi#_assertHealthyVdiChain): behave when VDI is undefined
Fixes vatesfr/xo-web#2189
2017-06-01 15:54:10 +02:00
Pierre Donias
024d14d529 fix(Xapi#_installPoolPatchAndRequirements): ignore required patch if already installed (#564) 2017-06-01 15:28:03 +02:00
Julien Fontanet
61089c1128 5.9.1 2017-06-01 12:57:38 +02:00
Pierre Donias
8a74210049 fix(Xapi#createTemporaryVdiOnHost): properly get available SR (#562) 2017-06-01 12:57:14 +02:00
Julien Fontanet
a45a1b19b6 5.9.0 2017-05-31 18:15:32 +02:00
Julien Fontanet
f3d3c62809 fix(xapi-objects-to-xo): XenServer 5 support (#561) 2017-05-31 18:10:03 +02:00
Julien Fontanet
7e2bd52f25 0.12.2 2017-05-31 18:06:27 +02:00
Julien Fontanet
e65dd15edc feat(transports): add plain XML-RPC as last fallback (#65) 2017-05-31 18:05:46 +02:00
Pierre Donias
fec976a494 feat(host): update patches when joining pool (#560)
See vatesfr/xo-web#878
2017-05-31 17:58:39 +02:00
badrAZ
c18b49a4a1 feat(vm.drCopy): block start operation on copy (#558)
Fixes vatesfr/xo-web#2097
2017-05-31 16:07:57 +02:00
Pierre Donias
872eabefba feat(patching): support pool patching on XS 7.1 (#559)
See vatesfr/xo-web#2058
2017-05-31 15:47:31 +02:00
Julien Fontanet
feda929f0b feat(xapi-object-to-xo/host): patchesRequiringReboot (#556)
See vatesfr/xo-web#2124
2017-05-31 12:17:47 +02:00
Pierre Donias
6718193dee patchesRequiringReboot -> rebootRequired 2017-05-30 16:15:08 +02:00
Pierre Donias
d63ac7df1c feat(xapi-object-to-xo/host): patchesRequiringReboot
See vatesfr/xo-web#2124
2017-05-30 16:15:08 +02:00
Julien Fontanet
e462ff3f4b fix(Xapi#deleteVbd): add missing method 2017-05-30 16:05:50 +02:00
Julien Fontanet
8f84b767d2 chore(vbd.delete): use Xapi#deleteVbd() 2017-05-30 15:59:56 +02:00
Julien Fontanet
b7d746ee09 feat: improve HTTP handling (#546)
`Xo#httpRequest()` is used to make a request respecting XO settings like the proxy.

`Xapi#getResource()` and `Xapi#putResource()` are used to receive and send resources to/from a XenServer.
2017-05-29 15:07:24 +02:00
Julien Fontanet
83f3fcd913 fix(package): upgrade golike-defer to v0.1.0 (#555)
Errors are automatically caught and reported.
2017-05-29 10:46:41 +02:00
Julien Fontanet
781ffa5574 0.12.1 2017-05-26 17:50:47 +02:00
Julien Fontanet
8fe3b1a368 feat(Xapi#putResource): accept buffers 2017-05-26 17:49:14 +02:00
Julien Fontanet
039075736c fix(backups): fix unlink ENOENT (#552) 2017-05-26 15:53:26 +02:00
badrAZ
1bead03151 feat(vm.rollingDrCopy): previous backups can be removed first (#553)
See vatesfr/xo-web#2157
2017-05-26 13:18:07 +02:00
Julien Fontanet
e64dc51a17 feat(xo-cli): 0.8.4 2017-05-25 13:16:13 +02:00
Julien Fontanet
7f4df49933 chore(xo-cli): update all dependencies 2017-05-25 13:15:47 +02:00
Julien Fontanet
2bc77ee0cd feat(xo-lib): 0.9.0 2017-05-25 13:14:33 +02:00
Julien Fontanet
b25adf7f57 chore(xo-lib): update all dependencies 2017-05-25 13:08:57 +02:00
Julien Fontanet
bd0c2385e2 feat(Xapi#exportDeltaVm): detect unhealthy VDI chains (#551)
Fixes vatesfr/xo-web#2047
2017-05-23 16:42:15 +02:00
Julien Fontanet
689720b4b0 fix(package): update xen-api to 0.12 2017-05-23 15:50:36 +02:00
Julien Fontanet
69c48e2770 0.12.0 2017-05-23 15:47:01 +02:00
Julien Fontanet
aa934ad725 chore(package): update all dependencies 2017-05-23 15:46:53 +02:00
Julien Fontanet
8596ca607d fix(Xapi#call): mark as disconnected on network failures (#64)
Related to vatesfr/xo-web#2099
2017-05-23 15:45:16 +02:00
Julien Fontanet
191a14e6c0 chore(package): upgrade fs-extra to 3.0.1 2017-05-23 14:50:58 +02:00
badrAZ
9c5df507ae feat(vm.start): with force can bypass blocked operation (#550)
See vatesfr/xo-web#2119
2017-05-23 10:59:22 +02:00
Julien Fontanet
643ea9e523 feat: methods to get/put an HTTP resource (#63) 2017-05-22 15:51:41 +02:00
badrAZ
90be44738d feat(backups): transferred data size for CR & DR (#548)
See vatesfr/xo-web#2096
2017-05-19 15:55:25 +02:00
Julien Fontanet
dbbf6d8c1f feat(Xapi#moveVdi): do nothing if already on the correct SR
Fxies vatesfr/xo-web#2158
2017-05-19 11:20:46 +02:00
Julien Fontanet
ce2a08373e feat(xo-server-usage-report): 0.3.2 2017-05-18 17:04:19 +02:00
Julien Fontanet
d9e2229335 fix(xo-server-usage-report): handle missing UUIDs (#12)
Should not happen but the plugin is no longer failing.
2017-05-18 16:57:13 +02:00
badrAZ
61454e2030 fix errors 2017-05-18 15:49:27 +02:00
badrAZ
6f79e8145e fix(xo-server-usage-report): test if uuid exists 2017-05-18 15:25:47 +02:00
Pierre Donias
a39e6846fe fix(package): update http-request-plus to 0.1.3 (#549)
Fixes patching and stats issues.
2017-05-18 11:34:38 +02:00
Julien Fontanet
9d251b5876 fix(setUpApi): compat with ws 3.0.0 2017-05-17 14:52:11 +02:00
Julien Fontanet
a3ecb520cb chore(package): update some dependencies 2017-05-17 14:04:26 +02:00
Julien Fontanet
60c4673992 feat(xo-server-backup-reports): 0.8.0 2017-05-17 10:32:56 +02:00
Julien Fontanet
7c597539ff feat(xo-server-backup-reports): clearer sections separation 2017-05-17 10:28:53 +02:00
Julien Fontanet
8b80c12aa4 feat(xo-server-backup-reports): better date format 2017-05-17 10:28:25 +02:00
Julien Fontanet
9c802c7b0c feat(xo-server-backup-reports): improve mail subject 2017-05-17 10:18:04 +02:00
Julien Fontanet
00c0ba9863 feat(xo-server-backup-reports): simplify section titles 2017-05-17 10:17:48 +02:00
Julien Fontanet
ca11656844 chore(xo-server-backup-reports): use globalSuccess 2017-05-17 10:17:14 +02:00
Julien Fontanet
9d27730a4a feat(xo-server-backup-reports): emphasise dt 2017-05-17 10:15:54 +02:00
Julien Fontanet
4ce0ca702c fix(xo-server-backup-reports): second symbol is lowercase 2017-05-17 10:14:06 +02:00
Julien Fontanet
242e28ddb9 feat(xo-server-backup-reports): better icons 2017-05-17 10:13:39 +02:00
Julien Fontanet
40d20b0f9c fix(xo-server-backup-reports): report on failure by default 2017-05-17 09:49:22 +02:00
Julien Fontanet
d157a94f89 fix(Scheduling#_add): do not throw on failure 2017-05-16 20:14:11 +02:00
Julien Fontanet
12e4186972 fix(Scheduling#updateSchedule): confusion in the comment 2017-05-16 20:13:45 +02:00
Julien Fontanet
46dbd320d3 chore(Scheduling#updateSchedule): _disable() is sync 2017-05-16 17:34:47 +02:00
Julien Fontanet
07c70361da chore(Scheduling#updateSchedule): add comment 2017-05-16 17:34:36 +02:00
Julien Fontanet
b92611f4e0 chore(Scheduling#updateSchedule): explicit tests 2017-05-16 17:32:20 +02:00
Julien Fontanet
9f922b1c4e chore(Scheduling#updateSchedule): use id directly 2017-05-16 17:32:13 +02:00
Julien Fontanet
c0cf6b2551 fix(xo-server-backup-reports): remove log 2017-05-16 17:15:02 +02:00
badrAZ
eff3221f7d feat(xo-server-backup-reports): use related schedule's timezone (#11)
Fixes vatesfr/xo-web#2133
2017-05-16 16:19:49 +02:00
badrAZ
214f04d7a2 feat(job-executor/execStatus): inject timezone from related schedule (#547)
See vatesfr/xo-web#2133
2017-05-16 12:53:02 +02:00
Julien Fontanet
be57004257 chore(xo-server-backup-reports): code cleanup (#10) 2017-05-16 12:48:47 +02:00
Julien Fontanet
8875640eb6 feat(servers): default label inherited from pool 2017-05-15 16:39:48 +02:00
badrAZ
f29c3a4c49 feat(backups): get transferred data size (#542)
Fixes vatesfr/xo-web#2096
2017-05-12 17:42:23 +02:00
Julien Fontanet
2b3dff46aa chore: use http-request-plus instead of custom implementation (#540) 2017-05-12 17:33:39 +02:00
Julien Fontanet
f52218748f 5.8.1 2017-05-12 16:13:15 +02:00
Julien Fontanet
dc37009737 fix: deferreds should not throw errors (#544) 2017-05-12 14:37:54 +02:00
badrAZ
d7ce5eb651 feat(servers): allow unauthorized certificates (#545)
See vatesfr/xo-web#2138
2017-05-12 12:00:12 +02:00
badrAZ
730ed8bc69 feat(xo-server-backup-reports): add the transmission data speed (#9)
See vatesfr/xo-web#2096
2017-05-12 11:33:18 +02:00
Julien Fontanet
32b8076c82 chore: remove unnecessary Xapi#deleteVm(_, true) 2017-05-11 18:47:45 +02:00
Julien Fontanet
8b1f9a1b0e chore(utils): remove now useless eslint directives 2017-05-11 18:47:45 +02:00
Julien Fontanet
0d49361f50 feat(utils/asyncMap): better map + Promise.all (#543)
Because it waits for all promises to settle.
2017-05-11 17:34:41 +02:00
Julien Fontanet
26f630d9d6 0.11.0 2017-05-11 16:36:01 +02:00
Julien Fontanet
7481874ba2 feat(allowUnauthorized): accept self-signed certificates (#62)
Related to vatesfr/xo-web#2138
2017-05-11 16:35:02 +02:00
badrAZ
52a5ce95b6 feat(xo-server-backup-reports): ability to report only failed backups (#8)
Fixes vatesfr/xo-web#2095
2017-05-09 18:28:17 +02:00
Julien Fontanet
f361c22fce chore(backups): use norecovery for XFS (#541) 2017-05-09 16:12:03 +02:00
Julien Fontanet
a348585e76 chore(package): update all dependencies 2017-05-08 18:34:58 +02:00
Julien Fontanet
6e1155adc6 fix(Xapi#moveVdi): fix interpolation in debug 2017-05-08 18:20:21 +02:00
Julien Fontanet
7a4f62a793 chore(.mention-bot): no longer used 2017-05-05 14:08:35 +02:00
Julien Fontanet
4b9e15bbbc chore(job-executor/match): explicitly test against undefined 2017-05-05 14:08:11 +02:00
Julien Fontanet
cf72467510 feat(xo-server-recover-account): reset password and set permission to admin (#538)
Fixes vatesfr/xo-web#2129
2017-05-03 15:43:32 +02:00
Julien Fontanet
3a0f40633a feat(xapi-objects-to-xo): expose unmanaged VDIs (#539) 2017-05-03 15:13:55 +02:00
Olivier Lambert
12a6b75bfb use a vdi-unmanaged type for base copy 2017-05-03 14:24:39 +02:00
Olivier Lambert
db8e7817a3 WIP: base copy management 2017-05-03 12:42:45 +02:00
Julien Fontanet
8d135bc1fc chore: remove invoke() 2017-05-03 11:02:59 +02:00
Julien Fontanet
2c00f0ffab chore: inline isString() 2017-05-03 11:02:46 +02:00
badrAZ
9adce54987 feat(vm/advanced): cores per socket are now configurable (#537)
See vatesfr/xo-web#130
2017-05-02 16:56:07 +02:00
Julien Fontanet
264611bb71 5.8.0 2017-04-28 16:33:32 +02:00
Julien Fontanet
d51d147b92 feat(package): update xen-api to v0.10.0
Speed improvement with XS >= 7.0
2017-04-28 16:32:07 +02:00
Julien Fontanet
5e1d627834 0.10.0 2017-04-28 16:26:08 +02:00
Julien Fontanet
37b23bdc47 feat: JSON-RPC with fallback to XML-RPC (#50)
Better performance for XS >=7.0
2017-04-28 16:22:35 +02:00
Julien Fontanet
9e1f97811e feat(xo-server-usage-report): 0.3.1 2017-04-28 16:18:25 +02:00
badrAZ
a0a944310f feat(VM): ability to switch between Cirrus/Standard VGA adapters (#531)
See vatesfr/xo-web#158
2017-04-27 16:12:36 +02:00
Julien Fontanet
61c6c98fca fix(xo.importConfig): respect data dependency (#535) 2017-04-27 11:32:59 +02:00
Julien Fontanet
188b8d2d1a feat(vm.deltaCopy): append creation date to copy's name
Fixes vatesfr/xo-web#2118
2017-04-26 17:23:03 +02:00
badrAZ
c6b0e38fec fix: use retention instead of depth (#524)
See vatesfr/xo-web#1935
2017-04-25 17:20:51 +02:00
Julien Fontanet
92e69570e1 chore(package): update all dependencies 2017-04-25 17:03:50 +02:00
Pierre Donias
62f7a0c54b feat(xosan): save pack installation datetime in pool (#534) 2017-04-25 16:15:09 +02:00
Julien Fontanet
665fc2b7f9 fix: no longer compatible with Node 4 2017-04-25 15:01:09 +02:00
badrAZ
dfd17bc96c fix(xo-server-usage-report): hosts missing patches (#7)
Fixes vatesfr/xo-web#2106
2017-04-25 14:57:17 +02:00
Julien Fontanet
41924f7e66 fix(job.getAll): timeout is a number 2017-04-24 17:46:30 +02:00
Julien Fontanet
2340045dd1 5.7.4 2017-04-24 15:51:01 +02:00
Julien Fontanet
ddfbf1d6c4 feat(plugin): expose plugin description 2017-04-24 15:37:52 +02:00
Pierre Donias
8639faeffc fix(Xapi#installSupplementalPackOnAllHosts): synchronize call_plugin (#532) 2017-04-21 16:32:58 +02:00
Julien Fontanet
abf73193fd feat(xo-cli): 0.8.3 2017-04-13 13:57:57 +02:00
Julien Fontanet
ff1b643cf4 5.7.3 2017-04-12 17:14:10 +02:00
Pierre Donias
a73acedc4d fix(XOSAN): ignore error if pack has already been installed (#529)
Fixes vatesfr/xo-web#2084
2017-04-12 16:33:56 +02:00
Julien Fontanet
7ffeb44e77 fix(xapi-objects-to-xo): only use refs for XS templates (#528)
Using refs as ids for user templates causes issues on VM creation
2017-04-12 13:58:51 +02:00
Julien Fontanet
5ae1488864 0.2.0 2017-04-12 10:01:34 +02:00
Julien Fontanet
fb3ff165db fix: fix URLs 2017-04-12 10:01:21 +02:00
Julien Fontanet
cdf59bb877 chore(package): update all dependencies 2017-04-12 10:00:30 +02:00
Julien Fontanet
b6371dde23 feat: scope is now configurable (#23)
Fixes #1 as well

Thanks @Maelstrom96
2017-04-12 09:52:17 +02:00
Julien Fontanet
3989bfa832 5.7.2 2017-04-11 17:02:57 +02:00
Julien Fontanet
740e1ccd5b fix(job.set): make all fields optional (2) 2017-04-10 16:45:27 +02:00
Julien Fontanet
bc03f2ed17 fix(job.set): make all fields optional 2017-04-10 16:15:45 +02:00
Julien Fontanet
4b5cb86d87 chore(Xapi#_createVbd): base default empty prop on VDI presence 2017-04-10 16:15:45 +02:00
Julien Fontanet
b877d6088b fix(models/utils/parseProp): reduce verbosity 2017-04-10 16:15:45 +02:00
Julien Fontanet
26cfd439e1 fix(xapi-objects-to-xo): use $ref for VM-template ids
Fixes vatesfr/xo-web#2075
2017-04-10 16:15:44 +02:00
Julien Fontanet
8f4a43de75 feat(xo-server-transport-email): 0.4.2 2017-04-10 11:32:29 +02:00
Julien Fontanet
e2d4a41d9a fix(xo-server-transport-email): fix From header
Fix vatesfr/xo-web#2074
2017-04-10 11:32:13 +02:00
Julien Fontanet
eafcf66f4d 5.7.1 2017-04-06 19:30:09 +02:00
Pierre Donias
a8fad8193b feat(pack,patch): XS 7.1 mechanism (#527)
See vatesfr/xo-web#2058
2017-04-06 19:05:43 +02:00
badrAZ
ca695c38cd feat(vm.revertSnapshot): restore power state (#526)
Fixes vatesfr/xo-web#834
2017-04-06 15:24:30 +02:00
badrAZ
6e0f98a809 feat(VBD): expose the VBD device (#525)
See vatesfr/xo-web#2064
2017-04-06 11:07:16 +02:00
Julien Fontanet
d2af0152d0 feat(xo-server-transport-email): 0.4.1 2017-04-06 09:38:34 +02:00
Julien Fontanet
37f825ab6d chore(package): use passport-google-oauth20 directly 2017-04-03 10:59:11 +02:00
Julien Fontanet
8901d3ce64 fix(sample config): IPv6 used by default 2017-03-31 18:25:30 +02:00
Julien Fontanet
92104f4ab7 feat(xo-server-usage-report): 0.3.0 2017-03-31 17:03:14 +02:00
Julien Fontanet
408a2498d0 feat(xo-server-backup-reports): 0.7.0 2017-03-31 17:02:23 +02:00
Julien Fontanet
2641966285 5.7.0 2017-03-31 16:37:22 +02:00
Julien Fontanet
8d473001aa feat(xo-server-transport-email): 0.4.0 2017-03-31 15:03:44 +02:00
Julien Fontanet
ceaf0bd745 feat(xo-server-transport-email): finer SSL/TLS config 2017-03-31 15:01:11 +02:00
Julien Fontanet
a96849bc89 chore(xo-server-transport-email): update all deps 2017-03-31 15:00:38 +02:00
Julien Fontanet
09dc2265fe fix(Xapi#uploadPoolPatch): use HTTPs 2017-03-31 11:19:27 +02:00
Julien Fontanet
a1fa139ef1 fix(Xapi): accept self-signed certs for export/import VDI/VM 2017-03-31 11:19:26 +02:00
badrAZ
df26a500c4 feat(servers): add a label to servers (#523)
See vatesfr/xo-web#1965
2017-03-29 16:32:02 +02:00
Julien Fontanet
182b7ae84d fix: commitmsg instead of commit-msg 2017-03-29 13:40:10 +02:00
Julien Fontanet
e6e254bd86 chore(xo-cli): update dependencies 2017-03-29 13:39:31 +02:00
Julien Fontanet
3b4e7a0bfe feat(xo-cli): ask password if not provided 2017-03-29 13:30:33 +02:00
Julien Fontanet
a0887bb5b3 fix: do not use yarn test 2017-03-29 13:19:20 +02:00
Julien Fontanet
5c6a592aba chore: update dependencies 2017-03-29 13:18:09 +02:00
badrAZ
a465218ba3 feat(jobs): configure job timeout (#522)
See vatesfr/xo-web#1956
2017-03-29 10:39:52 +02:00
Julien Fontanet
1ead6eb916 fix(Xapi): export/import of VDI/VM should use HTTPs 2017-03-28 17:33:17 +02:00
Julien Fontanet
c8c0b24420 feat(xo-server-auth-ldap): 0.6.3 2017-03-28 16:21:42 +02:00
Julien Fontanet
0da5d4376d feat(xo-server-auth-ldap): example with group filtering 2017-03-28 16:21:42 +02:00
Julien Fontanet
44fe1b31ba chore(package): update all dependencies 2017-03-24 11:39:35 +01:00
Julien Fontanet
0856d3d5c9 fix: update yarn.lock 2017-03-24 11:38:32 +01:00
Pierre Donias
f6b74ea836 feat(vm): affinity host (#521)
See vatesfr/xo-web#1983
2017-03-24 11:35:00 +01:00
greenkeeper[bot]
e0cef71700 fix(package): update ms to version 1.0.0 (#520)
https://greenkeeper.io/
2017-03-19 22:49:02 +01:00
greenkeeper[bot]
47f3788f55 fix(package): update ms to version 1.0.0 (#61)
https://greenkeeper.io/
2017-03-19 22:48:05 +01:00
Julien Fontanet
19d1f70458 fix(xapi-objects-to-xo): PV drivers check for XS >= 7.1
Fixes vatesfr/xo-web#2024
2017-03-17 18:05:05 +01:00
badrAZ
840a236e61 feat(xo-server-backup-reports): group failed/successful VMs (#6)
Fixes vatesfr/xo-web#1950
2017-03-17 17:01:05 +01:00
badrAZ
b07b998304 fix(xo-server-usage-report): add name for all objects (#5)
Fixes vatesfr/xo-web#2017
2017-03-16 18:00:23 +01:00
badrAZ
43c103e436 feat(new-vm): shared VM in resource set (#518)
Fixes vatesfr/xo-web#1964.
2017-03-15 14:45:36 +01:00
Julien Fontanet
6ff4f096a3 chore(build): do not build tests 2017-03-10 14:46:06 +01:00
Julien Fontanet
e820b13f9f fix(xo-cli): add final newline for --list-objects 2017-03-08 18:02:12 +01:00
Pierre Donias
d8d82441c3 fix(Xapi#createVm): only one disk should be bootable (#516)
See vatesfr/xo-web#1994.

For more complex setups, create the VMs and change bootable flags afterward.
2017-03-08 16:31:22 +01:00
Julien Fontanet
63be8afd35 chore(README): reverse XenServer versions order 2017-03-08 15:00:01 +01:00
Olivier Lambert
1166db7834 chore(README): add 7.1 and fix XenServer (#60) 2017-03-08 14:59:03 +01:00
Olivier Lambert
4f489e1854 feat(sr): add lvmohba SR type management (#517) 2017-03-08 14:03:57 +01:00
badrAZ
3662f4f256 fix(xo-server-usage-report): handle renamed VMs (#3) 2017-03-08 09:56:45 +01:00
Julien Fontanet
9ab275df5d fix(vm.set): behave if the resource set no longer exist 2017-03-04 16:27:25 +01:00
Julien Fontanet
66c1754eb8 chore(package): update xo-common to v0.1.1 2017-03-04 16:16:58 +01:00
Julien Fontanet
b03335eb94 feat(xo-common): 0.1.1 2017-03-04 16:11:32 +01:00
Julien Fontanet
31e3677111 fix(api-errors): correctly forwards all params 2017-03-04 16:10:37 +01:00
Julien Fontanet
e67bab1f5c fix(package): require Node >= 4.5 2017-03-04 03:24:49 +01:00
Julien Fontanet
ceb6667112 fix: coding style 2017-03-03 16:32:58 +01:00
badrAZ
cafba0b361 fix(vm.resume): remove unused force param (#514) 2017-03-03 15:49:12 +01:00
badrAZ
9bc1a51def feat(xo-server-usage-report): add VM names (#2) 2017-03-03 13:26:24 +01:00
Julien Fontanet
d215885dab chore(xo-server-usage-report): remove unused files 2017-03-02 21:04:49 +01:00
Julien Fontanet
68a1c93fbb chore(xo-server-usage-report): fix URLs 2017-03-02 16:36:02 +01:00
Julien Fontanet
9c6302fa50 Merge remote-tracking branch 'xo-server-usage-report/master' 2017-03-02 16:30:23 +01:00
Julien Fontanet
d60440e512 chore(xo-server-cloud): fix homepage URL 2017-03-02 16:27:55 +01:00
Julien Fontanet
957b9319cb fix: coding style 2017-03-02 16:21:30 +01:00
Julien Fontanet
9a28b9d1f1 0.2.2 2017-03-02 16:20:36 +01:00
Julien Fontanet
543d061251 chore: add headers to template 2017-03-02 16:20:36 +01:00
Julien Fontanet
acba90b293 feat: minify HTML 2017-03-02 16:20:36 +01:00
Julien Fontanet
8992e9988f chore: various updates 2017-03-02 16:20:36 +01:00
Julien Fontanet
3ce87b9cb3 fix: inject image directly in HTML 2017-03-02 16:20:36 +01:00
Julien Fontanet
cbe7b3046c chore: better compressed xo.png 2017-03-02 16:20:36 +01:00
Julien Fontanet
62344cb814 chore: remove unused logo.png 2017-03-02 16:20:36 +01:00
Julien Fontanet
72d45a5fd2 0.2.1 2017-03-02 16:20:36 +01:00
Julien Fontanet
c4e4dd501d 0.2.0 2017-03-02 16:20:36 +01:00
Julien Fontanet
3e4efcf297 fix(vm.importBackup): fix datetime in VM name 2017-03-01 14:57:02 +01:00
Julien Fontanet
4ccadac148 5.6.4 2017-03-01 14:46:09 +01:00
Julien Fontanet
6e148c18b0 fix(vm.importDeltaBackup): fix datetime in VM name (#513) 2017-03-01 14:34:29 +01:00
Julien Fontanet
75f849982e fix(Xapi#exportVdi): returned promise has a cancel() method (#512) 2017-03-01 14:12:56 +01:00
Julien Fontanet
8722ef45ac chore: add mention-bot config 2017-03-01 13:27:54 +01:00
greenkeeper[bot]
3d96765b1f fix(package): update event-to-promise to version 0.8.0 (#57)
https://greenkeeper.io/
2017-03-01 11:15:07 +01:00
greenkeeper[bot]
02d052c071 chore(package): update standard to version 9.0.0 (#19)
https://greenkeeper.io/
2017-03-01 00:53:36 +01:00
greenkeeper[bot]
4c52fe11d3 chore(package): update standard to version 9.0.0 (#56)
https://greenkeeper.io/
2017-03-01 00:18:56 +01:00
Julien Fontanet
b347c78a8c fix(vm.create): do not get stuck when installing from ISO 2017-02-28 15:43:06 +01:00
Julien Fontanet
c70d92cf09 chore(package): update all dependencies 2017-02-28 11:07:23 +01:00
Julien Fontanet
4590bed56e chore(package): use stage-3 instead of stage-0 2017-02-28 11:06:25 +01:00
Julien Fontanet
7c00d118f3 feat: remove html-pdf
Simply send HTML reports for now.
2017-02-28 11:04:48 +01:00
Julien Fontanet
88ae24855a feat(models/utils/parseProp): do not warn on empty string 2017-02-28 09:58:41 +01:00
Julien Fontanet
356884ea53 feat: reduce the default debugging level 2017-02-28 09:58:41 +01:00
Julien Fontanet
68e37fff79 feat(xo-server-transport-email): 0.3.3 2017-02-27 15:43:18 +01:00
Julien Fontanet
6958e71efd chore(xo-server-transport-email): no longer needs lodash 2017-02-27 15:42:04 +01:00
Julien Fontanet
d0618182d1 feat(xo-server-transport-email): test also sends an attachment 2017-02-27 15:42:04 +01:00
Julien Fontanet
e8891e27dd fix(typo): iterface → interface 2017-02-27 15:42:04 +01:00
Julien Fontanet
adb80933ee chore(package): make package publishable 2017-02-27 14:03:24 +01:00
Julien Fontanet
23b942c7da fix(package): use julien.fontanet@vates.fr as author 2017-02-27 14:03:16 +01:00
Julien Fontanet
7eef7d4636 fix(package): license is AGPL3 2017-02-27 14:02:54 +01:00
badrAZ
51fba21dd6 feat(vm.import): throw if type is xva and data is provided (#506) 2017-02-27 11:57:40 +01:00
Julien Fontanet
6aa5d608bf chore(package): babel-preset-es2015 → babel-preset-env 2017-02-27 11:22:34 +01:00
Julien Fontanet
21ad2c5744 fix(package): commit-msg → commitmsg 2017-02-27 11:20:40 +01:00
Julien Fontanet
dea1163159 fix(package): jest is a dev dependency 2017-02-27 11:20:19 +01:00
Julien Fontanet
c4c2e8cf74 chore(package): fix for jest 19 2017-02-27 11:19:38 +01:00
Julien Fontanet
5883c35cf3 chore(package): update all dependencies 2017-02-27 11:18:46 +01:00
Julien Fontanet
4d2719a424 5.6.3 2017-02-24 16:12:25 +01:00
Nicolas Raynaud
7cf2d0d01c fix(xosan) (#509)
- fix 2 bricks configuration
- limit bricks size to 2TB
- fix arbiter cleanup
2017-02-24 16:11:59 +01:00
Julien Fontanet
5a08b512a7 fix(xosan.createSR): use address prop 2017-02-24 14:56:27 +01:00
Pierre Donias
aa6ff6cd64 fix(xapi.installSupplementalPackOnAllHosts): multi-pipe stream (#508)
Fixes vatesfr/xo-web#1957
2017-02-24 11:41:47 +01:00
Julien Fontanet
72baa1a786 feat(xo-server-cloud): 0.2.0 2017-02-23 19:58:22 +01:00
Julien Fontanet
4d72569030 feat(xo-server-cloud): retry connecting to xoa-updater 2017-02-23 19:42:53 +01:00
Julien Fontanet
89421d292c 5.6.2 2017-02-23 18:38:14 +01:00
Julien Fontanet
55c6515bac fix(vhdMerge): ensure parent.bat.size >= child.bat.size
Fixes vatesfr/xo-web#1939
2017-02-23 18:35:52 +01:00
Pierre Donias
5db6f6a58c feat(XOSAN) (#505) 2017-02-23 18:33:23 +01:00
Julien Fontanet
eeedf6ab28 feat(Vhd#ensurebatSize): no need to wait before writing footer 2017-02-23 18:31:05 +01:00
Julien Fontanet
3758cd207b fix(Vhd#ensureBatSize): Buffer#size → Buffer#length 2017-02-23 18:31:05 +01:00
Julien Fontanet
c15ede6239 fix(Vhd#ensureBatSize): avoid style error 2017-02-23 18:31:05 +01:00
Julien Fontanet
e54e31e059 feat(vhdMerge): avoid unnecessary footer write 2017-02-23 18:31:05 +01:00
Julien Fontanet
8c573aa8e4 chore(Vhd): add debugs 2017-02-23 18:31:05 +01:00
Julien Fontanet
654559086c chore(Vhd#writeBlockSectors): expect end sector instead of # of sectors 2017-02-23 18:31:05 +01:00
Julien Fontanet
b0d9679568 chore(Vhd#coalesceBlock): do not pass blockAddr 2017-02-23 18:31:05 +01:00
Julien Fontanet
87fdaf7fa7 chore(Vhd): merge readBlockBitmap() readBlockData() into _readBlock() 2017-02-23 18:31:05 +01:00
Julien Fontanet
bb3a365166 fix(Vhd#writeBlockSectors): pass correct params to Vhd#readBlockBitmap() 2017-02-23 18:31:05 +01:00
Julien Fontanet
2be183d980 various updates 2017-02-23 18:31:05 +01:00
Julien Fontanet
c6dc846838 fix(Vhd#ensureBatSize): extend BAT at correct offset 2017-02-23 18:31:05 +01:00
Julien Fontanet
1142f1d59a various updates 2017-02-23 18:31:05 +01:00
Julien Fontanet
126c470979 fix(Vhd#getEndOfHeaders): correctly compute parent locator size 2017-02-23 18:31:05 +01:00
Julien Fontanet
d679dc3e8b fix(vhdMerge): update diskGeometry and originalSize 2017-02-23 18:31:05 +01:00
Julien Fontanet
d5422dfe89 fix(Vhd#ensureBatSize): do not round maxTableEntries 2017-02-23 18:31:05 +01:00
Julien Fontanet
d64237b4f2 fix(package): dependency-check should ignore constant-stream 2017-02-23 18:31:05 +01:00
Julien Fontanet
7b7e4942f2 fix(constant-stream): optimize data length 2017-02-23 18:31:05 +01:00
Julien Fontanet
e4c343a587 chore(Vhd#_writeStream): merge back into Vhd#_write() 2017-02-23 18:31:05 +01:00
Julien Fontanet
1a8ae21478 feat(Vhd#_write): can also handle streams 2017-02-23 18:31:05 +01:00
Julien Fontanet
dd37a5b584 chore(Vhd#_write): simplify code 2017-02-23 18:31:05 +01:00
Julien Fontanet
eec340e6c0 chore(Vhd#_getBatEntry): remove logging 2017-02-23 18:31:05 +01:00
Julien Fontanet
c2fb5ba1f0 fix(vhdMerge): update currentSize and timestamp 2017-02-23 18:31:05 +01:00
Julien Fontanet
36d7e17b86 fix(Vhd#ensureBatSize): update BAT before writing footer 2017-02-23 18:31:05 +01:00
Julien Fontanet
5a1dc49428 fix(Vhd#ensureBatSize): various fixes 2017-02-23 18:31:05 +01:00
Julien Fontanet
47caf54772 fix(Vhd#ensureBatSize): extend local BAT buffer as well 2017-02-23 18:31:05 +01:00
Julien Fontanet
6af50a8c44 feat(Vhd#ensurebatSize): do not move first block if not necessary 2017-02-23 18:31:05 +01:00
Julien Fontanet
1b27407970 chore(Vhd#_getFirstAndLastBlocks): value → sector 2017-02-23 18:31:05 +01:00
Julien Fontanet
4da6306c67 fix(Vhd#_getFirstAndLastBlocks): should not be async 2017-02-23 18:31:05 +01:00
Julien Fontanet
f950b7a725 fix(Vhd#_readBlockData) 2017-02-23 18:31:05 +01:00
Julien Fontanet
930cf9ed04 fix(Vhd#ensureBatSize): update header.maxTableEntries 2017-02-23 18:31:05 +01:00
Julien Fontanet
744016e752 chore(vhd-merge): Vhd#_read() 2017-02-23 18:31:05 +01:00
Julien Fontanet
2fb4e907df fix(vhdMerge): ensure parent.bat.size >= child.bat.size
Fixes vatesfr/xo-web#1939
2017-02-23 18:31:05 +01:00
Julien Fontanet
ef2a815e52 chore(vhdMerge): ensure block sizes are identical 2017-02-23 18:31:05 +01:00
Julien Fontanet
33a81d4f3c chore(vhd-merge): rename and clean BAT methods
- readAllocationTableEntry() → _getBatEntry()
- writeAllocationTableEntry() → _setBatEntry()
2017-02-23 18:31:05 +01:00
Julien Fontanet
4911df0bf9 chore(Vhd#writeAllocationTableEntry): commit the change in the file 2017-02-23 18:31:05 +01:00
Julien Fontanet
2b612b5db7 feat(constant-stream): emit the same data n times 2017-02-23 18:31:05 +01:00
Julien Fontanet
bfe81b52ef chore(vhd-merge): Vhd#_writeStream() 2017-02-23 18:31:05 +01:00
Julien Fontanet
26f6a4beb9 chore(vhd-merge): Vhd#_readStream() 2017-02-23 18:31:05 +01:00
Pierre Donias
532a368606 feat(xo-server-cloud): new plugin (#1) 2017-02-23 18:04:03 +01:00
Julien Fontanet
52e9c3053a fix(console proxy): works with ws v2
Fixes vatesfr/xo-web#1954
2017-02-23 16:59:41 +01:00
Julien Fontanet
908d1f1ec8 feat(Xo#defineProperties): helper to define multiple properties 2017-02-23 12:23:18 +01:00
Julien Fontanet
6a1120f95b feat(Xo#defineProperty): accept a thisArg param 2017-02-23 12:18:54 +01:00
Julien Fontanet
2a2780c25c feat(Xapi#deleteVm): delete disks by default 2017-02-23 11:06:10 +01:00
Julien Fontanet
7d4152197b chore: update yarn.lock 2017-02-22 22:07:52 +01:00
greenkeeper[bot]
9c742600ff fix(package): update jest to version 19.0.1 (#504)
https://greenkeeper.io/
2017-02-22 12:10:12 +01:00
greenkeeper[bot]
6c4178e107 chore(package): update jest to version 19.0.0 (#54)
https://greenkeeper.io/
2017-02-21 10:54:36 +01:00
greenkeeper[bot]
a035bf132a fix(package): update pretty-format to version 19.0.0 (#503)
https://greenkeeper.io/
2017-02-21 10:52:37 +01:00
Julien Fontanet
05a68030b6 feat(xo-cli): use | between types in commands listing 2017-02-17 11:28:51 +01:00
Julien Fontanet
b989d157a0 feat(redis): can connect via Unix socket
Fixes vatesfr/xo-web#1944
2017-02-16 11:32:35 +01:00
Julien Fontanet
c5f3228ba7 chore(package): use husky instead of ghooks 2017-02-15 10:50:00 +01:00
Julien Fontanet
db3728f9e4 feat(xo-server-auth-ldap): 0.6.2 2017-02-13 17:45:53 +01:00
Julien Fontanet
ca2d3f5b48 fix(xo-server-auth-ldap): correctly use previous values for booleans 2017-02-13 17:44:34 +01:00
Julien Fontanet
f3a992a55f chore(xo-server-auth-ldap): use lodash and promise-toolbox utils 2017-02-13 17:44:09 +01:00
Julien Fontanet
b5d1e7c459 chore(xo-server-auth-ldap): clarify bind.dn description 2017-02-13 17:09:41 +01:00
Julien Fontanet
eecd89772f chore(xo-server-auth-ldap): remember optional inputs 2017-02-13 16:58:27 +01:00
Julien Fontanet
261587511b chore(package): update all dependencies 2017-02-13 16:13:19 +01:00
Julien Fontanet
ff798801fb chore(package): update xen-api to v0.10.0-2 2017-02-13 16:08:09 +01:00
Julien Fontanet
9b4aab0d19 chore: update yarn.lock 2017-02-13 16:07:20 +01:00
Julien Fontanet
02d1fb436d 0.10.0-2 2017-02-13 15:52:26 +01:00
Julien Fontanet
1c97bf9019 0.10.0-1 2017-02-13 15:50:45 +01:00
Julien Fontanet
bfc4bb1f4c fix(package): commitmsg hook 2017-02-13 15:50:22 +01:00
Julien Fontanet
ccdce32562 chore(package): update all dependencies 2017-02-13 15:50:09 +01:00
Julien Fontanet
87fdcf14e5 feat(Xapi#_rawCall): add method to error object 2017-02-13 15:47:09 +01:00
greenkeeper[bot]
a0570f41fb fix(package): update fs-promise to version 2.0.0 (#27)
https://greenkeeper.io/
2017-02-13 10:36:44 +01:00
greenkeeper[bot]
6e42cf9952 fix(package): update fs-promise to version 2.0.0 (#501)
https://greenkeeper.io/
2017-02-13 10:34:33 +01:00
Julien Fontanet
4c3a8ca312 fix(Xapi#createVm): wait for VM record to have all its VBDs/VIFs (#500) 2017-02-09 16:49:58 +01:00
Julien Fontanet
a63eb48f03 fix(Xapi#createVm): do not wait for a new record 2017-02-09 16:06:25 +01:00
Julien Fontanet
d0214f805e fix(Xapi#createVm): _waitObject → _waitObjectState 2017-02-09 16:06:25 +01:00
badrAZ
d736bd6501 fix(vm.create): VIFs param is optional (#499) 2017-02-09 11:16:20 +01:00
Julien Fontanet
5fd42bf216 feat: new vhd-cli package 2017-02-07 19:24:07 +01:00
Pierre Donias
2ce4a11e0a fix(vm.delete): import mapFilter (#497) 2017-02-07 11:27:30 +01:00
Pierre Donias
e5ab8fe3e4 feat(vm.delete): remove ACLs (#496) 2017-02-02 22:11:13 +01:00
Julien Fontanet
3e55d8d9df fix(README): issues should be reported on xo-web's tracker 2017-02-02 16:00:21 +01:00
Julien Fontanet
d9f4a196d0 feat(xo-server-auth-ldap): 0.6.1 2017-02-02 15:55:19 +01:00
Julien Fontanet
768ef8a316 chore(xo-server-auth-ldap): update all deps 2017-02-02 15:49:29 +01:00
Julien Fontanet
a478d02e5d fix(xo-server-auth-ldap): handle connection failures 2017-02-02 15:49:27 +01:00
Julien Fontanet
b98a7de3ae chore(xo-server-auth-ldap): use promise-toolbox 2017-02-02 15:49:25 +01:00
Julien Fontanet
657b74a084 Revert "feat(vm.snapshot): copy ACLs from VM to snapshot (#495)"
This reverts commit dfee98b66b.

Should not be necessary: snapshots inherit ACLs from their VM.
2017-02-01 10:24:26 +01:00
Pierre Donias
dfee98b66b feat(vm.snapshot): copy ACLs from VM to snapshot (#495)
See vatesfr/xo-web#1865

Also, correctly remove ACLs on VM deletion.
2017-02-01 10:22:17 +01:00
Julien Fontanet
f65b9f695e 5.6.1 2017-01-30 18:07:39 +01:00
Julien Fontanet
4056385cd3 feat(backups): do not rely on JSON format for lvm commands (#493) 2017-01-30 18:04:27 +01:00
Pierre Donias
96d56d43bc feat(Xapi#installSupplementalPackOnAllHosts) (#491)
See vatesfr/xo-web#1896
2017-01-30 10:53:26 +01:00
Julien Fontanet
2e31ff42ed 0.1.2 2017-01-27 19:25:22 +01:00
Julien Fontanet
9a3b8f2b10 fix: template path 2017-01-27 19:25:18 +01:00
Julien Fontanet
079790bce6 fix(package): add images/ to files list 2017-01-27 19:25:09 +01:00
Julien Fontanet
d99c4c6d14 0.1.1 2017-01-27 19:16:08 +01:00
Julien Fontanet
6839b4d8a4 fix(package): add template to files list 2017-01-27 19:16:04 +01:00
Julien Fontanet
4c47cc6ea8 0.1.0 2017-01-27 18:24:17 +01:00
Julien Fontanet
de81649a98 chore: add yarn.lock 2017-01-27 18:24:14 +01:00
Julien Fontanet
d31eab673e chore: remove ghooks 2017-01-27 18:24:05 +01:00
badrAZ
31189be2c8 Implementation (#15) 2017-01-27 18:22:01 +01:00
Julien Fontanet
45dd2c6519 chore: limit concurrency at 1 for installation 2017-01-27 17:05:48 +01:00
Julien Fontanet
5176d2000e chore: upgrade husky to v0.13.1 and lerna to v2.0.0-beta.34 2017-01-27 17:01:53 +01:00
Julien Fontanet
6f606761e4 chore(xo-server-test-plugin): add yarn.lock 2017-01-27 16:55:02 +01:00
Julien Fontanet
cfabadffe4 chore: exclusively use yarn instead of npm 2017-01-27 16:54:32 +01:00
Julien Fontanet
eba8f95e58 5.6.0 2017-01-27 16:42:07 +01:00
Julien Fontanet
7e2da1ff93 [WiP] feat(backups): implements file restore for LVM (#490)
Fixes vatesfr/xo-web#1878
2017-01-27 16:37:34 +01:00
Pierre Donias
b7b7e81468 feat(host.installSupplementalPack) (#487)
See vatesfr/xo-web#1460
2017-01-25 16:08:31 +01:00
Pierre Donias
0c7768f5d2 fix(vm.delete): IP addresses should always be deallocated (#488)
Fixes vatesfr/xo-web#1906
2017-01-25 15:46:33 +01:00
Pierre Donias
8fe6a56dfc fix(Xapi#installAllPoolPatchesOnHost): ignore PATCH_ALREADY_APPLIED error (#489)
Fixes vatesfr/xo-web#1904
2017-01-25 15:46:15 +01:00
Julien Fontanet
7523cb3489 chore: improve filter description 2017-01-25 12:43:29 +01:00
Julien Fontanet
505a9d7c70 chore(package): update inquirer to v3.0.1 2017-01-25 11:12:08 +01:00
Julien Fontanet
7b9dae980d fix(vm.create): properly handle optional param VDIs 2017-01-24 13:36:36 +01:00
Olivier Lambert
b59ba6b7bb feat(api): add description for some API calls (#486)
Fixes vatesfr/xo-web#1882
2017-01-17 15:15:18 +01:00
Julien Fontanet
8cdee4d173 chore(xo): disable too many listeners warning 2017-01-16 15:50:18 +01:00
Julien Fontanet
c9ed5fbe00 chore: update yarn.lock 2017-01-16 15:18:46 +01:00
Julien Fontanet
e698e89968 feat(/signout): URL to sign out 2017-01-16 14:33:58 +01:00
Julien Fontanet
9581764cc8 feat: add normalize-package script 2017-01-16 12:01:32 +01:00
Pierre Donias
02f198d42c feat(backup.fetchFiles): multiple files support (#485)
See vatesfr/xo-web#1877
2017-01-16 09:33:22 +01:00
Julien Fontanet
f03493a252 chore: integration of imported packages 2017-01-13 18:54:27 +01:00
Pierre Donias
61d2d0263b feat(patching): eject tools ISOs before patching host (#479)
Fixes #1798
2017-01-13 18:20:31 +01:00
badrAZ
ed477e99a8 feat(plugin): provide a getDataDir() to plugins (#483)
It returns the path of a directory where the plugin can store data.
2017-01-13 18:13:44 +01:00
Julien Fontanet
22f2a05c8a Merge remote-tracking branch 'xo-server-test-plugin/master' 2017-01-13 14:00:47 +01:00
Julien Fontanet
a703ecc7e1 Merge remote-tracking branch 'xo-cli/master' 2017-01-13 14:00:45 +01:00
Julien Fontanet
c90a687179 Merge remote-tracking branch 'xo-server-load-balancer/master' 2017-01-13 14:00:41 +01:00
Julien Fontanet
e08689ff0e Merge remote-tracking branch 'xo-server-auth-ldap/master' 2017-01-13 14:00:37 +01:00
Julien Fontanet
80ffd811c9 Merge remote-tracking branch 'xo-server-auth-saml/master' 2017-01-13 14:00:33 +01:00
Julien Fontanet
56b583fc99 Merge remote-tracking branch 'xo-server-backup-reports/master' 2017-01-13 14:00:30 +01:00
Julien Fontanet
37a4e108be Merge remote-tracking branch 'xo-server-transport-nagios/master' 2017-01-13 14:00:26 +01:00
Julien Fontanet
9ca531541d Merge remote-tracking branch 'xo-server-transport-email/master' 2017-01-13 14:00:23 +01:00
Julien Fontanet
e304c554d0 Merge remote-tracking branch 'xo-server-auth-github/master' 2017-01-13 14:00:19 +01:00
Julien Fontanet
a7dfa7a381 Merge remote-tracking branch 'xo-server-transport-xmpp/master' 2017-01-13 14:00:09 +01:00
Olivier Lambert
1449be8d66 feat(host): expose supplemental packs (#480) 2017-01-12 17:54:48 +01:00
Julien Fontanet
090d48b636 0.3.2 2017-01-12 17:13:55 +01:00
Julien Fontanet
55567bf666 fix(package): use nodemailer 2.6.4
nodemailer 2.7.0 breaks Node 4 compatibility
2017-01-12 17:13:51 +01:00
Julien Fontanet
5867d84eaa 0.3.1 2017-01-12 16:24:45 +01:00
Julien Fontanet
4d8f1ab169 chore(package): update all dependencies 2017-01-12 16:23:21 +01:00
Julien Fontanet
6a2963be41 chore(configuration schema): add description for from.name and from.address 2017-01-12 16:17:55 +01:00
Julien Fontanet
b10f7b35ee chore(xo-collection): update all deps 2017-01-11 16:50:48 +01:00
Julien Fontanet
dc1bb8992f chore(xo-collection): use jest instead of mocha/must/sinon 2017-01-11 16:32:10 +01:00
Julien Fontanet
5eb7119821 chore: global gitignore 2017-01-11 14:07:49 +01:00
Julien Fontanet
3fa8fc19dc chore: global EditorConfig 2017-01-11 12:03:14 +01:00
Julien Fontanet
341d98e00d chore(xo-acl-resolver): minor fixes regarding monorepo 2017-01-10 18:29:52 +01:00
Julien Fontanet
7eee0f4341 Merge remote-tracking branch 'xo-acl-resolver/master' 2017-01-10 18:11:47 +01:00
Julien Fontanet
0b71b7862a feat: basic README 2017-01-10 18:07:05 +01:00
Julien Fontanet
e2893a0eba chore: fix packages URLs 2017-01-10 18:05:01 +01:00
Julien Fontanet
0c39a4e193 chore: add yarn.lock for all packages 2017-01-10 17:51:50 +01:00
Julien Fontanet
066072b22d chore: configure Travis globally 2017-01-10 17:51:31 +01:00
Julien Fontanet
d548503590 chore(xo-remote-parser): update all deps 2017-01-10 16:24:28 +01:00
Julien Fontanet
3a02fc99a2 chore: global husky instead of local ghooks 2017-01-10 16:13:37 +01:00
Julien Fontanet
d8ae943d8a chore: lerna is a dev dep 2017-01-10 15:54:29 +01:00
Julien Fontanet
63dae9ed70 chore: ignore log files
- lerna-debug.log{,.*}
- yerna-error.log{,.*}
2017-01-10 15:54:14 +01:00
Julien Fontanet
97f57f1f2b Merge remote-tracking branch 'xo-remote-parser/master' 2017-01-10 15:20:28 +01:00
Julien Fontanet
060ba6423e Merge remote-tracking branch 'xo-lib/master' 2017-01-10 15:20:25 +01:00
Julien Fontanet
f31bbcdaab Merge remote-tracking branch 'xo-common/master' 2017-01-10 15:20:14 +01:00
Julien Fontanet
2a4bae54ab Merge remote-tracking branch 'xo-collection/master' 2017-01-10 15:20:08 +01:00
Julien Fontanet
95df2f66a3 initial commit 2017-01-10 12:21:59 +01:00
Julien Fontanet
c0c63f49b1 0.10.0-0 2017-01-09 18:30:20 +01:00
Julien Fontanet
4e1bef9537 feat: redirect event 2017-01-09 18:29:54 +01:00
Julien Fontanet
8b78727d20 chore: add yarn.lock 2017-01-09 18:29:38 +01:00
Julien Fontanet
4cd7025be4 chore(package): update all dependencies 2017-01-09 17:30:52 +01:00
Julien Fontanet
015ce2690d chore(package): simplify scripts 2017-01-09 15:12:04 +01:00
Julien Fontanet
3e7f552a63 chore(package): use husky instead of ghooks 2017-01-09 15:05:36 +01:00
greenkeeper[bot]
28902d8747 fix(package): update execa to version 0.6.0 (#478)
https://greenkeeper.io/
2017-01-09 10:50:31 +01:00
Julien Fontanet
d534592479 5.5.4 2017-01-06 16:57:47 +01:00
Pierre Donias
b2f6ea9116 fix(vm.set): allocate resources when editing VM (#477)
Fixes vatesfr/xo-web#1695
2017-01-06 16:54:49 +01:00
Pierre Donias
8bf38bb29b feat(server): store connection error in database (#472)
See vatesfr/xo-web#1833
2017-01-06 16:38:17 +01:00
greenkeeper[bot]
9c6a78b678 fix(package): update promise-toolbox to version 0.8.0 (#476)
https://greenkeeper.io/
2017-01-06 11:34:27 +01:00
greenkeeper[bot]
128b169ae2 fix(package): update promise-toolbox to version 0.8.0 (#16)
https://greenkeeper.io/
2017-01-06 11:32:14 +01:00
greenkeeper[bot]
fdd33abe91 fix(package): update promise-toolbox to version 0.8.0 (#14)
https://greenkeeper.io/
2017-01-06 11:31:53 +01:00
greenkeeper[bot]
22882b1ff2 fix(package): update promise-toolbox to version 0.8.0 (#53)
https://greenkeeper.io/
2017-01-06 11:31:23 +01:00
greenkeeper[bot]
213898987d fix(package): update promise-toolbox to version 0.8.0 (#7)
https://greenkeeper.io/
2017-01-06 11:28:52 +01:00
Pierre Donias
850199d7fc fix(resource-sets): recompute limits (#475)
Fixes vatesfr/xo-web#1866
2017-01-06 10:09:36 +01:00
Pierre Donias
4282928960 fix(vif/create): locking mode when allocating IP addresses (#474)
Fixes vatesfr/xo-web#1747
2017-01-06 09:55:55 +01:00
Julien Fontanet
356dd89d9f chore(package): upgrade jest to v 0.18.1 2017-01-03 18:30:28 +01:00
Julien Fontanet
7dd2391e5a fix(group.setUsers): oldUsers → oldUsersIds 2017-01-03 11:20:25 +01:00
Julien Fontanet
e0093f236a fix(group.create): do not attempt to parse empty prop 2017-01-03 10:47:10 +01:00
Julien Fontanet
8c5c32268a fix: users and groups serialization in Redis
Fixes vatesfr/xo-web#1852.
2017-01-02 16:52:51 +01:00
greenkeeper[bot]
b61ccc1af1 fix(package): update hashy to version 0.6.0 (#470)
https://greenkeeper.io/
2017-01-02 13:01:29 +01:00
Julien Fontanet
7caf0e40f4 5.5.3 2017-01-02 10:56:08 +01:00
Julien Fontanet
a16508db10 fix(remotes): do not error on disabled remote
- testRemote()
- updateRemote()
- remoteRemote()
- forgetAllRemotes()
2016-12-25 20:07:42 +01:00
Julien Fontanet
044c9bed4c Update README.md 2016-12-23 11:01:25 +01:00
Julien Fontanet
81bff342b9 chore(package): update decorator-synchronized to version 0.2.3 2016-12-22 16:25:46 +01:00
Julien Fontanet
49d41a76a0 5.5.2 2016-12-22 11:22:45 +01:00
Julien Fontanet
b1732b3298 fix(file restore): work around for invalid delta VHD path (#467)
See vatesfr/xo-web#1842.
2016-12-22 11:20:51 +01:00
Julien Fontanet
9372cdb6c7 fix(vm.rollingDeltaBackup): do not hide error 2016-12-22 10:21:38 +01:00
badrAZ
81062638eb feat: attachments support (#13) 2016-12-22 10:09:15 +01:00
Julien Fontanet
1d8e54b83e chore(backups): use directly Xo#getRemoteHandler() 2016-12-22 09:50:16 +01:00
Julien Fontanet
30c5600271 chore(Xo#getRemoteHandler): use intermediary variable 2016-12-22 09:49:36 +01:00
Julien Fontanet
9f7e5c3a9a fix(Xo#getRemoteHandler): throws if remote is disabled 2016-12-22 09:49:04 +01:00
Julien Fontanet
37c9342717 fix(vm.rollingDeltaBackup): correctly delete snapshot in case of failure 2016-12-21 22:35:43 +01:00
Julien Fontanet
8827f8e940 fix(backup.fetchFiles): encode URI suffix
Fix issue with whitespaces in the filename.
2016-12-20 17:07:13 +01:00
Julien Fontanet
58334bf4a1 fix(backup.list): timestamps should be integers 2016-12-20 17:07:13 +01:00
Julien Fontanet
b898a6702c chore(package): use husky instead of ghooks 2016-12-20 17:07:13 +01:00
Julien Fontanet
6d78a810b9 perf(RemoteHandlerAbstract/createReadStream): optimise code
- avoid async function: overhead with transpilation
- do as much as possible in parallel
- fix: do not add length property in range mode
2016-12-20 17:07:13 +01:00
Julien Fontanet
8c0028055a chore(package): use husky instead of ghooks 2016-12-20 15:06:29 +01:00
Julien Fontanet
8fc4eb8cdf 5.5.1 2016-12-20 13:38:02 +01:00
Julien Fontanet
b3fac0c56f fix(backup.list): datetimes should be timestamps 2016-12-20 12:50:17 +01:00
Julien Fontanet
0b063b1f5e 5.5.0 2016-12-20 12:29:16 +01:00
Olivier Lambert
480f05e676 feat(vm): add install time (#465) 2016-12-20 12:19:11 +01:00
Julien Fontanet
1ac8af34ec feat(backup): implement file restore (#461)
See vatesfr/xo-web#1590

Current implementation has following limitations:

- only support local and NFS remotes
- requires installation of libvhdi-utils
- files can only be recovered one by one
2016-12-20 12:18:22 +01:00
Julien Fontanet
74f060b309 fix(package): rename to xo-server-transport-nagios 2016-12-20 11:50:49 +01:00
Julien Fontanet
12de0ca463 0.1.0 2016-12-20 11:45:11 +01:00
Julien Fontanet
72ed59b65b chore(package): make package publishable 2016-12-20 11:45:05 +01:00
Julien Fontanet
fe369bfa18 chore(package): update all dependencies 2016-12-20 11:43:45 +01:00
Julien Fontanet
116661d958 chore: add yarn.lock 2016-12-16 09:48:35 +01:00
Julien Fontanet
0dd70c57cd chore: factory function pass options directly 2016-12-16 09:48:19 +01:00
Julien Fontanet
df0aa1c46d fix(configure): do not modify passed configuration 2016-12-16 09:47:56 +01:00
Julien Fontanet
9b93a47e45 chore(package): update all dependencies 2016-12-16 09:47:26 +01:00
Julien Fontanet
06f6912fb9 chore(package): add mattermost as a keyword 2016-12-16 09:42:22 +01:00
badrAZ
c708fd65d7 feat: integration with xo-server-transport-nagios (#17) 2016-12-14 17:24:55 +01:00
badrAZ
0c497900a2 implementation (#1) 2016-12-14 16:33:40 +01:00
Julien Fontanet
34ff8b0f02 feat(Xapi#exportDeltaVm): don't export VDIs with names starting with [NOBAK] (#464)
Fixes vatesfr/xo-web#826
2016-12-14 10:57:25 +01:00
Julien Fontanet
77c3684e28 chore(tests): execute tests directly in src/ 2016-12-13 18:20:17 +01:00
Julien Fontanet
93038ea838 chore(package): remove unused trace 2016-12-13 14:08:38 +01:00
Julien Fontanet
46348f7cba feat: yarn integration 2016-12-13 12:15:26 +01:00
Julien Fontanet
ccc0e45daf feat(tests): use Jest instead of mocha/chai/must 2016-12-13 12:15:03 +01:00
Julien Fontanet
46ca03b017 chore(package): clean scripts 2016-12-13 11:55:12 +01:00
Julien Fontanet
1bfe3197a5 chore(Travis): test with Node stable 2016-12-13 11:51:04 +01:00
Julien Fontanet
4d2617fe68 chore(package): requires Node >= 4 2016-12-13 11:49:54 +01:00
Julien Fontanet
92e289f9da fix(decorators/mixin): do not use arrow function for constructor
It works because of the transpilation but it's not valid ES2015.
2016-12-13 11:41:41 +01:00
greenkeeper[bot]
a8c7558a77 chore(package): update index-modules to version 0.2.1 (#463) 2016-12-12 16:49:10 +01:00
greenkeeper[bot]
c756e7ecbe chore(package): update index-modules to version 0.2.0 (#462)
https://greenkeeper.io/
2016-12-12 16:16:44 +01:00
Pierre Donias
1998c56e84 feat(vm.delete): release resource set and IP-pool addresses (#460)
Fixes vatesfr/xo-web#1657, fixes vatesfr/xo-web#1748
2016-12-12 15:14:31 +01:00
greenkeeper[bot]
0b92ceec90 chore(package): update babel-preset-env to version 1.0.1 (#23)
https://greenkeeper.io/
2016-12-10 17:36:47 +01:00
greenkeeper[bot]
731bcc68ef chore(package): update babel-preset-env to version 1.0.0 (#5)
https://greenkeeper.io/
2016-12-09 22:56:24 +01:00
greenkeeper[bot]
7e5131c4d2 chore(package): update babel-preset-env to version 1.0.0 (#6)
https://greenkeeper.io/
2016-12-09 22:55:37 +01:00
greenkeeper[bot]
f0554fc77c chore(package): update babel-preset-env to version 1.0.0 (#14)
https://greenkeeper.io/
2016-12-09 22:55:29 +01:00
greenkeeper[bot]
c7814b1f04 chore(package): update babel-preset-env to version 1.0.0 (#14)
https://greenkeeper.io/
2016-12-09 22:55:16 +01:00
greenkeeper[bot]
d585b47360 chore(package): update babel-preset-env to version 1.0.0 (#16)
https://greenkeeper.io/
2016-12-09 22:55:06 +01:00
greenkeeper[bot]
4530d95f48 chore(package): update babel-preset-env to version 1.0.0 (#11)
https://greenkeeper.io/
2016-12-09 22:52:58 +01:00
Julien Fontanet
2ed55b1616 chore(decorators): remove unused @autobind. 2016-12-08 11:47:17 +01:00
Julien Fontanet
0c8d456fd3 chore(package): use bind-property-descriptor instead of custom implementation 2016-12-08 11:46:29 +01:00
Julien Fontanet
c7e6e72ce8 fix(events watching): stop if not connected
Fixes vatesfr/xo-web#1799
2016-12-07 23:18:05 +01:00
greenkeeper[bot]
013d4b9411 fix(package): update inquirer to version 2.0.0 (#23)
https://greenkeeper.io/
2016-12-06 23:18:15 +01:00
Julien Fontanet
9e4924caf6 5.4.1 2016-12-02 16:37:17 +01:00
Julien Fontanet
7f391a5860 Merge branch 'next-release' into stable 2016-12-02 16:37:13 +01:00
Julien Fontanet
5c7249c8fc fix(Xapi#exportDeltaVm): remove TAG_BASE_DELTA if full export
Fixes vatesfr/xo-web#1811
2016-12-02 16:09:27 +01:00
Julien Fontanet
0a8fed1950 0.2.3 2016-12-02 14:57:24 +01:00
Julien Fontanet
6dc4b4dc1b fix: workaround for VDI snapshots with $snaphot_of which point to themselves 2016-12-02 14:56:19 +01:00
Julien Fontanet
959b8863eb chore(package): update all dependencies 2016-12-02 10:03:49 +01:00
Pierre Donias
932d00133d feat(job-executor.match): __not pattern property (#459)
See vatesfr/xo-web#1503
2016-12-01 14:56:52 +01:00
Julien Fontanet
32a371bf13 chore(package): use golike-defer instead of custom implementation 2016-11-30 15:40:30 +01:00
greenkeeper[bot]
b25f418411 chore(package): update dependencies (#20)
https://greenkeeper.io/
2016-11-29 13:41:32 +01:00
greenkeeper[bot]
985a4780f5 chore(package): update dependencies (#26)
https://greenkeeper.io/
2016-11-29 13:41:04 +01:00
Olivier Lambert
92a1f2c6d5 feat(description): better explanation of checkCertificate (#22) 2016-11-29 10:51:24 +01:00
greenkeeper[bot]
81b9348e50 chore(package): update dependencies (#5)
https://greenkeeper.io/
2016-11-28 15:06:32 +01:00
Julien Fontanet
04e7d54620 v0.8.2 2016-11-25 11:50:31 +01:00
Julien Fontanet
729dbe16c0 fix(list objects): fix without filtering
Fixes #19
2016-11-25 11:49:28 +01:00
greenkeeper[bot]
974650bc56 chore(package): update babel-preset-env to version 0.0.9 (#22)
https://greenkeeper.io/
2016-11-24 22:42:22 +01:00
greenkeeper[bot]
0899a16333 chore(package): update babel-preset-env to version 0.0.9 (#11)
https://greenkeeper.io/
2016-11-24 22:06:00 +01:00
greenkeeper[bot]
8c9ed833c3 chore(package): update babel-preset-env to version 0.0.9 (#5)
https://greenkeeper.io/
2016-11-24 22:05:47 +01:00
greenkeeper[bot]
5e86e64e18 chore(package): update babel-preset-env to version 0.0.9 (#10)
https://greenkeeper.io/
2016-11-24 22:04:27 +01:00
greenkeeper[bot]
235c789c5e chore(package): update babel-preset-env to version 0.0.9 (#15)
https://greenkeeper.io/
2016-11-24 22:04:18 +01:00
greenkeeper[bot]
3f69a22229 chore(package): update babel-preset-env to version 0.0.9 (#3)
https://greenkeeper.io/
2016-11-24 22:03:23 +01:00
Julien Fontanet
ab48d06967 feat(README): update usage 2016-11-24 12:39:14 +01:00
Julien Fontanet
18ca950cd2 0.8.1 2016-11-24 12:35:02 +01:00
Julien Fontanet
82489b36c8 0.8.0 2016-11-24 12:34:04 +01:00
Julien Fontanet
a67b6130f8 feat(list objects): ability to select displayed properties
Fixes #18
2016-11-24 12:33:24 +01:00
Julien Fontanet
eab007db6e 0.6.0 2016-11-23 11:15:55 +01:00
Julien Fontanet
5d0622d2cf 5.4.0 2016-11-23 11:10:01 +01:00
Pierre Donias
9ab9155bf0 fix(vif.set): remove old VIF before creating new one (#457)
Fixes #1784
2016-11-23 10:38:24 +01:00
Julien Fontanet
889eae276e 0.6.0 2016-11-23 10:17:38 +01:00
Julien Fontanet
2b2a72252b chore(package): update all dependencies 2016-11-23 10:12:48 +01:00
Olivier Lambert
13e4568d3b feat(Slack): support Slack transport (#14) 2016-11-23 10:02:01 +01:00
Julien Fontanet
86a1ed6d46 chore(package): remove unused nyc 2016-11-23 10:00:45 +01:00
Julien Fontanet
b3c9936d74 chore(package): update xen-api to v0.9.6 2016-11-23 09:58:04 +01:00
Julien Fontanet
92c4dda801 0.3.0 2016-11-23 09:57:41 +01:00
Julien Fontanet
3e59ba4563 chore(package): update all dependencies 2016-11-23 09:57:23 +01:00
Julien Fontanet
99c95626df chore: pass options directly to the constructor 2016-11-23 09:49:27 +01:00
Julien Fontanet
20a9fc2497 chore(package): add description 2016-11-23 09:48:07 +01:00
Julien Fontanet
27e0621ad8 0.9.6 2016-11-23 09:46:33 +01:00
Julien Fontanet
abecff222c chore(package): make package publishable 2016-11-23 09:46:16 +01:00
Julien Fontanet
3f0d91101a chore(package): add description 2016-11-23 09:46:06 +01:00
Julien Fontanet
252be59ac3 chore(package): update babel-preset-env to v0.0.8 2016-11-23 09:43:19 +01:00
Julien Fontanet
1987a8c68a chore(events): rely on event.from timeout instead of inject
Should be enough.
2016-11-23 09:42:11 +01:00
Julien Fontanet
5088fd0e82 fix(README): dev section 2016-11-23 09:39:50 +01:00
badrAZ
2de4d36a0f implementation (#2) 2016-11-23 09:37:39 +01:00
greenkeeper[bot]
21b4d7cf11 chore(package): update nyc to version 10.0.0 (#456)
https://greenkeeper.io/
2016-11-23 09:12:26 +01:00
greenkeeper[bot]
4ec07f9ff8 fix(package): update get-stream to version 3.0.0 (#458)
https://greenkeeper.io/
2016-11-23 09:11:39 +01:00
Julien Fontanet
fb32aeeeb6 0.8.2 2016-11-18 18:32:35 +01:00
Julien Fontanet
76cb4037d4 fix: build for > 2% browsers
Fixes #21
2016-11-18 18:32:27 +01:00
greenkeeper[bot]
b7c89d6f64 fix(package): update http-server-plus to version 0.8.0 (#454)
https://greenkeeper.io/
2016-11-18 14:44:50 +01:00
Julien Fontanet
af1530db36 0.8.1 2016-11-18 11:51:23 +01:00
Julien Fontanet
9d6560aece chore(package): update all dependencies 2016-11-18 11:50:26 +01:00
Julien Fontanet
caba246e0b fix(README): update doc 2016-11-18 10:46:51 +01:00
greenkeeper[bot]
0eb168ec70 fix(package): update uuid to version 3.0.0 (#453)
https://greenkeeper.io/
2016-11-18 09:10:07 +01:00
Julien Fontanet
731e2dc4c4 0.7.4 2016-11-17 17:33:08 +01:00
Julien Fontanet
815bdf3454 fix(package): downgrade nice-pipe to 0.0.0 2016-11-17 17:33:04 +01:00
Julien Fontanet
b36ef9fdb1 0.7.3 2016-11-17 15:40:29 +01:00
Julien Fontanet
fee3f7a716 fix(list objects): writes one objects at a time
Fixes vatesfr/xo-web#1356
2016-11-17 14:56:43 +01:00
Olivier Lambert
8ac1a66e93 feat(sr.shared): new boolean property (#452) 2016-11-17 14:33:45 +01:00
badrAZ
301da3662a fix(plugin.test): data param is optional (#451) 2016-11-16 16:08:11 +01:00
greenkeeper[bot]
e474946cb7 fix(package): update xo-common to version 0.1.0 (#450)
https://greenkeeper.io/
2016-11-16 12:01:27 +01:00
Julien Fontanet
dd00d6581f 0.1.0 2016-11-16 11:52:36 +01:00
Pierre Donias
9a0ca1ebb2 feat(api): map 10 XAPI errors to XO errors (#449)
Fixes vatesfr/xo-web#1481
2016-11-16 11:22:31 +01:00
Pierre Donias
f4fc7acf4d feat(api-errors): 10 new errors (#3)
See vatesfr/xo-web#1481
2016-11-16 11:21:46 +01:00
Julien Fontanet
5b8cdf06b3 feat(test): new protocol (#2)
Plugins are now testable.
2016-11-15 11:01:50 +01:00
Julien Fontanet
682315e672 fix(package): update fs-promise to version 1.0.0 (#7)
https://greenkeeper.io/
2016-11-15 09:50:26 +01:00
Julien Fontanet
520f7b2a77 feat(job.create,job.set): ability to set userId (#448)
See vatesfr/xo-web#1733
2016-11-14 17:42:19 +01:00
Pierre Donias
c0b3b3aab8 Fix userId. 2016-11-14 16:59:10 +01:00
Pierre Donias
d499332ce3 It should be possible to not change a job's user. 2016-11-14 15:56:54 +01:00
Pierre Donias
19ce06e0bb feat(job#create,job#set): userId parameter
See vatesfr/xo-web#1733
2016-11-14 15:33:09 +01:00
Julien Fontanet
e33c7fd1c1 initial commit 2016-11-10 15:48:14 +01:00
Julien Fontanet
9b3668423e 0.2.0 2016-11-10 10:47:43 +01:00
greenkeeper[bot]
7227af9aac fix(package): update fs-promise to version 1.0.0 (#21)
https://greenkeeper.io/
2016-11-10 08:57:20 +01:00
greenkeeper[bot]
7c8194307e fix(package): update fs-promise to version 1.0.0 (#17)
https://greenkeeper.io/
2016-11-10 08:56:51 +01:00
greenkeeper[bot]
ea6ff4224e fix(package): update fs-promise to version 1.0.0 (#447)
https://greenkeeper.io/
2016-11-10 08:56:37 +01:00
greenkeeper[bot]
36c38063f2 fix(package): update fs-promise to version 1.0.0
https://greenkeeper.io/
2016-11-10 02:17:39 +00:00
Julien Fontanet
9b5fac9e2b feat(test): throw an error when authentication fails 2016-11-09 17:08:17 +01:00
Julien Fontanet
871d1f8632 fix(plugins registration): params order 2016-11-09 17:05:10 +01:00
badrAZ
47991b7d1a feat(test): this plugin is now testable (#20)
See vatesfr/xo-web#1749
2016-11-09 16:41:53 +01:00
Badr AZIZBI
a5ea24311a Errors fixed 2016-11-09 15:53:16 +01:00
badrAZ
77ce2ff6d1 feat(plugin.test): plugins can be tested (#446)
See vatesfr/xo-web#1749
2016-11-09 14:58:19 +01:00
badrAZ
3c11f0acda feat(test): this plugin is now testable (#9)
See vatesfr/xo-web#1749
2016-11-09 14:55:08 +01:00
Pierre Donias
6383104796 fix(Xapi#editPif): destroy VLAN from each PIF before creating new VLAN (#444) 2016-11-08 16:50:12 +01:00
Julien Fontanet
4a5222fa3b chore(package): update all dependencies 2016-11-08 11:11:13 +01:00
Julien Fontanet
b99b4159c8 feat(Redis): support aliased commands
Fixes #443
2016-11-08 10:23:53 +01:00
greenkeeper[bot]
4294dfd8fe chore(package): update dependencies (#18)
https://greenkeeper.io/
2016-11-07 21:20:54 +01:00
Olivier Lambert
8bedb1f3b9 Merge pull request #442 from vatesfr/pierre-fix-xo-error
fix(api): xoError is not an object
2016-11-07 18:18:45 +01:00
Pierre Donias
dc85804a27 fix(api): xoError is not an object 2016-11-07 17:58:16 +01:00
greenkeeper[bot]
42a31e512a fix(package): update json-rpc-peer to version 0.13.0 (#441)
https://greenkeeper.io/
2016-11-07 14:57:53 +01:00
Pierre Donias
2be7388696 feat(api-errors): throw custom errors when XAPI error is caught (#440)
See vatesfr/xo-web#1717
2016-11-07 14:15:23 +01:00
Pierre Donias
e7b739bb3b feat(api-errors): error factories (#1) 2016-11-07 12:30:29 +01:00
Julien Fontanet
baf5f7491d 0.7.2 2016-11-04 17:24:00 +01:00
Badr AZIZBI
a2afe2fa1a Error correction 2016-11-04 15:47:45 +01:00
Badr AZIZBI
8496a9bebd Initial commit 2016-11-04 13:42:23 +01:00
Julien Fontanet
bc5b00781b 5.3.3 2016-11-04 11:44:09 +01:00
Olivier Lambert
313e2b3de6 fix(Sr): add type cifs in deviceConfig. Fixes vatesfr/xo-web#1615 (#439) 2016-11-04 11:42:03 +01:00
Julien Fontanet
0bbd002060 fix(xo.importConfig): dont unnecessarily delete existing users
Do not delete existing users with same name & id
2016-11-04 09:42:56 +01:00
Julien Fontanet
5e785266a5 fix(xo.importConfig): correctly import ACLs
Fixes vatesfr/xo-web#1722
2016-11-04 09:40:41 +01:00
Julien Fontanet
5870769e7d fix(vm.import{,Delta}Backup): make restored VMs identifiable
Their names is prefixed with the exported date and they have a specific tag (*restored from backup*).

Fixes vatesfr/xo-web#1719
2016-11-03 16:22:42 +01:00
greenkeeper[bot]
0d6b7d6f04 chore(package): update babel-preset-env to version 0.0.7 (#2)
https://greenkeeper.io/
2016-11-03 08:59:51 +01:00
Julien Fontanet
59d6a51635 fix(package): fix depcheck (again) 2016-11-02 17:23:40 +01:00
Julien Fontanet
b4693019f7 fix(package): fix depcheck 2016-11-02 17:02:14 +01:00
Julien Fontanet
320d7a89ca fix(package): fix build 2016-11-02 17:02:07 +01:00
Julien Fontanet
79b80dcd07 fix(pif#carrier): cast to boolean 2016-11-02 16:50:12 +01:00
Julien Fontanet
1016f5f26f initial commit 2016-11-02 16:43:19 +01:00
Olivier Lambert
6f6e547e6c feat(pif): add carrier (#438)
Fixes vatesfr/xo-web#1702
2016-11-02 16:25:44 +01:00
Julien Fontanet
9284aee3fa 0.4.1 2016-11-02 15:12:23 +01:00
Julien Fontanet
32726efe88 Revert "Temporary work around for eslint/eslint#3946."
This reverts commit 63426818e6d43181ae635819fd1697fc9ea0a3d8.
2016-11-02 15:10:29 +01:00
Julien Fontanet
87daf0271c chore(package): update all dependencies 2016-11-02 15:03:45 +01:00
Julien Fontanet
70e73a5a65 fix(Collection#remove): properly report the key in related event 2016-11-02 15:00:04 +01:00
Julien Fontanet
1642798aa6 0.9.5 2016-11-02 14:04:15 +01:00
Julien Fontanet
588c369615 fix(package): fix URLs 2016-11-02 11:45:31 +01:00
greenkeeper[bot]
9aa9d4452c chore(package): update dependencies (#16)
https://greenkeeper.io/
2016-11-02 09:30:20 +01:00
greenkeeper[bot]
d7fe25c4fc chore(package): update dependencies (#17)
https://greenkeeper.io/
2016-11-01 22:01:39 +01:00
greenkeeper[bot]
990c5e9f08 chore(package): update dependencies (#25)
https://greenkeeper.io/
2016-11-01 22:01:31 +01:00
greenkeeper[bot]
352c9357df chore(package): update dependencies (#437)
https://greenkeeper.io/
2016-11-01 19:05:11 +01:00
Pierre Donias
1ba4641641 feat(acls): handle xo.clean (#436) 2016-10-31 15:53:50 +01:00
Greenkeeper
60e0047285 chore(package): update helmet to version 3.0.0 (#435)
https://greenkeeper.io/
2016-10-29 12:52:18 +02:00
Julien Fontanet
7e2f2f6102 chore(package): various updates 2016-10-28 13:47:21 +02:00
Julien Fontanet
51def6535f chore(package): various updates 2016-10-28 12:10:31 +02:00
Julien Fontanet
14156b0911 chore(package): update all dependencies 2016-10-28 11:54:51 +02:00
Julien Fontanet
e2ba1fa7f8 initial commit 2016-10-28 11:48:06 +02:00
Julien Fontanet
36b589c2db chore(package): various updates 2016-10-28 11:44:11 +02:00
Julien Fontanet
cdf1a5fe47 fix(package): do not use babel-preset-babili 2016-10-28 11:14:17 +02:00
Julien Fontanet
abf146707f chore(package): update all dependencies 2016-10-28 11:08:32 +02:00
Pierre Donias
235e7c143c fix(signin): new Bootstrap classes (#434) 2016-10-28 10:11:41 +02:00
Julien Fontanet
522d6eed92 5.3.2 2016-10-27 18:49:32 +02:00
Julien Fontanet
9d1d6ea4c5 feat(xo): export/import config (#427)
See vatesfr/xo-web#786
2016-10-27 18:48:19 +02:00
Julien Fontanet
0afd506a41 5.3.1 2016-10-27 18:25:16 +02:00
Julien Fontanet
9dfb837e3f fix(Xapi#importDeltaVm): gracefully handle missing vif.$network$uuid (#433) 2016-10-27 16:46:45 +02:00
fufroma
4ab63b569f fix(RemoteHandlerNfs): move mount points in /run/xo-server/mounts
Fixes vatesfr/xo-web#1405
2016-10-27 15:56:33 +02:00
Julien Fontanet
8d390d256d fix(http-request): handle redirections (#432) 2016-10-27 15:34:54 +02:00
Julien Fontanet
4eec5e06fc fix(package): test on Node 6, not 7 (#431) 2016-10-27 12:24:40 +02:00
Julien Fontanet
e4063b1ba8 feat(sample.config.yaml): add warning about YAML 2016-10-24 22:52:11 +02:00
Julien Fontanet
c24a4009c8 chore(package): use full lodash package 2016-10-24 17:29:34 +02:00
Julien Fontanet
7b928c4d41 chore(package): add Travis CI conf 2016-10-24 16:03:04 +02:00
Julien Fontanet
4d50eae3c9 0.7.1 2016-10-24 15:58:32 +02:00
Julien Fontanet
c3a5e0592d chore(package): add --unregister doc 2016-10-24 15:58:14 +02:00
Julien Fontanet
207aef7cb3 fix(--list-commands): fix --json flag 2016-10-24 15:55:22 +02:00
Julien Fontanet
fbbd9ae249 chore(package): update (almost) all dependencies 2016-10-24 15:55:01 +02:00
Julien Fontanet
7aa591ffbd fix(package): handle multiline params 2016-10-24 15:33:40 +02:00
Greenkeeper
1fd91de50d chore(package): update promise-toolbox to version 0.7.0 (#8)
https://greenkeeper.io/
2016-10-24 15:03:35 +02:00
Greenkeeper
0c3227cf8e chore(package): update promise-toolbox to version 0.7.0 (#428)
https://greenkeeper.io/
2016-10-24 15:01:17 +02:00
Greenkeeper
8492ceee09 chore(package): update promise-toolbox to version 0.7.0 (#13)
https://greenkeeper.io/
2016-10-24 15:01:03 +02:00
Greenkeeper
1f710b9b78 chore(package): update promise-toolbox to version 0.7.0 (#49)
https://greenkeeper.io/
2016-10-24 15:00:35 +02:00
Pierre Donias
7bed200bf5 feat(pif): editVlan (#426)
Fix vatesfr/xo-web#1092
2016-10-24 10:24:44 +02:00
Julien Fontanet
b87ad2df54 0.5.1 2016-10-20 16:18:00 +02:00
Julien Fontanet
4f763e2109 5.3.0 2016-10-20 16:01:53 +02:00
Julien Fontanet
c9e2f94daf fix(markdown): insert a blank line after lists 2016-10-20 15:19:17 +02:00
Pierre Donias
75167fb65b feat(pif): expose IP config modes (#424)
See vatesfr/xo-web#1651
2016-10-20 12:44:35 +02:00
Julien Fontanet
675588f780 feat(delta backups): force checksums refresh
See vatesfr/xo-web#1672
2016-10-20 12:38:26 +02:00
Julien Fontanet
2d6f94edd8 fix(vhd-merge/chainVhd): correctly await _write()
Fixes vatesfr/xo-web#1672
2016-10-20 12:31:20 +02:00
Julien Fontanet
52774c7d6d 0.3.1 2016-10-19 13:17:10 +02:00
Julien Fontanet
247c66ef4b feat(IP pools): can be used in resource sets (#413)
See vatesfr/xo-web#1565
2016-10-19 11:17:05 +02:00
Julien Fontanet
01686b8e60 fix(package): behave with missing thresholds object 2016-10-18 17:34:06 +02:00
Julien Fontanet
0317d6a862 chore(package): remove unused test env 2016-10-18 17:33:29 +02:00
Julien Fontanet
2a316b1ffa chore(package): use constants in configuration schema 2016-10-18 17:31:46 +02:00
Julien Fontanet
9b9f0e5607 fix(package): fix various URLs 2016-10-14 11:57:37 +02:00
Julien Fontanet
590f6cb7b3 chore(package): update all dependencies 2016-10-14 11:53:39 +02:00
Greenkeeper
1076fac40f Update gulp-sourcemaps to version 2.1.1 🚀 (#422)
https://greenkeeper.io/
2016-10-14 10:44:27 +02:00
Julien Fontanet
14a4a415a2 5.2.6 2016-10-13 18:51:16 +02:00
Julien Fontanet
524355b59c fix(vhd-merge/chainVhd): correctly compute header checksum (#419)
Fixes vatesfr/xo-web#1656
2016-10-13 18:49:58 +02:00
Julien Fontanet
b120146cdc chore(package): lots of comments 2016-10-12 17:21:45 +02:00
Greenkeeper
36fe49f3f5 Update promise-toolbox to version 0.6.0 🚀 (#416)
https://greenkeeper.io/
2016-10-12 09:19:19 +02:00
Greenkeeper
7587458f99 Update promise-toolbox to version 0.6.0 🚀 (#7)
https://greenkeeper.io/
2016-10-12 09:12:14 +02:00
Greenkeeper
d1e69f5957 chore(package): update promise-toolbox to version 0.6.0 (#12)
https://greenkeeper.io/
2016-10-11 17:34:11 +02:00
Julien Fontanet
2c35ee11b3 fix(Xapi#_init): fix promisify() usage 2016-10-11 17:22:43 +02:00
Greenkeeper
bd0c747d98 chore(package): update promise-toolbox to version 0.6.0 (#48)
https://greenkeeper.io/
2016-10-11 17:20:32 +02:00
Julien Fontanet
f5fb066975 chore(package): babel-preset-es2015 → babel-preset-latest 2016-10-11 10:51:21 +02:00
Julien Fontanet
cd6a0fa678 fix(package): use babel-plugin-transform-runtime 2016-10-11 10:51:04 +02:00
Julien Fontanet
e735420dd8 chore(package): babel-preset-es2015 → babel-preset-latest 2016-10-11 10:49:37 +02:00
Julien Fontanet
bc2f17c840 fix(package): use babel-plugin-transform-runtime 2016-10-11 10:47:05 +02:00
Julien Fontanet
8c459cac0f fix(package): remove babel-plugin-lodash 2016-10-11 10:43:28 +02:00
Julien Fontanet
878d2d9260 fix(package): remove babel-plugin-lodash 2016-10-11 10:38:39 +02:00
Greenkeeper
c0c0af9b14 chore(package): update execa to version 0.5.0 (#411)
https://greenkeeper.io/
2016-10-05 10:40:31 +02:00
Julien Fontanet
d1e472d482 chore(package): use babel-plugin-lodash 2016-10-04 16:05:01 +02:00
Julien Fontanet
c80e43ad0d fix(vm.create): don't require view perm on VM template 2016-10-04 16:03:06 +02:00
Julien Fontanet
fdd395e2b6 fix(vm.create): correctly check resourceSet objects
Related to vatesfr/xo-web#1620
2016-10-04 15:51:04 +02:00
Julien Fontanet
e094437168 fix(package): update xo-acl-resolver to version 0.2.2
See vatesfr/xo-web#1620
2016-10-04 15:24:01 +02:00
Julien Fontanet
14bca4bbf7 0.2.2 2016-10-04 15:16:10 +02:00
Julien Fontanet
ea55c10c4d chore(package): pnpm compatibility 2016-10-04 15:15:39 +02:00
Julien Fontanet
75cde40b0e fix(VM-template): normal permissions handling
Fixes vatesfr/xo-web#1620
2016-10-04 15:13:08 +02:00
Julien Fontanet
5434b4987f chore(package): remove unused deps 2016-10-04 15:09:12 +02:00
Pierre Donias
2ee0be7466 fix(xapi/utils/makeEditObject): constraints works with user props (#410) 2016-10-04 15:02:27 +02:00
Julien Fontanet
2784a7cc92 Create ISSUE_TEMPLATE.md 2016-10-03 16:24:24 +02:00
Julien Fontanet
b09f998d6c 5.2.5 2016-10-03 09:39:52 +02:00
Nicolas Raynaud
bdeb5895f6 fix(deltaBackups): update checksum after altering VHD files (#408)
Fixes vatesfr/xo-web#1606
2016-09-30 14:31:33 +02:00
Pierre Donias
3944b8aaee feat(network): create a bonded network (#407)
Fixes vatesfr/xo-web#876
2016-09-30 13:51:33 +02:00
Nicolas Raynaud
6e66cffb92 feat(deltaBackups): correctly chain VHDs (#406)
The goal is for a tool like vhdimount to be able to mount any file and use it as a disk to recover specific file in it.
2016-09-29 17:31:36 +02:00
Julien Fontanet
54befb2814 chore(package): update all dependencies 2016-09-29 14:43:29 +02:00
Julien Fontanet
74fba76b85 chore(package): update all dependencies 2016-09-29 14:16:47 +02:00
Julien Fontanet
2b8996e965 chore(package): update all dependencies 2016-09-29 14:00:25 +02:00
Julien Fontanet
a9aad547b2 fix(package): use babel-plugin-transform-runtime 2016-09-29 13:37:20 +02:00
Julien Fontanet
4673af6fd8 chore(package): update all dependencies 2016-09-29 12:54:46 +02:00
Julien Fontanet
33ae81ce05 chore(package): update all dependencies 2016-09-29 12:38:18 +02:00
Pierre Donias
57092ee788 feat(vif.set): support for network, MAC and currently_attached (#403)
Fixes vatesfr/xo-web#1446
2016-09-28 15:09:17 +02:00
Julien Fontanet
70e9e1c706 chore(package): update human-format to version 0.7.0 2016-09-28 09:58:54 +02:00
Greenkeeper
075c43ce0e chore(package): update chai-as-promised to version 6.0.0 (#6)
https://greenkeeper.io/
2016-09-28 09:49:21 +02:00
Greenkeeper
10fddc51bb chore(package): update babel-eslint to version 7.0.0 (#11)
https://greenkeeper.io/
2016-09-27 23:40:44 +02:00
Greenkeeper
b32b319198 chore(package): update babel-eslint to version 7.0.0 (#5)
https://greenkeeper.io/
2016-09-27 23:40:10 +02:00
Greenkeeper
2d14fde671 chore(package): update babel-eslint to version 7.0.0 (#23)
https://greenkeeper.io/
2016-09-27 23:39:57 +02:00
Greenkeeper
9662b8fbee chore(package): update babel-eslint to version 7.0.0 (#404)
https://greenkeeper.io/
2016-09-27 23:39:30 +02:00
Greenkeeper
98cd2746ef chore(package): update babel-eslint to version 7.0.0 (#15)
https://greenkeeper.io/
2016-09-27 23:39:13 +02:00
Greenkeeper
ea18e4129c chore(package): update babel-eslint to version 7.0.0 (#14)
https://greenkeeper.io/
2016-09-27 23:37:26 +02:00
Greenkeeper
6980e2b959 chore(package): update babel-eslint to version 7.0.0 (#4)
https://greenkeeper.io/
2016-09-27 23:37:03 +02:00
Greenkeeper
7e7ec83c12 chore(package): update babel-eslint to version 7.0.0 (#19)
https://greenkeeper.io/
2016-09-27 23:27:37 +02:00
Greenkeeper
b12fd45df1 chore(package): update babel-eslint to version 7.0.0 (#47)
https://greenkeeper.io/
2016-09-27 23:26:52 +02:00
Julien Fontanet
a8340c24c3 chore(package): update all dependencies 2016-09-27 15:29:23 +02:00
Julien Fontanet
9f66421ae7 fix(bootstrap): C-c twice force stop the server 2016-09-27 10:44:24 +02:00
Greenkeeper
50584c2e50 chore(package): update http-server-plus to version 0.7.0 (#402)
https://greenkeeper.io/
2016-09-27 09:30:16 +02:00
Julien Fontanet
7be4e1901a chore(package): use index-modules 2016-09-26 15:41:41 +02:00
Greenkeeper
f49f3fb2a6 Update all dependencies 🌴 (#3)
https://greenkeeper.io/
2016-09-25 16:20:17 +02:00
Greenkeeper
3c9ef8d199 chore(package): update dependencies (#10)
https://greenkeeper.io/
2016-09-25 15:54:44 +02:00
Julien Fontanet
b47146de45 fix(pbd/attached): should be a boolean 2016-09-22 13:20:49 +02:00
Julien Fontanet
97b229b2c7 fix(vm.set): works with VM templates
Fixes vatesfr/xo-web#1569
2016-09-22 10:39:20 +02:00
Greenkeeper
669c24ebd5 chore(package): update dependencies (#4)
https://greenkeeper.io/
2016-09-22 07:53:33 +02:00
Julien Fontanet
6bb5bb9403 5.2.4 2016-09-21 10:20:46 +02:00
Julien Fontanet
8c4b8271d8 fix(pool.setDefaultSr): remove pool param
Fixes vatesfr/xo-web#1558
2016-09-20 11:45:36 +02:00
Julien Fontanet
69291c0574 chore(package): update xo-vmdk-to-vhd to version 0.0.12
Fixes vatesfr/xo-web#1551
2016-09-20 10:41:42 +02:00
Julien Fontanet
2dc073dcd6 fix(vm.resourceSet): handle xo namespace 2016-09-19 13:15:23 +02:00
Julien Fontanet
1894cb35d2 feat(vm): expose resourceSet prop 2016-09-19 12:10:09 +02:00
Julien Fontanet
cd37420b07 Merge pull request #398 from vatesfr/greenkeeper-standard-8.1.0
Update standard to version 8.1.0 🚀
2016-09-18 05:17:41 +02:00
Greenkeeper
16dde5c772 chore(package): update standard to version 8.1.0 (#12)
https://greenkeeper.io/
2016-09-18 05:17:03 +02:00
Julien Fontanet
55cb6b39db fix(Xo#removeSchedule): correctly test instance of SchedulerError 2016-09-18 05:12:36 +02:00
greenkeeperio-bot
89d13b2285 chore(package): update standard to version 8.1.0
https://greenkeeper.io/
2016-09-17 20:51:59 +02:00
Julien Fontanet
1b64b0468a fix(group.delete): remove associated ACLs
Fixes vatesfr/xo-web#899
2016-09-16 16:04:41 +02:00
Julien Fontanet
085fb83294 fix(user.delete): remove associated ACLs
See vatesfr/xo-web#899
2016-09-16 16:04:41 +02:00
Julien Fontanet
edd606563f feat(vm.revert): can snapshot before (#395)
See vatesfr/xo-web#1445
2016-09-15 14:59:43 +02:00
Julien Fontanet
fb804e99f0 5.2.3 2016-09-14 18:02:32 +02:00
Pierre Donias
1707cbcb54 feat(signin): use XO 5 style (#394)
Fixes vatesfr/xo-web#1161
2016-09-14 17:56:05 +02:00
Julien Fontanet
6d6a630c31 5.2.2 2016-09-14 17:37:42 +02:00
Julien Fontanet
ff2990e8e5 chore(package): update @marsaud/smb2-promise to version 0.2.1
Fixes vatesfr/xo-web#1511
2016-09-14 17:32:52 +02:00
Nicolas Raynaud
d679aff0fb chore(package): remove node-smb2 dependency (#393) 2016-09-14 16:23:28 +02:00
Julien Fontanet
603a444905 fix(Xapi#importVm): remove VM's VDIs on failure 2016-09-14 14:11:20 +02:00
Julien Fontanet
a002958448 fix(DR): remove previous VDIs
Fixes vatesfr/xo-web#1510
2016-09-14 14:11:20 +02:00
Julien Fontanet
cb4bc37424 fix(DR): delete VMs in all cases
Previous copies were not deleted when there were as many as the depth.

Fixes vatesfr/xo-web#1509
2016-09-14 14:11:19 +02:00
Julien Fontanet
0fc6f917e6 5.2.1 2016-09-13 16:44:35 +02:00
Julien Fontanet
ec0d012b24 feat(vm.set): support tags (#392)
Fixes vatesfr/xo-web#1431
2016-09-13 16:35:40 +02:00
Julien Fontanet
2cd4b171a1 chore(package): update json5 to version 0.5.0 2016-09-13 11:28:56 +02:00
Julien Fontanet
0cb6906c4d chore(package): is-my-json-valid to v2.13.1 2016-09-13 11:25:22 +02:00
Julien Fontanet
4c19b93c30 chore(package): update fs-promise to version 0.5.0 2016-09-13 11:23:42 +02:00
Julien Fontanet
6165f1b405 fix(vm.create): select SR of first disk-VDI (#391)
Fixes vatesfr/xo-web#1493
2016-09-12 16:32:43 +02:00
Julien Fontanet
37a4221e43 fix(vm.docker.containers): yes, again 2016-09-12 12:13:45 +02:00
Julien Fontanet
9831b222b5 fix(vm.docker.containers) 2016-09-12 12:11:15 +02:00
Julien Fontanet
7b6f44fb74 fix(vm.createInterface): syntax fix 2016-09-12 12:06:34 +02:00
Julien Fontanet
399f4d0ea3 feat(vm.docker.containers): like vm.docker.process.items but always an array 2016-09-12 11:43:36 +02:00
Julien Fontanet
26a668a875 fix(vm.createInterface): accept integers for position and mtu 2016-09-12 11:36:30 +02:00
Julien Fontanet
bf96262b6e feat(Xapi#createVif): default MTU is network's MTU 2016-09-12 11:05:31 +02:00
Julien Fontanet
96635a98f5 0.5.0 2016-09-09 15:50:38 +02:00
Julien Fontanet
1155fa1fe9 chore(vm.create): remove some console.log()s 2016-09-09 15:31:25 +02:00
Julien Fontanet
1875d31731 5.2.0 2016-09-09 15:16:03 +02:00
Julien Fontanet
6f855fd14e feat(IP pools): groups of IP addresses (#371) 2016-09-09 15:12:30 +02:00
Julien Fontanet
08e392bb46 fix(vm.create): correctly compute limits usage (#389)
Fixes vatesfr/xo-web#1365
2016-09-09 12:55:10 +02:00
Julien Fontanet
66d63e0546 fix(test.wait): fix setTimeout params order 2016-09-08 18:40:55 +02:00
Julien Fontanet
7ee56fe8bc feat(pool.installAllPatches): install all patches on a pool (#388)
See vatesfr/xo-web#1392
2016-09-07 17:54:00 +02:00
Julien Fontanet
669d04ee48 fix(vm.migrate): error on unused default SR
Fixes #1466
2016-09-05 14:21:17 +02:00
Julien Fontanet
cb1b37326e fix(vm.rollingDrCopy): avoid duplicates in VMs list (#387)
Fixes vatesfr/xo-web#1464
2016-09-05 13:41:20 +02:00
Julien Fontanet
7bb73bee67 feat(vm.rollingDrCopy): failure to destroy old copies is not fatal 2016-09-05 11:29:54 +02:00
Julien Fontanet
7286ddc338 chore(JobExecutor): use utils/serializeError() 2016-09-05 11:29:53 +02:00
Julien Fontanet
54ef65ced9 feat: display error message
Fixes vatesfr/xo-web#1462
2016-09-05 10:39:54 +02:00
Julien Fontanet
4fb6bef04c feat: express global status in mail subject
New format is: `[Xen Orchestra][Success | Failure] Backup report for $tag`

Fixes vatesfr/xo-web#1463
2016-09-05 10:39:11 +02:00
Olivier Lambert
7d1f9e33fe feat(network): add defaultIsLocked to API (#385) 2016-09-01 14:49:20 +02:00
Ronan Abhamon
63c676ebfe feat(vm.import): supports OVA (#375)
See vatesfr/xo-web#709
2016-09-01 14:11:15 +02:00
Nicolas Raynaud
7d5e7f5c73 add some notes 2016-08-30 11:26:35 -07:00
Nicolas Raynaud
15a8b97410 0.0.12 2016-08-30 10:10:21 -07:00
Nicolas Raynaud
874162df87 remove stream declared size 2016-08-30 10:03:57 -07:00
Nicolas Raynaud
0c8b9d8539 0.0.11 2016-08-26 17:37:15 -07:00
Nicolas Raynaud
7c6579b264 allow the reading of some cases of malformed VMDK files
- if the L1 is advertised in the header
 - and the L1 table is right after the descriptor (with or without marker)
 - and the L2 table is just after L1 (with or without marker)
 - and L2 is not fragmented
 - and the grains are in ascending order in the file
 - then we skip all the tables and read the grains directly
2016-08-26 17:36:41 -07:00
Greenkeeper
fcaf6b7923 chore(package): update json-rpc-peer to version 0.12.0 (#383)
https://greenkeeper.io/
2016-08-25 11:56:54 -04:00
Nicolas Raynaud
e3473721f6 0.0.10 2016-08-24 09:42:12 -07:00
Nicolas Raynaud
28799c62a9 spawn only one promise in _read() of the outpur stream
- instrument VirtualBuffer to detect unwanted concurrency
 - move VMDK version detection to header parsing
 - chunk zero pages in the output stage
 - avoid sending too much data at once in the output stage (with a shadow file)
2016-08-24 09:39:02 -07:00
Greenkeeper
224a79840d chore(package): update standard to version 8.0.0 (#14)
https://greenkeeper.io/
2016-08-24 12:23:09 -04:00
Greenkeeper
c21fef7c72 Update standard to version 8.0.0 🚀 (#46)
https://greenkeeper.io/
2016-08-24 11:50:04 -04:00
Greenkeeper
99ae3e0f7f chore(package): update standard to version 8.0.0 (#18)
https://greenkeeper.io/
2016-08-24 11:37:01 -04:00
Greenkeeper
02a4161ecb chore(package): update standard to version 8.0.0 (#22)
https://greenkeeper.io/
2016-08-24 11:33:05 -04:00
Greenkeeper
1a68c3947d chore(package): update standard to version 8.0.0 (#13)
https://greenkeeper.io/
2016-08-24 11:26:48 -04:00
Nicolas Raynaud
4ac58b3f44 0.0.9 2016-08-22 03:53:26 +02:00
Nicolas Raynaud
a9758e6997 fix postion computation in vitual buffer 2016-08-22 03:32:06 +02:00
Nicolas Raynaud
bb546c6bb7 chunk the padding buffers of the output stage 2016-08-22 03:30:16 +02:00
Nicolas Raynaud
d877a6f1ad 0.0.8 2016-08-18 21:40:20 +02:00
Nicolas Raynaud
ef7a563d97 avoid constructing 0 byte long buffer and async stream._read() function 2016-08-18 21:39:23 +02:00
Nicolas Raynaud
df33772eba 0.0.7 2016-08-18 17:11:23 +02:00
Nicolas Raynaud
97c1cc8ed9 remove the custom virtual buffer in favor of pipette 2016-08-18 17:10:14 +02:00
Julien Fontanet
9f347a170a fix(xapi/utils): correctly isPlainObject 2016-08-18 16:21:34 +02:00
Julien Fontanet
2f7cd4426d fix(xapi/utils/prepareXapiParam): array handling 2016-08-18 16:15:51 +02:00
Julien Fontanet
854f256470 fix(xapi/getNamespaceForType): add missing VIF 2016-08-18 15:27:47 +02:00
Julien Fontanet
5d0b40f752 fix(utils/camelToSnakeCase): better number handling 2016-08-18 15:23:57 +02:00
Julien Fontanet
27a2853ee8 fix(vif.set): add missing param 2016-08-18 15:13:46 +02:00
Julien Fontanet
67f6b80312 fix(vif.set): do not use an arrow function 2016-08-18 15:01:13 +02:00
Julien Fontanet
016037adc1 fix(user.set): can be used by non admins 2016-08-18 14:17:07 +02:00
Julien Fontanet
70d5c1034d 5.1.6 2016-08-18 10:54:36 +02:00
Greenkeeper
ed6fb8754f chore(package): update mocha to version 3.0.2 (#376)
https://greenkeeper.io/
2016-08-18 10:53:05 +02:00
Julien Fontanet
6d08a9b11c feat(JobExecutor): a current job will only run 2 calls at a time (#382)
Fixes vatesfr/xo-web#915
2016-08-18 10:52:29 +02:00
Julien Fontanet
cf6aa7cf79 fix(package): update xen-api to 0.9.4
Again, fixes vatesfr/xo-web#1384
2016-08-18 09:42:28 +02:00
Julien Fontanet
b7f34b9da6 0.9.4 2016-08-18 09:39:28 +02:00
Julien Fontanet
f82a6efda1 feat(Xapi#_watchEvents): keep-alive, inject 1 event per minute (#45)
See vatesfr/xo-web#1384
2016-08-18 09:37:31 +02:00
Nicolas Raynaud
f869c02395 0.0.6 2016-08-17 19:20:09 +02:00
Nicolas Raynaud
43e0217008 check for out of order blocks in vhd output 2016-08-17 19:19:51 +02:00
Julien Fontanet
6c4e57aae0 chore(JobExecutor#_execCall): forEach+Array#push → mapToArray 2016-08-17 18:13:30 +02:00
Julien Fontanet
f89538c6f7 0.0.5 2016-08-17 16:50:07 +02:00
Julien Fontanet
1ee0085c22 fix: correctly export the function 2016-08-17 16:49:16 +02:00
Greenkeeper
d56590c6e6 chore(package): update nyc to version 8.0.0 (#12)
https://greenkeeper.io/
2016-08-16 23:41:08 +02:00
Julien Fontanet
d08a04959c 5.1.5 2016-08-16 19:15:52 +02:00
Julien Fontanet
2762f74ce5 fix(package): update xen-api to 0.9.3 2016-08-16 19:12:46 +02:00
Julien Fontanet
556ca71c3a 0.9.3 2016-08-16 19:02:24 +02:00
Julien Fontanet
42be2d5031 fix(Xapi#_watchEvent): timeouts are in ms 2016-08-16 19:01:49 +02:00
Julien Fontanet
6ebcf6eec5 5.1.4 2016-08-16 18:18:04 +02:00
Julien Fontanet
25b78fb7e1 fix(package): update xen-api to 0.9.2
Fixes vatesfr/xo-web#1384
2016-08-16 18:15:32 +02:00
Julien Fontanet
876e22b092 0.9.2 2016-08-16 18:09:47 +02:00
Julien Fontanet
f9f9c16cb0 feat(Xapi#_watchEvents): timeout request after 10mins (#44) 2016-08-16 18:07:44 +02:00
Julien Fontanet
f63f5d0ac6 0.0.4 2016-08-16 15:33:24 +02:00
Nicolas Raynaud
44dbbeb2a3 tests: increase timeout and fix Node 0.12 compat (#3) 2016-08-16 15:25:05 +02:00
Greenkeeper
a881090e65 chore(package): update clarify to version 2.0.0 (#37)
https://greenkeeper.io/
2016-08-16 15:09:59 +02:00
Greenkeeper
670dd2dd96 chore(package): update promise-toolbox to version 0.5.0 (#381)
https://greenkeeper.io/
2016-08-16 12:22:57 +02:00
Greenkeeper
3d9fce02a4 chore(package): update promise-toolbox to version 0.5.0 (#43)
https://greenkeeper.io/
2016-08-16 12:22:21 +02:00
Julien Fontanet
dea401fc7c 0.0.3 2016-08-15 19:02:04 +02:00
Julien Fontanet
cca21fcd32 fix(build): work with npm 3 2016-08-15 18:56:33 +02:00
Julien Fontanet
ab6b1e2c32 chore(Xapi#_transportCall): simplify and improve code
It may even fixes some issues.
2016-08-15 16:36:18 +02:00
Julien Fontanet
1baf04f786 fix(NfsHandler#_unmount): use _getRealPath() (#380)
Fixes vatesfr/xo-web#1396.
2016-08-15 14:22:19 +02:00
Greenkeeper
59d9b3c6b4 chore(package): update nyc to version 8.1.0 (#42)
https://greenkeeper.io/
2016-08-14 19:07:12 +02:00
Julien Fontanet
f7b6fcf684 Merge pull request #17 from vatesfr/greenkeeper-nyc-8.1.0
Update nyc to version 8.1.0 🚀
2016-08-14 19:07:04 +02:00
Greenkeeper
df3ec9a629 chore(package): update nyc to version 8.1.0 (#21)
https://greenkeeper.io/
2016-08-14 19:06:15 +02:00
Greenkeeper
ce05b7a041 chore(package): update nyc to version 8.1.0 (#379)
https://greenkeeper.io/
2016-08-14 19:06:00 +02:00
Greenkeeper
6bc4bf308b chore(package): update nyc to version 8.1.0 (#13)
https://greenkeeper.io/
2016-08-14 19:05:44 +02:00
greenkeeperio-bot
2ddb84f457 chore(package): update nyc to version 8.1.0
https://greenkeeper.io/
2016-08-14 10:26:33 +02:00
Olivier Lambert
6b82cc7510 fix(readme): typo 2016-08-12 17:22:28 +02:00
Nicolas Raynaud
2764f4d455 get the npm package ready for use (#2) 2016-08-12 12:02:52 +02:00
Nicolas Raynaud
28fecc428f preliminary parsing of VMDK file (#1)
* initial tests for integration of VMDK inside xo-server
2016-08-11 17:21:16 +02:00
Olivier Lambert
290cc146c8 fix(xapi): allow to unplug VBDs when VM is running 2016-08-11 16:32:06 +02:00
Olivier Lambert
db4d46a584 fix(sr): don't share a local ISO SR. Fixes vatesfr/xo-web#1389 2016-08-10 14:39:05 +02:00
Olivier Lambert
8ed2e51dde feat(network): add network.set method 2016-08-08 14:54:23 +02:00
Olivier Lambert
33702c09a6 feat(vm copy): allow snapshot copy. Related to vatesfr/xo-web#1353 2016-08-08 14:07:27 +02:00
Olivier Lambert
45aeca3753 5.1.3 2016-08-05 11:08:11 +02:00
Olivier Lambert
deae7dfb4d fix(xen-api): avoid reserved key conflicts. Fixes vatesfr/xo-web#1369 2016-08-05 11:06:58 +02:00
Julien Fontanet
8851a661c0 0.9.1 2016-08-05 10:49:08 +02:00
Julien Fontanet
2d327961da fix(objects): use $$ to avoid conflict with reserverd keys 2016-08-05 10:42:33 +02:00
Julien Fontanet
2af043ebdd chore(jshint): remove unused config file 2016-08-03 09:46:52 +02:00
Greenkeeper
ac6d14113a chore(package): update mocha to version 3.0.0 (#9)
https://greenkeeper.io/
2016-08-02 19:21:37 +02:00
Greenkeeper
398db72b44 chore(package): update mocha to version 3.0.0 (#17)
https://greenkeeper.io/
2016-08-02 19:21:01 +02:00
Olivier Lambert
32777e17c4 Initial commit 2016-08-02 16:37:00 +02:00
Julien Fontanet
a3da3299fa Merge pull request #15 from vatesfr/greenkeeper-mocha-3.0.0
Update mocha to version 3.0.0 🚀
2016-08-02 16:20:59 +02:00
Greenkeeper
3a41efbea8 chore(package): update mocha to version 3.0.0 (#40)
https://greenkeeper.io/
2016-08-02 16:20:00 +02:00
Greenkeeper
e763db7102 chore(package): update mocha to version 3.0.0 (#11)
https://greenkeeper.io/
2016-08-02 16:16:53 +02:00
Olivier Lambert
e121295735 Merge pull request #373 from nraynaud/next-release
fix (readme): fix installation documentation link
2016-08-02 12:32:05 +02:00
Nicolas Raynaud
7c1c405a64 fix installation documentation link 2016-08-02 12:22:39 +02:00
greenkeeperio-bot
2b504ce5ab chore(package): update mocha to version 3.0.0
https://greenkeeper.io/
2016-08-01 07:33:49 +02:00
Olivier Lambert
5d7c95a34d fix(xapi): typo on host disable method. Fixes vatesfr/xo-web#1351 2016-07-30 20:22:12 +02:00
Julien Fontanet
504c934fc9 fix(JobExecutor#_execCall): xo.api.call() → xo.callApiMethod() 2016-07-29 15:28:24 +02:00
Julien Fontanet
81b0223f73 fix(JobExecutor#exec): forward the error 2016-07-29 15:27:58 +02:00
Julien Fontanet
6d1e410bfd fix(JobExecutor#exec): correctly log the error 2016-07-29 15:27:32 +02:00
Julien Fontanet
26c5c6152d fix(job-executor/map): paramName handling 2016-07-29 14:37:42 +02:00
Julien Fontanet
d83bf0ebaf fix(Xo#_watchObject): check for notify() 2016-07-29 14:29:57 +02:00
Julien Fontanet
5adfe9a552 chore(index): remove debug trace 2016-07-29 13:54:54 +02:00
ABHAMON Ronan
883f461dc7 feat(job-executor): supports dynamic param vectors (#369)
See vatesfr/xo-web#837
2016-07-29 13:26:53 +02:00
Julien Fontanet
8595ebc258 feat(api): generate logs on errors
See vatesfr/xo-web#1344
2016-07-29 10:32:48 +02:00
Julien Fontanet
2bd31f4560 chore(api): remove legacy helpers 2016-07-28 15:21:59 +02:00
Julien Fontanet
6df85ecadd fix(vm.*): add missing import 2016-07-28 15:21:59 +02:00
Julien Fontanet
07829918e4 5.1.2 2016-07-28 15:21:12 +02:00
Julien Fontanet
b0d400b6eb fix(Xapi#exportDeltaVm): better handling of removed VDIs (#370)
Fixes vatesfr/xo-web#1333
2016-07-28 15:19:44 +02:00
Julien Fontanet
706cb895ad 5.1.1 2016-07-27 16:36:51 +02:00
Julien Fontanet
45bf539b3c fix(user.delete): fix tokens deletion 2016-07-27 13:23:16 +02:00
Julien Fontanet
0923981f8d fix(user.set): typo in error message 2016-07-27 13:01:32 +02:00
Julien Fontanet
b0ac14363d 5.1.0 2016-07-26 16:52:49 +02:00
Julien Fontanet
5d346aba37 fix(vm.create): cloudConfig handling 2016-07-26 14:26:24 +02:00
Julien Fontanet
124cb15ebe fix(resource sets): fix VM resources computation
Fixes vatesfr/xo-web#1276
2016-07-25 17:08:09 +02:00
Julien Fontanet
a244ab898d fix(vm.create): correctly store the resource set 2016-07-25 17:08:08 +02:00
Julien Fontanet
3c551590eb fix(vm.set): correctly save memory in limits 2016-07-25 17:08:07 +02:00
ABHAMON Ronan
10e30cccbc feat(models/schedule): null properly remove timezone (#368)
Related to vatesfr/xo-web#1314
2016-07-25 15:54:27 +02:00
Julien Fontanet
806a6b86a2 fix(signin): fix styles when /v4 2016-07-25 13:40:57 +02:00
Julien Fontanet
9719fdf5cc fix(sr.probe*): correctly prepare port param 2016-07-23 16:18:03 +02:00
Julien Fontanet
6d8764f8cb fix(Xapi#createVm): add missing param 2016-07-23 15:49:27 +02:00
Julien Fontanet
d9fd9cb408 fix(vm.create): better VBDs creation (#361)
Fixes vatesfr/xo-web#1257
2016-07-23 15:31:15 +02:00
Julien Fontanet
39a16f9a7f 0.8.0 2016-07-20 16:53:56 +02:00
Julien Fontanet
f3ea8d012f feat(Xo#refreshUser) 2016-07-20 16:53:56 +02:00
Julien Fontanet
7710ec0aba feat(schemas): add user schema 2016-07-20 12:10:23 +02:00
Julien Fontanet
c97bd78cd0 fix(VM): cpuCap & cpuWeight are integers 2016-07-20 10:57:15 +02:00
ABHAMON Ronan
728c5aa86e feat(plugins): supports predefined configurations (#365)
See vatesfr/xo-web#1289
2016-07-19 17:28:53 +02:00
Pierre Donias
83d68ca293 feat(vm.set): make cpuWeight and cpuCap nullable (#364) 2016-07-19 16:53:47 +02:00
Julien Fontanet
47d7561db4 fix(VM): cpuCap can be defined when cpuWeight is not 2016-07-19 15:37:07 +02:00
ABHAMON Ronan
7d993e8319 feat(schedules): schedules support timezones (#363)
Fixes vatesfr/xo-web#1258
2016-07-19 13:32:27 +02:00
Julien Fontanet
1d1a597b22 feat(VM): expose cpuCap 2016-07-19 11:02:38 +02:00
Julien Fontanet
23082f9300 feat(vm.set): support for cpuCap (#362) 2016-07-19 10:35:03 +02:00
Julien Fontanet
ea1a7f9376 chore(Xapi#_getXenUpdates): use ensureArray() 2016-07-15 12:57:20 +02:00
Julien Fontanet
1b9aa63096 Merge pull request #14 from vatesfr/greenkeeper-nyc-7.0.0
Update nyc to version 7.0.0 🚀
2016-07-15 11:29:20 +02:00
Greenkeeper
45b8fd0100 chore(package): update nyc to version 7.0.0 (#38)
https://greenkeeper.io/
2016-07-15 11:29:14 +02:00
Greenkeeper
11bde53069 chore(package): update nyc to version 7.0.0 (#16)
https://greenkeeper.io/
2016-07-15 11:27:31 +02:00
Greenkeeper
f115ee18c4 chore(package): update nyc to version 7.0.0 (#10)
https://greenkeeper.io/
2016-07-15 11:27:11 +02:00
Greenkeeper
162a56232c chore(package): update nyc to version 7.0.0 (#8)
https://greenkeeper.io/
2016-07-15 11:26:53 +02:00
Greenkeeper
1796c7bab8 chore(package): update nyc to version 7.0.0 (#358)
https://greenkeeper.io/
2016-07-14 13:09:12 +02:00
Greenkeeper
65ad76479a chore(package): update base64url to version 2.0.0 (#360)
https://greenkeeper.io/
2016-07-14 11:33:12 +02:00
Olivier Lambert
422db04ec8 5.0.5 2016-07-13 15:20:56 +02:00
Olivier Lambert
d12f60fe37 Merge pull request #359 from vatesfr/pierre-fix-create-vm
fix(vm/create): missing single quotes
2016-07-13 09:37:23 +02:00
Pierre Donias
194c1c991c fix(vm/create): missing single quotes 2016-07-12 16:40:32 +02:00
greenkeeperio-bot
de6f0ef8eb chore(package): update nyc to version 7.0.0
https://greenkeeper.io/
2016-07-09 09:13:32 +02:00
Olivier Lambert
3e8e2222c1 Merge pull request #357 from vatesfr/marsaudf-fix-job-log-error
Add message to job log error
2016-07-07 15:26:15 +02:00
Fabrice Marsaud
1620327a33 Add message to job log error 2016-07-07 14:55:43 +02:00
Olivier Lambert
b1131e3667 5.0.4 2016-07-07 12:12:54 +02:00
wescoeur
cd8a92c30b 0.3.0 2016-07-07 12:00:24 +02:00
wescoeur
10030c4959 Use default value on cpu/memoryFree. 2016-07-07 11:58:12 +02:00
Olivier Lambert
db0250ac08 Merge pull request #356 from vatesfr/marsaudf-fix-patch-conflicts
Fix(xapi): handle correctly single XML elements
2016-07-07 11:22:27 +02:00
Fabrice Marsaud
0a6b605760 Handle single patch elements in parsed XML 2016-07-07 10:11:21 +02:00
Olivier Lambert
81ac2375e5 5.0.3 2016-07-06 23:23:14 +02:00
Olivier Lambert
6bcaca6cd7 Merge pull request #355 from vatesfr/issue-1233
fix(Xapi#importDeltaVm): correctly handle missing network
2016-07-06 23:21:55 +02:00
Olivier Lambert
ec8375252e fix(Xapi#importDeltaVm): correctly handle missing network 2016-07-06 23:11:47 +02:00
Julien Fontanet
766aa1762f 5.0.2 2016-07-05 17:56:02 +02:00
Julien Fontanet
5165e0a54c feat(user.set): support preferences 2016-07-05 17:19:38 +02:00
Julien Fontanet
a2f7ad627e feat(Xapi#migrateVm): allow non-running VMs
Fixes vatesfr/xo-web#1216
2016-07-05 17:09:54 +02:00
Julien Fontanet
1176c162d4 5.0.1 2016-06-30 15:46:27 +02:00
Fabrice Marsaud
a4880cd017 feat(remote.test): perform a write/read test on a remote (#354)
See vatesfr/xo-web#1075
2016-06-30 15:00:00 +02:00
wescoeur
ffc155c341 0.2.1 2016-06-30 14:12:19 +02:00
wescoeur
42ea76eb2a Supports ui schema builder of xo-web. 2016-06-30 14:10:59 +02:00
Julien Fontanet
be503f1341 0.4.1 2016-06-30 10:12:30 +02:00
Julien Fontanet
6f4509c260 fix: report only on failures with xo-web 5 2016-06-30 10:12:07 +02:00
Julien Fontanet
383bdce416 fix(plugin.configure): fix undefined handling 2016-06-29 13:08:02 +02:00
Julien Fontanet
b2331084d1 0.4.0 2016-06-29 11:40:58 +02:00
Julien Fontanet
ab3a594884 chore(package): update all dependencies 2016-06-29 11:34:43 +02:00
Julien Fontanet
592adcf42e 0.1.0 2016-06-29 10:40:03 +02:00
Julien Fontanet
978c881ab7 chore(package): update all dependencies 2016-06-29 10:39:05 +02:00
Julien Fontanet
7cc300dd83 fix(Xapi#createVif): fix handling when neither device nor position is not provided 2016-06-28 17:36:24 +02:00
Fabrice Marsaud
687809db9d fix(user.set): cannot change self permission (#353) 2016-06-28 13:28:31 +02:00
Julien Fontanet
1127ec3a90 feat(vif.set): allowed IPv4/IPv6 addresses (#328) 2016-06-27 15:11:46 +02:00
Julien Fontanet
a797edfae9 chore(xapi/mixins/vm): simplify _editVm() specs 2016-06-27 12:10:57 +02:00
Julien Fontanet
938e106252 feat(xapi/utils/makeEditObject): support camelCase and snake_case aliases 2016-06-27 12:10:54 +02:00
Julien Fontanet
a0eb9caaa2 feat(xapi/utils/makeEditObject): set, set.get, set.set can be true 2016-06-27 11:54:13 +02:00
Julien Fontanet
442f53d45e fix(xapi/utils/makeEditObject): use deep equality 2016-06-27 09:52:02 +02:00
Greenkeeper
68de1ca248 chore(package): update ws to version 1.1.1 (#348)
https://greenkeeper.io/
2016-06-26 20:19:47 +02:00
Greenkeeper
e16061141e chore(package): update d3-time-format to version 2.0.0 (#350)
https://greenkeeper.io/
2016-06-26 20:18:24 +02:00
Julien Fontanet
64cbe3d209 feat(build): delete dist before building 2016-06-26 17:47:56 +02:00
Julien Fontanet
ebdc6376d8 5.0.0 2016-06-24 18:34:31 +02:00
Julien Fontanet
68335123a1 feat(vm.create): all vm.set params are supported (#340) 2016-06-24 18:33:43 +02:00
Julien Fontanet
25b18f4ef8 chore(package): update xo-acl-resolver to 0.2.1 2016-06-24 14:43:18 +02:00
Julien Fontanet
99727447ef 0.2.1 2016-06-24 14:32:25 +02:00
Julien Fontanet
e02cb56ee0 feat(VM-controller): inherits from its container 2016-06-24 14:32:16 +02:00
Julien Fontanet
9ad615b0ff fix(Xapi#_waitObjectState): fix failure when object is initially missing 2016-06-22 12:20:22 +02:00
Julien Fontanet
12eaceb032 fix(xapi-objects-to-xo): fix CPUs.number when no tools 2016-06-21 13:19:29 +02:00
Julien Fontanet
3263511b72 fix(Xapi#snapshotVm): fallback if quiesce failed
Fixes vatesfr/xo-web#1088
2016-06-21 11:21:01 +02:00
Julien Fontanet
75cae8c647 fix(Xapi#_updateObjectMapProperty): prepare XAPI param 2016-06-21 11:21:00 +02:00
Julien Fontanet
9991ef624c feat(Xapi#getObject): accept objects with _xapiId property 2016-06-21 11:21:00 +02:00
Julien Fontanet
489e9fce27 fix(xapi/index): work around Babel T2877 2016-06-21 11:21:00 +02:00
Julien Fontanet
0655628073 fix(xapi/index): incorrect import 2016-06-21 11:20:59 +02:00
Fabrice Marsaud
9460822529 feat(vm.importBackup): returns the new VM id (#345) 2016-06-20 18:07:14 +02:00
Julien Fontanet
d02358ac0d chore(xapi): move utilities into dedicated module 2016-06-17 18:43:10 +02:00
ABHAMON Ronan
366237a625 fix(XapiStats): fix unit for host free memory (#339) 2016-06-17 10:16:58 +02:00
Julien Fontanet
2f2da18994 chore: remove some unnecessary logs 2016-06-16 09:22:26 +02:00
Greenkeeper
ecd30db215 chore(package): update d3-time-format to version 1.0.0 (#338)
https://greenkeeper.io/
2016-06-15 08:40:56 +02:00
ABHAMON Ronan
1980854f6f feat(Xapi#importDeltaVm): attach VIFs to original networks if available (#335)
Fixes vatesfr/xo-web#1016
2016-06-10 11:05:54 +02:00
Julien Fontanet
7d4f006c25 feat(Xapi#exportDeltaVm): inject network/SR UUIDs in VIF/VDI records 2016-06-09 17:25:02 +02:00
Julien Fontanet
b697be2383 fix(Xapi#_snapshotVm): returns the up-to-date snapshot record 2016-06-09 17:17:14 +02:00
Fabrice Marsaud
143e53c43f chore(package): update xo-remote-parser to version 0.3.0 (#333) 2016-06-08 17:26:08 +02:00
Julien Fontanet
02f75fb2e1 0.3.0 2016-06-08 17:17:45 +02:00
Fabrice Marsaud
6cced719dc Handling a missing leading slash in nfs path 2016-06-08 17:08:54 +02:00
Fabrice Marsaud
45ec0b9b01 No more mount matters in nfs remotes + tests 2016-06-08 15:05:09 +02:00
Julien Fontanet
2451ac3ade feat(parse): local type is now file 2016-06-08 14:38:31 +02:00
Julien Fontanet
45a94fe73d feat(parse): only accepts a string 2016-06-08 14:36:10 +02:00
Julien Fontanet
6dde1ade01 fix(xo-server-logs): fix broken require since Babel 6 2016-06-08 11:12:45 +02:00
Greenkeeper
d4de391ac5 chore(package): update d3-time-format to version 0.4.0 (#332)
https://greenkeeper.io/
2016-06-08 09:05:45 +02:00
Greenkeeper
af15f4bc6a chore(package): update xo-acl-resolver to version 0.2.0 (#330)
https://greenkeeper.io/
2016-06-07 16:46:23 +02:00
Julien Fontanet
e1173e6565 0.2.0 2016-06-07 16:27:34 +02:00
Julien Fontanet
46f6911ef8 feat(README): add usage 2016-06-07 16:27:05 +02:00
Julien Fontanet
7629bf5be2 feat: simplify use for single object 2016-06-07 16:26:52 +02:00
Julien Fontanet
fb17de7988 0.2.3 2016-06-07 10:10:51 +02:00
Fabrice Marsaud
32f4d42e59 fix(parse): revert to 0.2 API (#10) 2016-06-07 10:10:20 +02:00
Fabrice Marsaud
d4ace24caa fix(job.set): protects userId from modification (#329) 2016-06-07 09:25:15 +02:00
Julien Fontanet
0031c2a9b7 0.2.2 2016-06-06 17:57:22 +02:00
Fabrice Marsaud
509e99913a fix(parse): fix tests and many issues (#9) 2016-06-06 17:56:59 +02:00
Julien Fontanet
c639cfcfd9 fix(parse): do not edit the remote object inplace 2016-06-06 17:17:57 +02:00
Julien Fontanet
b140a2ca3e chore(tests): refactor data 2016-06-06 17:17:19 +02:00
Julien Fontanet
c5ab47fa66 chore(package): fix deps order 2016-06-06 13:38:16 +02:00
Julien Fontanet
d60051b629 fix(package): update xo-remote-parser to 0.2.1 2016-06-06 13:37:47 +02:00
Julien Fontanet
aa448e7a41 0.2.1 2016-06-06 13:33:33 +02:00
Fabrice Marsaud
220750f887 fix(SMB): use of @ and : chars in passwords (#8)
Fixes #4.
2016-06-06 12:11:29 +02:00
Fabrice Marsaud
808cc5d8d0 fix: file protocol starts with 3 / (#6)
Fixes #7
2016-06-06 10:57:27 +02:00
Julien Fontanet
22ff330ee7 fix(package): update @marsaud/smb2 to 0.7.1 2016-06-03 18:22:37 +02:00
Olivier Lambert
dd62bef66d feat(host): expose correct timestamp for license expiry value 2016-05-31 17:24:49 +02:00
Julien Fontanet
e7feb99f8d feat(vm.create): clone param may be use to disable cloning (#318)
See vatesfr/xo-web#960
2016-05-30 11:34:39 +02:00
Julien Fontanet
6358accece fix(plugin.configure): correctly handle undefined 2016-05-30 11:12:11 +02:00
Olivier Lambert
9ce8a24eea feat(sr): add disconnect and connect all PBDs to a SR (#324) 2016-05-27 18:31:09 +02:00
Julien Fontanet
4d0673f489 feat(sr.forget): automatically disconnect PBDs (#323) 2016-05-27 18:15:09 +02:00
Julien Fontanet
02e1a32fae feat(README) 2016-05-27 17:03:03 +02:00
Julien Fontanet
d1690bda81 Initial commit 2016-05-27 17:00:49 +02:00
Olivier Lambert
fbe1e6a7d5 fix(vm): missing parameters and wrong value for set_memory_static_max 2016-05-27 15:03:49 +02:00
Greenkeeper
4ed02ca501 chore(package): update cookie to version 0.3.0 (#322)
https://greenkeeper.io/
2016-05-27 04:36:35 +02:00
Julien Fontanet
af245ed9fe fix(log.delete): id can be an array 2016-05-26 13:34:47 +02:00
Julien Fontanet
fc86a3e882 fix(vm): always consider memory dynamic max when updating resource set 2016-05-24 16:22:55 +02:00
Julien Fontanet
f9109edcf1 fix(vm.set): memoryMax should update resource set 2016-05-24 16:21:21 +02:00
Julien Fontanet
ec100e1a91 fix(vm.set): memoryMax should change dynamic max 2016-05-24 16:20:25 +02:00
Julien Fontanet
746c5f4a79 fix(vm.set): cpusMax (shame) 2016-05-24 15:13:53 +02:00
Julien Fontanet
b2611728a1 fix(vm): fix indent 2016-05-24 14:38:11 +02:00
Julien Fontanet
fc6cc4234d chore(vm.set): fix some comments 2016-05-24 14:33:40 +02:00
Julien Fontanet
7706c1cb63 feat(vm.set): memoryStaticMax 2016-05-24 14:33:02 +02:00
Julien Fontanet
4d7a07220c feat(vm.set): memoryMax increase static max if necessary 2016-05-24 14:32:14 +02:00
Julien Fontanet
436875f7dc fix(vm.set): memoryMin should not change static min 2016-05-24 14:30:26 +02:00
Julien Fontanet
21c6f53ecc fix(vm.set): cpusMax 2016-05-24 14:23:21 +02:00
Julien Fontanet
5472be8b72 4.17.0 2016-05-24 11:51:15 +02:00
Julien Fontanet
d22542fcf3 Revert "fix(leveldown): fix leveldown to version 1.4.4"
This reverts commit 5fa4c95480.
2016-05-24 11:50:36 +02:00
Julien Fontanet
1d8341eb27 Merge branch 'next-release' into stable 2016-05-24 11:49:47 +02:00
Julien Fontanet
1897a7ada3 fix(log.get): only usable by admins 2016-05-23 16:18:21 +02:00
Julien Fontanet
a048698c66 feat(log.*): add params schemas 2016-05-23 16:17:54 +02:00
Julien Fontanet
f891e57f4a fix(xapi-objects-to-xo): a SR should always have a container 2016-05-23 16:00:51 +02:00
Olivier Lambert
fcc590e48a feat(vm.snapshot): name param is optional (#320) 2016-05-23 12:56:20 +02:00
Julien Fontanet
9a02a2a65b fix(vm.set): fix call to $isVmRunning
Fixes #319
2016-05-23 10:02:34 +02:00
Julien Fontanet
536a6c5c60 feat(vm.rollingDrCopy): accepts a sr param (#315)
See vatesfr/xo-web#955
2016-05-21 14:24:16 +02:00
Julien Fontanet
86a6871ee8 fix(vm.set): correctly change min dynamic memory if necessary (#317)
Fixes vatesfr/xo-web#970
2016-05-21 14:14:57 +02:00
Julien Fontanet
6046045151 feat(vm.createInterface): position param is now optional 2016-05-21 13:11:51 +02:00
Julien Fontanet
9c3ddd4ba4 fix(Xapi#_createVm()): license issue with Dundee (#316)
Fixes vatesfr/xo-web#964.
2016-05-20 12:22:42 +02:00
Julien Fontanet
155f2fc36c fix(Xapi#_sessionCall): must pCatch when there is a predicate 2016-05-17 10:40:59 +02:00
Julien Fontanet
6c9f55c1d7 style(utils): fix lightSet 2016-05-17 09:08:51 +02:00
Julien Fontanet
5bec3d7dcd fix(xapi-object-to-xo): correctly set host memory size 2016-05-16 11:50:01 +02:00
Julien Fontanet
a4c309efe8 fix(package): ship signin.pug 2016-05-12 18:18:56 +02:00
Jon Sands
4e22a208dd fix(autopoweron): set pool other_config entry to true instead of on (#310)
Fixes #309 
Fixes vatesfr/xo-web#937
2016-05-12 13:17:02 +02:00
Julien Fontanet
ff9e77118e fix(Xapi): VM creation on Dundee (#303) 2016-05-11 18:03:58 +02:00
Julien Fontanet
6c6dfa9ac4 perf(Promise): use Bluebird as default implementation 2016-05-11 18:01:52 +02:00
Greenkeeper
d60d5207d8 chore(package): update xen-api to version 0.9.0 (#308)
https://greenkeeper.io/
2016-05-11 17:55:35 +02:00
Julien Fontanet
c3dc136de4 0.9.0 2016-05-11 17:44:45 +02:00
Julien Fontanet
4cbc5c4e2f fix(memory leak): due to Bluebird#cancellable()
To be fair, it may be due to an incorrect usage of
Bluebird#cancellable().

Bluebird has been completely removed at the same occasion.
2016-05-11 17:42:01 +02:00
Julien Fontanet
68820aaf59 fix(cli): add babel-polyfill dep 2016-05-11 17:40:56 +02:00
Julien Fontanet
cd65bc7683 chore: simplify _watchEvents() and _watchEventsLegacy() implementation
I finally understood ES6 Temporal Dead Zone!
2016-05-11 15:23:57 +02:00
ABHAMON Ronan
8c0ae892f5 feat(api): rename <namespace> param to id (#305) 2016-05-11 14:35:49 +02:00
Greenkeeper
f570492a11 chore(package): update xo-remote-parser to version 0.2.0 (#307)
https://greenkeeper.io/
2016-05-11 14:07:23 +02:00
Julien Fontanet
4d4a2897a5 0.7.0 2016-05-11 12:59:14 +02:00
Julien Fontanet
cd73c8f82f 0.2.0 2016-05-11 12:58:59 +02:00
Julien Fontanet
934e67d146 Document JSON syntax 2016-05-11 12:57:53 +02:00
Julien Fontanet
4c96e44b9b fix(format): use correct type for local 2016-05-11 12:49:29 +02:00
Julien Fontanet
189900549a feat(tests): basic tests for local and smb types 2016-05-11 12:49:06 +02:00
Julien Fontanet
6d18420a5d fix(tests): make them pass 2016-05-11 12:22:28 +02:00
Julien Fontanet
ab3d307393 chore(package): update all dependencies 2016-05-11 12:22:26 +02:00
ABHAMON Ronan
89b2156f61 chore(package): remove unused babel-runtime (#3) 2016-05-11 12:19:09 +02:00
ABHAMON Ronan
2f95da1892 fix(package): lodash.xxx are prod dependencies (#2) 2016-05-11 12:08:34 +02:00
Julien Fontanet
6e0956f09f feat(memory-test): split into inject-events 2016-05-11 11:30:49 +02:00
Julien Fontanet
1191f0ba93 feat(events): it's possible not to watch them 2016-05-10 15:35:43 +02:00
Julien Fontanet
6534ffea26 perf(objects): memoize () => this._pool 2016-05-10 14:55:19 +02:00
Julien Fontanet
cc447304f5 fix(bin/xo-server): remove ES6 syntax 2016-05-10 13:43:53 +02:00
Julien Fontanet
f9173c41d1 chore(package): remove unnecessary babel-runtime 2016-05-10 10:12:24 +02:00
Julien Fontanet
a2faedcacb fix(debounce): it can be changed at runtime 2016-05-09 18:40:27 +02:00
Julien Fontanet
cb56b3b9d0 chore: rewrite some code using invoke pattern 2016-05-09 18:11:14 +02:00
Julien Fontanet
a61b50548c feat: memory test 2016-05-09 18:00:09 +02:00
Julien Fontanet
75ad588e0b fix(package): clarify, source-map-support & trace are prod deps 2016-05-09 14:07:55 +02:00
Julien Fontanet
306d5d8fc7 feat(event): authenticationFailure 2016-05-06 12:33:56 +02:00
Julien Fontanet
8f8c6366e3 chore(xo-mixins/backup): use default value for remote handler flags 2016-05-05 18:22:19 +02:00
Julien Fontanet
3b13bcb098 fix(Xapi#exportDeltaVm): make streams property non-enumerable 2016-05-05 18:19:41 +02:00
Julien Fontanet
5553d5fefa Merge pull request #8 from vatesfr/greenkeeper-update-all
Update all dependencies 🌴
2016-05-04 16:21:06 +02:00
Julien Fontanet
9328518bbc chore: various updates 2016-05-04 16:14:50 +02:00
Julien Fontanet
df60784b51 chore(signin): jade renamed to pug 2016-05-04 16:00:28 +02:00
Julien Fontanet
6564edcc32 chore(package): update all dependencies (except Bluebird) 2016-05-04 15:54:04 +02:00
Julien Fontanet
75bb7d5a2d fix(prompt-schema): adapt to inquirer version 1.0.0 2016-05-04 14:48:47 +02:00
Julien Fontanet
ceab4e37cd style(prompt-schema): handle ESLint special cases 2016-05-04 14:45:01 +02:00
greenkeeperio-bot
afb6974cc0 chore(package): update dependencies
https://greenkeeper.io/
2016-05-04 14:35:22 +02:00
Julien Fontanet
bae3122bb5 chore: various updates 2016-05-04 12:16:02 +02:00
Julien Fontanet
0770aef4bf chore(package): update standard to version 7.0.0 2016-05-04 11:59:56 +02:00
ABHAMON Ronan
c198350bfa feat(remote-handlers): cannot overwrite files by default (#297) 2016-05-03 16:56:26 +02:00
Greenkeeper
a4dc965c23 chore(package): update standard to version 7.0.0 (#3)
https://greenkeeper.io/
2016-05-03 09:16:47 +02:00
Greenkeeper
8b65c280a8 chore(package): update standard to version 7.0.0 (#4)
https://greenkeeper.io/
2016-05-03 09:05:49 +02:00
Greenkeeper
a2ed388777 chore(package): update helmet to version 2.0.0 (#298)
https://greenkeeper.io/
2016-04-30 08:10:22 +02:00
Julien Fontanet
f6670c699a 4.16.1 2016-04-29 10:28:03 +02:00
Julien Fontanet
5fa4c95480 fix(leveldown): fix leveldown to version 1.4.4
Due to Level/leveldown#276.
2016-04-29 10:27:37 +02:00
Julien Fontanet
5b8608c186 feat(utils/streamToBuffer): rebase on get-stream and use everywhere (#295) 2016-04-29 09:52:36 +02:00
Julien Fontanet
bb75d42ede 4.16.0 2016-04-29 09:44:42 +02:00
Julien Fontanet
b4b6def07a Merge branch 'next-release' into stable 2016-04-29 09:43:30 +02:00
Greenkeeper
b305700987 chore(package): update get-stream to version 2.1.0 (#294)
https://greenkeeper.io/
2016-04-29 09:14:30 +02:00
Greenkeeper
40232b7eb1 chore(package): update fs-extra to version 0.30.0 (#293)
https://greenkeeper.io/
2016-04-28 18:17:34 +02:00
Julien Fontanet
67ff666db4 Use the new execa.stdout() 2016-04-28 10:18:05 +02:00
Greenkeeper
5960fd4fe0 chore(package): update fs-extra to version 0.29.0 (#292)
https://greenkeeper.io/
2016-04-28 09:04:39 +02:00
Greenkeeper
f8b28c519c chore(package): update xo-acl-resolver to version 0.1.0 (#291)
https://greenkeeper.io/
2016-04-28 08:56:31 +02:00
Greenkeeper
c46c0018ea chore(package): update nyc to version 6.4.0 (#9)
https://greenkeeper.io/
2016-04-27 22:20:32 +02:00
Julien Fontanet
4ab24d2fe5 0.1.0 2016-04-27 16:11:12 +02:00
Julien Fontanet
c70ca2ff64 style: add missing parentheses 2016-04-27 15:58:22 +02:00
Julien Fontanet
649ab26da8 feat: gracefully handle missing objects 2016-04-27 15:52:19 +02:00
Julien Fontanet
c921ea6eb7 Merge pull request #1 from vatesfr/greenkeeper-update-all
Update all dependencies 🌴
2016-04-27 15:49:02 +02:00
greenkeeperio-bot
58aed76aa3 chore(package): update dependencies
https://greenkeeper.io/
2016-04-27 15:44:41 +02:00
Julien Fontanet
e286c57ce4 Merge pull request #2 from vatesfr/v0.8.x
Refactor on top of jsonrpc-websocket-client
2016-04-27 15:26:39 +02:00
Julien Fontanet
840f0b6379 chore(package): update babel-eslint to version 6.0.4 2016-04-27 15:18:09 +02:00
Julien Fontanet
538025edd5 chore: remove irrelevant comment 2016-04-27 15:14:33 +02:00
Julien Fontanet
ee1105b6dd fix(Xapi#importVdiContent): find first attached PBD (#279) 2016-04-27 09:37:30 +02:00
Julien Fontanet
4778274c97 fix(Xapi#call): retries on TOO_MANY_PENDING_TASKS
Fixes fix vatesfr/xo-web#861
2016-04-27 09:28:36 +02:00
Julien Fontanet
d7ecb32238 Xapi#snapshotVm(): wait for the uptodate obj on quiesce. (#282)
Fixes vatesfr/xo-web#904
2016-04-27 09:24:00 +02:00
Greenkeeper
744306fc50 chore(package): update execa to version 0.4.0 (#290)
https://greenkeeper.io/
2016-04-27 09:13:16 +02:00
Olivier Lambert
11bbb8ed4d add host startTime and agentStartTime 2016-04-26 11:30:57 +02:00
Julien Fontanet
b5092a4444 feat(toTimestamp): handle timestamps. 2016-04-26 11:27:26 +02:00
Greenkeeper
e2442c07a9 https://greenkeeper.io/Fixes vatesfr/xo-web#769
https://greenkeeper.io/

Fixes vatesfr/xo-web#769.
2016-04-26 09:07:33 +02:00
Julien Fontanet
35e8dcc3be 0.8.0 2016-04-26 08:46:22 +02:00
Julien Fontanet
d1600fd058 fix: handle UUID changes (fix #5). (#7) 2016-04-26 08:46:04 +02:00
Julien Fontanet
6f924d4e83 fix(user.delete): fix vatesfr/xo-web#901. 2016-04-25 14:33:29 +02:00
Greenkeeper
faf1508914 chore(package): update execa to version 0.3.0 (#284)
https://greenkeeper.io/
2016-04-23 17:51:56 +01:00
Julien Fontanet
7eb8152835 4.15.3 2016-04-22 16:18:21 +02:00
Julien Fontanet
8f45905831 fix(vm.deltaCopy()): delete snapshot when import fails. 2016-04-22 16:18:03 +02:00
Julien Fontanet
4ba2ffce5b fix(vm.deltaCopy()): delete snapshot when import fails. 2016-04-22 13:39:21 +02:00
Julien Fontanet
1416fb0c71 Xapi#call(): only *.get_*() methods in readonly mode. 2016-04-19 16:32:18 +01:00
Julien Fontanet
2975db247d Do not attempt to fix JSON is parsing is successful. 2016-04-19 13:29:51 +01:00
Greenkeeper
ffb3659ef5 chore(package): update fs-extra to version 0.28.0 (#280)
http://greenkeeper.io/
2016-04-18 12:09:06 +01:00
Julien Fontanet
6dec07d562 signin form: fix redirect on success. 2016-04-18 11:57:58 +01:00
Julien Fontanet
afb22f3279 Merge pull request #278 from vatesfr/greenkeeper-fs-extra-0.27.0
Update fs-extra to version 0.27.0 🚀
2016-04-15 14:14:31 +02:00
greenkeeperio-bot
f2f369db64 chore(package): update fs-extra to version 0.27.0
http://greenkeeper.io/
2016-04-15 14:05:41 +02:00
Julien Fontanet
03eaa652ce Optional debounce for events. 2016-04-14 17:55:41 +02:00
Julien Fontanet
635c76db93 Deprecate host#CPUs and introduce host#cpus. 2016-04-13 10:59:29 +02:00
Julien Fontanet
5f50f1928d Merge pull request #276 from vatesfr/fix-auto-poweron
Fix auto poweron (fix vatesfr/xo-web#879).
2016-04-11 15:53:37 +02:00
Julien Fontanet
32c9ed1dc2 Fix auto poweron (fix vatesfr/xo-web#879). 2016-04-11 15:31:59 +02:00
Julien Fontanet
0536926a1f 4.15.2 2016-04-08 11:17:47 +02:00
Julien Fontanet
3959c98479 Update xo-acl-resolver to 0.0.0. 2016-04-08 11:17:26 +02:00
Julien Fontanet
1e7d1b1628 0.0.0 2016-04-08 11:05:41 +02:00
Julien Fontanet
2ce5735676 Fix ACLs in API calls (fix vatesfr/xo-web#870). 2016-04-08 11:05:17 +02:00
Julien Fontanet
defd42f74e VDI: fix fallback on VM. 2016-04-08 10:46:57 +02:00
Julien Fontanet
71741e144e Merge pull request #274 from vatesfr/abhamonr-set-vm-ram-min-max-values
api.vm: Set the min/max ram values.
2016-04-07 10:08:34 +02:00
wescoeur
f2e64cdd5e api.vm: Set the min/max ram values. 2016-04-07 09:25:45 +02:00
Julien Fontanet
afaa5d5e9e Merge pull request #275 from vatesfr/abhamonr-set-vm-cpus-max
api.vm: Set vcpus max.
2016-04-06 17:39:16 +02:00
wescoeur
d82861727d api.vm: Set vcpus max. 2016-04-06 17:32:51 +02:00
Julien Fontanet
90f0795416 Merge pull request #272 from vatesfr/abhamonr-fix-smb-backup-location
Ensure remote smb path is a directory. (fix vatesfr/xo-web#865)
2016-04-06 16:25:28 +02:00
wescoeur
aa54ab6e51 0.2.0 2016-04-06 16:01:24 +02:00
wescoeur
f0c28c74d8 Try to power on a hosts set. (Performance mode) 2016-04-06 16:00:01 +02:00
wescoeur
3e285d6131 Search destination host per pool. (Performance mode) 2016-04-06 15:24:34 +02:00
Julien Fontanet
9efbe7771c Merge pull request #273 from vatesfr/abhamonr-consistent-stats-object
vm.stats(): Returns empty stats if none can be found.
2016-04-06 12:10:34 +02:00
wescoeur
a75caac13d Vm stats are consistents. Even without RRD stats. 2016-04-06 11:55:14 +02:00
wescoeur
279d0d20ea Ensure remote smb path is a directory. (fix vatesfr/xo-web#865) 2016-04-06 09:51:20 +02:00
Julien Fontanet
332ba96d34 ghooks: use commit-msg instead of pre-commit. 2016-04-04 11:33:30 +02:00
Julien Fontanet
3f6e5b7606 decorators/@autobind: Minor improvements. 2016-04-04 11:29:31 +02:00
Julien Fontanet
94703492fd Use http-proxy for HTTP/ws proxy. 2016-03-30 17:33:50 +02:00
Julien Fontanet
df78117617 Do not crash on error in the console proxy. 2016-03-30 17:33:50 +02:00
Julien Fontanet
909b9480e4 Better error message in console proxy. 2016-03-30 17:33:49 +02:00
Julien Fontanet
21762ac1aa Return to the correct page after sign in. 2016-03-30 17:33:49 +02:00
Julien Fontanet
412bc175b4 Merge pull request #270 from vatesfr/abhamonr-stats-object-contains-interval
Stats object contains interval attr.
2016-03-30 14:49:25 +02:00
wescoeur
dc0eb76e88 Stats object contains interval attr. 2016-03-30 14:34:37 +02:00
Julien Fontanet
c96d94329e Fix using / as url. 2016-03-30 11:34:26 +02:00
Julien Fontanet
2695941a3c Remove pFinally() tests, now implemented in promise-toolbox. 2016-03-29 18:05:32 +02:00
Julien Fontanet
3506be1a70 Update promise-toolbox to 0.3.2. 2016-03-29 09:54:24 +02:00
Julien Fontanet
cbf4786b39 Do not crash on unhandled error event. 2016-03-27 13:31:31 +02:00
Julien Fontanet
8dbf334208 Merge pull request #267 from vatesfr/back-to-babel-6
Back to babel 6
2016-03-25 17:37:52 +01:00
Julien Fontanet
60ba5fbc72 Merge pull request #268 from vatesfr/abhamonr-stats-with-halted-vm
Throw an error if a vm is halted and its stats are requested.
2016-03-25 17:37:27 +01:00
Julien Fontanet
c3ace0c44f Simply do npm test before git commit. 2016-03-25 17:36:37 +01:00
Olivier Lambert
8eceb90e63 add startTime 2016-03-25 17:33:34 +01:00
wescoeur
4754e19e83 Throw an error if a vm is halted and its stats are requested. 2016-03-25 15:49:52 +01:00
wescoeur
627227f2f9 0.1.0 2016-03-24 11:48:49 +01:00
wescoeur
42cef0da88 Performance and density mode work. 2016-03-24 11:44:23 +01:00
wescoeur
06f60b7d92 Make code modular. 2016-03-24 09:46:14 +01:00
wescoeur
3ddb4d2b23 Log VM migrations (density mode). 2016-03-23 17:37:41 +01:00
wescoeur
5a825bd459 Density mode test. 2016-03-23 16:52:05 +01:00
Olivier Lambert
ab1f08f687 0.3.4 2016-03-23 10:35:41 +01:00
Pierre
2f89e3658a Backup type in report e-mail (See vatesfr/xo-web#822) 2016-03-23 10:11:01 +01:00
Julien Fontanet
a0559d0dc9 Revert "Work around Babel T7172."
This reverts commit ca8476d466.
2016-03-23 09:45:59 +01:00
Julien Fontanet
8d03ce19b0 Revert "Merge pull request #248 from vatesfr/babel-t7172"
This reverts commit f125b593bf, reversing
changes made to ca8476d466.
2016-03-23 09:43:30 +01:00
Julien Fontanet
2470d851e9 Revert "Merge pull request #266 from vatesfr/babel-5-workaround"
This reverts commit b77d3f123d, reversing
changes made to c10b0afaa8.
2016-03-23 09:41:54 +01:00
Julien Fontanet
df99f5c0a5 Revert "Merge pull request #265 from vatesfr/revert-babel-6"
This reverts commit 8907290d27, reversing
changes made to eb55cba34a.
2016-03-23 09:41:08 +01:00
Julien Fontanet
36f5084c52 4.15.1 2016-03-22 15:13:54 +01:00
Olivier Lambert
b77d3f123d Merge pull request #266 from vatesfr/babel-5-workaround
Xapi#migrateVm(): Babel 5 workaround. Fix vatesfr/xo-web/issues/831
2016-03-22 13:46:31 +01:00
Julien Fontanet
3c14405155 Xapi#migrateVm(): Babel 5 workaround. 2016-03-22 13:21:56 +01:00
Julien Fontanet
c10b0afaa8 Xapi#copyVm(): wait copy to finish before deleting snapshot. 2016-03-22 12:14:15 +01:00
Julien Fontanet
3f7a2d6bfb Xapi#copyVm(): fix snapshot deletion. 2016-03-22 12:07:35 +01:00
Julien Fontanet
f2a0d56e01 Update xen-api to 0.7.4. 2016-03-22 10:23:29 +01:00
Julien Fontanet
eac29993d3 0.7.4 2016-03-22 09:37:55 +01:00
Julien Fontanet
0736cc8414 4.15.0 2016-03-21 16:36:17 +01:00
Julien Fontanet
53240d40a0 vm.delete(): Fix :: usage in CoffeeScript. 2016-03-21 15:55:19 +01:00
Julien Fontanet
4137dd7cc8 Xo/ResourceSet#computeVmResourcesUsage(): fix access to Xo#getXapi(). 2016-03-21 15:29:41 +01:00
Julien Fontanet
8907290d27 Merge pull request #265 from vatesfr/revert-babel-6
Revert "Merge pull request #193 from vatesfr/babel-6"
2016-03-21 15:09:37 +01:00
Julien Fontanet
401dc1cb10 Revert "Minor fixes related to Babel 6."
This reverts commit a9a1472cb7.
2016-03-21 13:02:34 +01:00
Julien Fontanet
a6b5d26f56 Revert "Merge pull request #193 from vatesfr/babel-6"
This reverts commit 250b0eee28, reversing
changes made to 57ebd5bb7a.
2016-03-21 13:02:34 +01:00
Julien Fontanet
eb55cba34a Xapi#exportDeltaVm(): fix handling of empty VBDs. 2016-03-21 13:00:56 +01:00
Julien Fontanet
b0b41d984e Update @marsaud/smb2-promise to 0.2. 2016-03-21 12:38:12 +01:00
Julien Fontanet
947f64e32d SmbHandler: fix error normalization. 2016-03-18 16:54:58 +01:00
Julien Fontanet
24ccbfa9b6 Test before commit. 2016-03-18 16:40:15 +01:00
Olivier Lambert
8110acb795 removing the debug mode for Vhd merge 2016-03-18 16:30:48 +01:00
Olivier Lambert
7473aede60 Merge pull request #259 from vatesfr/abhamonr-delta-backups-with-smb
Delta backups works with samba
2016-03-18 16:28:44 +01:00
wescoeur
6f204f721b Delta backups works with samba.
Many fixes (linux paths, windows errors support...)
All options in smb handlers have a default value.
Remove the handler._remote.path usage.
...
2016-03-18 14:57:14 +01:00
Olivier Lambert
7b0e08094a Merge pull request #264 from vatesfr/abhamonr-delta-backup-with-quiesce
Delta backup works with quiesce. (fix vatesfr/xo-web#812)
2016-03-18 14:47:12 +01:00
wescoeur
322e1a75b9 Delta backup works with quiesce. (fix vatesfr/xo-web#812) 2016-03-18 10:20:49 +01:00
Olivier Lambert
f08ab729bd 0.3.3 2016-03-17 14:18:18 +01:00
Pierre
052c974369 Fixed get tag 2016-03-17 14:15:19 +01:00
Olivier Lambert
e760e868c1 0.3.2 2016-03-17 13:47:45 +01:00
Pierre
5e3831a1a4 Added tag in report e-mail 2016-03-17 12:11:49 +01:00
wescoeur
99e046ddea Performance mode: The worst host is removed of hosts array after optimization. 2016-03-17 12:11:34 +01:00
wescoeur
12e0759711 Optimize hosts in order priority. 2016-03-17 11:21:15 +01:00
wescoeur
da0c1cec22 Fix cpu average. Use the cpu number of host and vm. 2016-03-17 11:01:12 +01:00
Olivier Lambert
a0806d98a1 Merge pull request #263 from vatesfr/pierre-feedback-when-error-on-sr
`GenericXoError` to throw errors with human readable message.
2016-03-16 17:48:33 +01:00
Olivier Lambert
182897d971 Merge branch 'next-release' into pierre-feedback-when-error-on-sr 2016-03-16 17:42:32 +01:00
Pierre
f90a639fcc Minor fix. 2016-03-16 15:52:29 +01:00
Pierre
d95d7208a2 Minor fix. 2016-03-16 15:42:53 +01:00
Pierre
bbac8ffe64 Substituted all JsonRpcErrors by GenericErrors. 2016-03-16 15:34:19 +01:00
Pierre
801a649fb1 GenericXoError: Error with human readable message property. Used on PBD.unplug 2016-03-16 14:59:32 +01:00
Julien Fontanet
d23df2ab15 0.0.6 2016-03-16 14:04:14 +01:00
Julien Fontanet
dbe828097c Do not set credentials if they are undefined. 2016-03-16 14:03:28 +01:00
Julien Fontanet
48a0623ded Fix handling of ignoreUnauthorized option. 2016-03-16 14:03:01 +01:00
Olivier Lambert
7c09ceecfd Merge pull request #262 from vatesfr/pierre-network-management
PIFs and networks management (See vatesfr/xo-web#805)
2016-03-16 11:22:06 +01:00
Pierre
8c4954fb9b Camel case fixes in pif.js 2016-03-16 10:55:15 +01:00
Pierre
fbe892105b Cast. Removed unused pieces of code. Minor fixes. 2016-03-16 10:29:42 +01:00
Pierre
584e1bb847 reconfigureIp to set the IP, netmask, DNS and gateway of a PIF 2016-03-16 10:12:40 +01:00
Pierre
c437ab282e Detroy VLANs and destroy network 2016-03-16 10:12:40 +01:00
Pierre
42a100d138 Delete network 2016-03-16 10:12:40 +01:00
Pierre
65807bf35d Fixes. 2016-03-16 10:12:40 +01:00
Pierre
2995f48ede network.create instead of createNetwork for host and pool 2016-03-16 10:12:40 +01:00
Julien Fontanet
3527b86ec5 Add empty test file. 2016-03-15 16:25:46 +01:00
Julien Fontanet
fe7a9104a8 Minor package.json changes. 2016-03-15 16:13:49 +01:00
Julien Fontanet
cbfb94afcb Update deps. 2016-03-15 15:42:14 +01:00
Julien Fontanet
74d8eff6d8 Add support for JSON encoded values. 2016-03-14 10:20:15 +01:00
Julien Fontanet
d452702aef Better error messages on web server failure. 2016-03-11 23:41:51 +01:00
wescoeur
d7ed9ab64e Remove masters from toOptimize and hosts. 2016-03-11 16:48:36 +01:00
wescoeur
3b6c5898fe Plugin can use enum for modes now. 2016-03-11 15:57:29 +01:00
wescoeur
ae22adc920 Density mode in progress. 2016-03-11 15:45:23 +01:00
Julien Fontanet
f8ed9c7357 Merge pull request #260 from vatesfr/pierre-pool-networks
`createNetwork` on pool: network creation on pool.master (See vatesfr/xo-web#226)
2016-03-11 15:26:37 +01:00
wescoeur
5dacf9c3f5 The configuration object must not be modified. 2016-03-11 14:42:40 +01:00
Pierre
9143120177 network.create instead of createNetwork for host and pool 2016-03-11 11:57:12 +01:00
Pierre
fd3b1bee92 Code mutualization between host and pool. 2016-03-11 11:57:11 +01:00
Pierre
bff42954d1 createNetwork on pool: network creation on pool.master 2016-03-11 11:57:11 +01:00
wescoeur
9129bfa284 Excluded hosts in options. 2016-03-11 11:32:37 +01:00
wescoeur
96190c21d6 threshold 0 can by used with cpu. 2016-03-09 17:53:38 +01:00
Julien Fontanet
af2a9225b8 Fix invalid \t in JSON. 2016-03-09 17:41:55 +01:00
wescoeur
aa117a0ee3 Fixes hosts top optimize. 2016-03-09 17:29:57 +01:00
wescoeur
39b0ea381b Debug exec plans 2016-03-09 17:24:57 +01:00
wescoeur
021cea0b34 Thresholds are exposed in configuration. 2016-03-09 16:59:36 +01:00
wescoeur
eaad41fe55 Load balancer config use a checkbox. 2016-03-09 16:06:06 +01:00
wescoeur
e25d58d70a Fixes. 2016-03-09 15:34:57 +01:00
Julien Fontanet
6b74fd6a02 plugin.get(): Expose versions (see vatesfr/xo-web#807). 2016-03-09 14:51:34 +01:00
wescoeur
9c0967170a Schema update. 2016-03-09 12:23:02 +01:00
Julien Fontanet
0547cebfe2 Import package.json explicitely to make dependency-check happy. 2016-03-09 11:46:09 +01:00
Julien Fontanet
caefdf4300 system.getServerVersion() (see vatesfr/xo-web#807). 2016-03-09 11:37:03 +01:00
Olivier Lambert
a59df15994 Merge pull request #255 from vatesfr/olivierlambert-cifs-iso
Prepare user/pass for CIFS ISO share
2016-03-04 13:49:08 +01:00
Olivier Lambert
33304eb8d9 add type in the new SR API 2016-03-04 13:37:37 +01:00
Olivier Lambert
eb21a1bfb3 support SMB ISO SR 2016-03-04 13:37:37 +01:00
Olivier Lambert
ce0333b0a7 prepare user/pass for CIFS ISO share 2016-03-04 13:37:37 +01:00
Julien Fontanet
25a1b53a91 Prints unhandled rejection ASAP. 2016-03-04 11:46:15 +01:00
Julien Fontanet
6aba73f970 Use ::pCatch(noop) instead of .catch(noop).
Avoid hiding programmer errors.
2016-03-04 11:21:33 +01:00
Julien Fontanet
6406bb7fb6 FIXME: remote type gessing should be done in xo-remote-parser. 2016-03-03 17:32:09 +01:00
wescoeur
abd89df365 Three class: Plan, PerfomancePlan, DensityPlan. 2016-03-03 14:47:56 +01:00
Julien Fontanet
2458107903 Merge pull request #258 from vatesfr/marsaudf-fix-nfsHandler
Fix NFS remote handler.
2016-03-03 12:41:42 +01:00
Fabrice Marsaud
628f9bd9b5 Fixed findmnt call 2016-03-03 12:32:22 +01:00
Julien Fontanet
2d791571d5 Merge pull request #257 from vatesfr/julien-f-remove-unnecessary-await
Remove unnecessary `await`s.
2016-03-03 12:28:50 +01:00
Olivier Lambert
ed57127a79 Merge pull request #251 from vatesfr/host-state-unknown
New host state: Unknown.
2016-03-03 12:25:00 +01:00
Julien Fontanet
6d9bcff8e1 Remove unnecessary awaits.
- slightly improve perf
- slightly better stack traces
2016-03-03 12:24:22 +01:00
Julien Fontanet
8126cd1879 New host state: Unknown. 2016-03-03 12:15:30 +01:00
Julien Fontanet
ab34c2261c server.getAll(): fix related to xen-servers mixin. 2016-03-03 11:25:20 +01:00
wescoeur
651e4bb775 Fixes (cpus to cpu). Add Low/Critical thresholds. 2016-03-03 11:17:04 +01:00
Olivier Lambert
6953f65970 Merge pull request #256 from vatesfr/fix-vm-recoveryStart
Xapi#startVmOnCd(): fix for HVM (fix vatesfr/xo-web#794).
2016-03-03 10:10:10 +01:00
Julien Fontanet
52073e79fa Xapi#startVmOnCd(): fix for HVM (fix vatesfr/xo-web#794). 2016-03-03 10:02:09 +01:00
Julien Fontanet
8e3484bb17 Merge pull request #252 from vatesfr/better-default-https
Better defaults HTTPs config.
2016-03-02 18:04:05 +01:00
Julien Fontanet
7110da8a36 Better defaults HTTPs config. 2016-03-02 17:12:32 +01:00
wescoeur
7f06d6e68c Low threshold are automatically computed. 2016-03-02 16:56:59 +01:00
Julien Fontanet
7ffd6ded51 Merge pull request #250 from vatesfr/pierre-licenses
Host and pool licenses (Fix vatesfr/xo-web#763)
2016-03-02 16:12:04 +01:00
Julien Fontanet
5e04547ecf Merge pull request #249 from vatesfr/recompute-resource-sets-limits
resourceSet.recomputeAllLimits()
2016-03-02 15:43:40 +01:00
Julien Fontanet
7cbe5f64ce Fix Xo#getXapi(). 2016-03-02 15:41:27 +01:00
Julien Fontanet
47ed78031a Xo#getAllXenServers(). 2016-03-02 15:23:32 +01:00
Pierre
fd3d24b834 getLicenseState 2016-03-02 15:15:10 +01:00
Pierre
c2f607b452 license_params and license_servers in XO host object 2016-03-02 15:15:09 +01:00
Julien Fontanet
b1328bb6e2 resourceSet.recomputeAllLimits() 2016-03-02 15:09:16 +01:00
Julien Fontanet
2a02583e27 Fix Xo#getXapi() with identifier. 2016-03-02 13:48:33 +01:00
Julien Fontanet
cfb49f9136 Merge pull request #247 from vatesfr/too-many-storage-migrates
Xapi#migrateVm(): handle TOO_MANY_STORAGE_MIGRATES (fix vatesfr/xo-we…
2016-03-02 12:47:00 +01:00
Julien Fontanet
5f20091f24 Xapi#migrateVm(): handle TOO_MANY_STORAGE_MIGRATES (fix vatesfr/xo-web#783).
When this error occurs, simply wait 10 seconds and retry.
2016-03-02 12:45:25 +01:00
wescoeur
e5146f7def Many fixes. Cron Job is in a job structure. 2016-03-02 12:16:30 +01:00
Julien Fontanet
a37b8e35a1 utils: isInteger(). 2016-03-02 11:30:23 +01:00
wescoeur
d9bf7c7d12 Many fixes. Configure must operate if cron job is running. 2016-03-02 11:20:28 +01:00
Julien Fontanet
84c980c3ea utils: isObject(). 2016-03-02 11:07:13 +01:00
Julien Fontanet
5823057b41 utils: isArray(), isBoolean(), isFunction() & isString(). 2016-03-02 11:02:42 +01:00
Julien Fontanet
024a9b1763 Merge pull request #246 from vatesfr/xo-mixins-2
Xo mixins 2
2016-03-02 10:50:17 +01:00
Julien Fontanet
0425780cd3 vm.create(): fix setting name/description for disks (vatesfr/xo-web#774). 2016-03-02 10:49:15 +01:00
Julien Fontanet
20734dc7f3 Move authorization to a new mixin. 2016-03-02 10:38:06 +01:00
Julien Fontanet
0574c58f16 Move ACLs management to a new mixin. 2016-03-02 10:38:06 +01:00
Julien Fontanet
31e3117190 Move Xen servers management to a new mixin. 2016-03-02 10:38:06 +01:00
wescoeur
b0bf18e235 Debug messages. 2016-03-02 10:36:43 +01:00
Julien Fontanet
f780ba2c5a vm.create(): fix updating existing disks (vatesfr/xo-web#774). 2016-03-02 10:34:44 +01:00
wescoeur
f001b2c68f Unstable, plugin can migrate vm. (to test) 2016-03-02 10:24:56 +01:00
Olivier Lambert
f125b593bf Merge pull request #248 from vatesfr/babel-t7172
Work around Babel T7172 (second attempt).
2016-03-02 10:22:47 +01:00
Julien Fontanet
baee4e185d Work around Babel T7172 (second attempt). 2016-03-02 10:14:50 +01:00
Julien Fontanet
ca8476d466 Work around Babel T7172. 2016-03-02 10:04:12 +01:00
Julien Fontanet
a24de7fe3f Fix type case in README. 2016-02-29 18:02:30 +01:00
Julien Fontanet
757bf82a78 Merge branch 'stable' into next-release 2016-02-29 09:31:12 +01:00
Olivier Lambert
644887f727 4.14.4 2016-02-28 17:20:17 +01:00
Olivier Lambert
563b643461 Fix NFS mount issues for Linux target 2016-02-28 17:20:02 +01:00
wescoeur
296141ad3d Unsable: _computeOptimizations 2016-02-26 16:42:11 +01:00
wescoeur
7abba0a69b Many fixes. Compute real cpu usage of vms. 2016-02-26 15:28:00 +01:00
Julien Fontanet
0e4a6fd2e1 Merge pull request #245 from vatesfr/pierre-cpu-weight-in-resource-set
vm.set(): only admins can change cpuWeight if VM in a resource set
2016-02-26 12:29:31 +01:00
Pierre
d452bf1f1c vm.set(): only admins can change cpuWeight if VM in a resource set 2016-02-26 12:22:40 +01:00
wescoeur
dee7767427 Get only the vms stats of the worst host. 2016-02-26 11:57:41 +01:00
Julien Fontanet
126828a813 http-request: another work around for the Babel issue 2016-02-26 11:26:02 +01:00
Julien Fontanet
03dc6fb73a http-request: work around Babel issue. 2016-02-26 11:16:43 +01:00
wescoeur
087a71367d Optimizations only on one host ! 2016-02-26 11:07:22 +01:00
Julien Fontanet
3653e89714 Merge branch 'stable' into next-release 2016-02-26 10:23:51 +01:00
Julien Fontanet
318dd14e42 4.14.3 2016-02-26 10:23:27 +01:00
Julien Fontanet
2d13844b5d Disable npm {pre,post}version magic for now. 2016-02-26 10:23:20 +01:00
wescoeur
bec2e3b4a0 getVms & getVmsStats functions. 2016-02-26 10:20:15 +01:00
Julien Fontanet
b777b7432a Merge pull request #244 from vatesfr/olivierlambert-nfs-fix
Add v3 parameter for NFS. Fix vatesfr/xo-web/issues/771
2016-02-26 10:12:24 +01:00
Olivier Lambert
6f91c225c2 Add v3 parameter for NFS. Fix vatesfr/xo-web/issues/771 2016-02-26 10:06:18 +01:00
wescoeur
274884ef4d Reorder exceeded hosts by priority. 2016-02-25 16:06:46 +01:00
wescoeur
d3f52cdd1a Compute exceeded hosts. 2016-02-25 13:10:27 +01:00
Julien Fontanet
c355e9ca4a Xo/subjects: fix access to Xo private props (fix #755). 2016-02-25 11:36:52 +01:00
Julien Fontanet
4514ea8123 Minor fixes related to promise-toolbox. 2016-02-24 18:22:18 +01:00
Julien Fontanet
a9a1472cb7 Minor fixes related to Babel 6. 2016-02-24 18:22:00 +01:00
Julien Fontanet
250b0eee28 Merge pull request #193 from vatesfr/babel-6
Upgrade to Babel 6.
2016-02-24 16:18:36 +01:00
Julien Fontanet
5cd7527937 Upgrade to Babel 6. 2016-02-24 16:11:35 +01:00
Julien Fontanet
57ebd5bb7a Merge pull request #242 from vatesfr/use-promise-toolbox
Use promise-toolbox.
2016-02-24 16:11:13 +01:00
wescoeur
cb97e37c15 Get stats for host. 2016-02-24 15:27:11 +01:00
Julien Fontanet
c18a697d6b Use promise-toolbox. 2016-02-24 15:17:11 +01:00
Julien Fontanet
ad40b72508 4.14.2 2016-02-24 13:51:49 +01:00
Julien Fontanet
3a72e5910d Add preversion/postversion scripts. 2016-02-24 13:50:47 +01:00
Julien Fontanet
8f3eb65a05 Various fixes. 2016-02-24 13:34:12 +01:00
wescoeur
3013fa86b6 Configure implem. 2016-02-24 12:50:03 +01:00
wescoeur
2593743746 Json schema (prototype). 2016-02-24 10:53:48 +01:00
Julien Fontanet
700cd83ff5 4.14.1 2016-02-24 10:34:10 +01:00
Julien Fontanet
0c27881eaf vm.create(): register up-to-date VM object (fix vatesfr/xo-web#749 2016-02-24 10:21:53 +01:00
wescoeur
ab6bd56006 Initial commit. 2016-02-24 10:05:20 +01:00
Julien Fontanet
f7fdc6acd2 4.14.0 2016-02-23 19:10:57 +01:00
Julien Fontanet
2c5f844edc Merge pull request #229 from vatesfr/resource-sets
Resource sets
2016-02-23 19:03:34 +01:00
Julien Fontanet
a253de43c5 vm.create(): correctly handle updating SR on existing disks. 2016-02-23 18:57:00 +01:00
Julien Fontanet
dbaf67a986 vm.set(): correctly count limits for CPUs. 2016-02-23 18:03:54 +01:00
Julien Fontanet
5175d06e37 vm.create(): handle limits on template disks. 2016-02-23 17:53:41 +01:00
Julien Fontanet
651a27b558 resource set: limit.available cannot be > limit.total. 2016-02-23 17:16:13 +01:00
Julien Fontanet
fd41f8def6 vm.delete(): correctly free resource set limits. 2016-02-23 17:12:19 +01:00
Julien Fontanet
208ea04fd5 resourceSet.set(): better handling of limits. 2016-02-23 15:20:20 +01:00
Julien Fontanet
5ee83a1af9 Merge pull request #241 from vatesfr/a-schedule-links-a-function
Scheduler is now in scheduling.js and use ScheduleFn function.
2016-02-23 15:06:55 +01:00
wescoeur
901c7704f4 Scheduler is now in scheduling.js and use ScheduleFn function. 2016-02-23 15:01:30 +01:00
Julien Fontanet
c6f7290f92 resourceSet.{create,set}(): limits are optional. 2016-02-23 13:11:40 +01:00
Julien Fontanet
5368eda98b vm.set(): works with resource sets. 2016-02-23 13:06:36 +01:00
Julien Fontanet
7b9be209c8 resourceSet: initial limits. 2016-02-23 10:33:50 +01:00
Julien Fontanet
cee05fea7c Some permission fixes fro vm.*(). 2016-02-22 19:23:32 +01:00
Julien Fontanet
b87acb47e2 Lots of TODOs in vm.*(). 2016-02-22 18:44:18 +01:00
Julien Fontanet
cb192bf9ea vm.convertToTemplate(): require pool admin permission. 2016-02-22 18:30:28 +01:00
Julien Fontanet
e02b8522d6 0.0.5 2016-02-22 16:03:54 +01:00
Julien Fontanet
8cf74c88ce Add ignoreUnauthorized option. 2016-02-22 16:03:33 +01:00
Julien Fontanet
4095d6dcf6 0.3.1 2016-02-22 15:45:51 +01:00
Julien Fontanet
cd4221e4f2 0.3.0 2016-02-22 15:44:38 +01:00
Julien Fontanet
e4e65e4576 0.0.4 2016-02-22 15:42:05 +01:00
Julien Fontanet
72e93786df Log errors. 2016-02-22 15:41:03 +01:00
Julien Fontanet
16351ba7f3 Merge pull request #236 from vatesfr/abhamonr-vhd-util-without-binary
Remove dependency on vhd-util for VHD merging
2016-02-22 14:02:40 +01:00
wescoeur
96ba128942 Remove vhd-util dependency. Merging vhd works with a node script. (fix vatesfr/xo-web#646) 2016-02-22 13:59:33 +01:00
Julien Fontanet
76c8d4af25 API: fix various permissions. 2016-02-19 16:37:27 +01:00
Julien Fontanet
3ea2b3cc00 vm.createCloudInitConfigDrive(): disable permission check on SR. 2016-02-19 16:37:27 +01:00
Julien Fontanet
0df0936022 resourceSet: fix getAll() and checkConstraints(). 2016-02-19 16:37:27 +01:00
Julien Fontanet
4fc11a7fd3 resourceSet.{add,remove}Subject(): minor fixes. 2016-02-19 16:37:27 +01:00
Julien Fontanet
8c509271a6 resourceSet.getAll(): code has been refactored around streamToArray(). 2016-02-19 16:37:27 +01:00
Julien Fontanet
67d5b63ef9 vm.create(): works with resource sets. 2016-02-19 16:37:27 +01:00
Julien Fontanet
4f999511a6 resourceSet.getAll(): code has been refactored around lightSet(). 2016-02-19 16:37:27 +01:00
Julien Fontanet
cfbf239175 resourceSet.getAll(): works also for non-admins. 2016-02-19 16:37:27 +01:00
Julien Fontanet
1aedf9bb07 resourceSet: fix deletion. 2016-02-19 16:37:27 +01:00
Julien Fontanet
c2d4423720 Fix: start event instead of starting. 2016-02-19 16:37:27 +01:00
Julien Fontanet
c2f7a2620c api: fix access to private Xo properties. 2016-02-19 16:37:27 +01:00
Julien Fontanet
6f0cda34b4 Xo/Subjects: Fix admin user creation. 2016-02-19 16:37:27 +01:00
Julien Fontanet
1a472fdf1f Xo: subjects managements moved into new mixin. 2016-02-19 16:37:27 +01:00
Julien Fontanet
0551f61228 Resource sets: use store. 2016-02-19 16:37:27 +01:00
Julien Fontanet
b900adfddd Promisify store. 2016-02-19 16:37:27 +01:00
Julien Fontanet
0e339daef5 Typo. 2016-02-19 16:37:27 +01:00
Julien Fontanet
5f5733e8b9 Various fixes and additions to resourceSet API. 2016-02-19 16:37:27 +01:00
Julien Fontanet
1372050a7b LevelDbLogger: avoid increments in keys when not necessary. 2016-02-19 16:37:27 +01:00
Julien Fontanet
1960951c5e Initial resource sets. 2016-02-19 16:37:27 +01:00
Julien Fontanet
bc070407c7 generate-indexes: rewritten in Node
- cross-platform
- properly camel-cases identifiers
2016-02-19 16:37:27 +01:00
Julien Fontanet
0172ee0b6b Remove unused import. 2016-02-19 16:37:27 +01:00
Julien Fontanet
2953bc6bb8 loggers: LevelDbLogger now inherits from AbstractLogger. 2016-02-19 16:37:27 +01:00
Julien Fontanet
c0ed3a9e3c Xo#getStore(namespace). 2016-02-19 16:37:27 +01:00
Julien Fontanet
5456e4fe75 Merge branch 'stable' into next-release 2016-02-19 16:36:59 +01:00
Julien Fontanet
548754821e Merge pull request #8 from vatesfr/conditional-reporting
Implement conditional reporting.
2016-02-19 10:32:17 +01:00
Danp2
77f85579e3 Implement conditional reporting. 2016-02-19 10:23:48 +01:00
Julien Fontanet
867a1e960e Merge pull request #240 from vatesfr/stream-to-array
util: streamToArray(Stream, filter?: Predicate) => Promise.
2016-02-18 17:02:25 +01:00
Julien Fontanet
48dc68c3fe util: streamToArray(Stream, filter?: Predicate) => Promise. 2016-02-18 16:58:17 +01:00
Julien Fontanet
2c719f326b Xapi: lodash.pick() → lodash.pickBy(). 2016-02-18 15:45:28 +01:00
Julien Fontanet
201f92eb93 system.getMethodsInfo(): Fix breakage due to upgrade to Lodash v4. 2016-02-18 15:39:08 +01:00
Julien Fontanet
46f055b216 Merge pull request #137 from vatesfr/abhamonr-job-schema
Add: Job and crossProduct schemas.
2016-02-17 10:29:40 +01:00
Julien Fontanet
08305e679b http-proxy: agent is now the default export. 2016-02-17 09:53:00 +01:00
Julien Fontanet
e9e0b70199 Merge pull request #238 from bartekrutkowski/next-release
Correct the redis protocol in sample config.
2016-02-16 16:49:50 +01:00
Bartek Rutkowski
441d784027 Correct the redis protocol in sample config
The existing sample configuration file documents the Redis uri string with 'tcp://' prefix string, while xo-server actually expects it to be 'redis://' instead.
2016-02-16 15:47:21 +00:00
Julien Fontanet
558956bf55 Merge pull request #237 from vatesfr/http-proxy
HTTP proxy support (fix vatesfr/xo-web#737).
2016-02-16 15:57:29 +01:00
Julien Fontanet
0d8250a3ac HTTP proxy support (fix vatesfr/xo-web#737). 2016-02-16 15:50:28 +01:00
Julien Fontanet
dc1f5826f8 Lodash 4 iteration: no thisArg argument. 2016-02-16 15:50:10 +01:00
Julien Fontanet
06fb06829b Update lodash.* deps. 2016-02-16 11:53:53 +01:00
Julien Fontanet
bbf52d2611 Update deps. 2016-02-16 11:53:22 +01:00
Julien Fontanet
f55a6617e9 Remove graceful-fs: not used directly by xo-server. 2016-02-16 11:48:52 +01:00
Pierre
e3ec03794a Markdown generator first version 2016-02-12 14:29:51 +01:00
Julien Fontanet
05c325d686 Fetch the correct VM even when the param is vm and not id (fix #3). 2016-02-12 09:09:39 +01:00
Julien Fontanet
3bd273fbdd Merge pull request #235 from vatesfr/abhamonr-avoid-merge-delta-delta
Avoid merge between two delta vdi backups. (fix vatesfr/xo-web#702)
2016-02-11 17:32:28 +01:00
thehanatos
cf9472eb56 changes 2016-02-11 16:53:28 +01:00
wescoeur
1b64a543f1 Avoid merge between two delta vdi backups. (fix vatesfr/xo-web#702) 2016-02-11 16:42:50 +01:00
Pierre
bb2085436e Network usage stats 2016-02-11 16:20:04 +01:00
Pierre
d882a4249a Standardized function declarations 2016-02-11 11:38:18 +01:00
thehanatos
a2420e4288 changes 2016-02-11 11:21:43 +01:00
Pierre
3687a230e1 promise-toolbox: all to resolve promises in object 2016-02-10 12:27:55 +01:00
Pierre
c274486057 Improved getHostVmsStats (Promise.all) 2016-02-10 12:13:26 +01:00
Pierre
94e9bbfd63 VM stats for multiple hosts with generateHostsVmsReport.
Renamed generateHostVmReport.
2016-02-10 11:40:21 +01:00
Julien Fontanet
adb71ad174 FIx my previous commit -_-". 2016-02-10 11:06:47 +01:00
Julien Fontanet
4a95f5cd9d Coding style. 2016-02-10 10:48:02 +01:00
Julien Fontanet
f3b368fae4 Merge pull request #2 from Danp2/Danp2-deltacopy
Enable reporting on additional backup types.
2016-02-10 10:45:54 +01:00
Julien Fontanet
20919a8a39 Absence of tests should not prevent CI linting. 2016-02-10 10:31:30 +01:00
Danp2
f2e86efc4d Update index.js 2016-02-09 21:22:17 -06:00
Danp2
98b27d647e Add logic for processing delta copy backup types 2016-02-09 21:10:00 -06:00
Julien Fontanet
97b07f7d42 The main bug tracker is xo-web. 2016-02-08 15:34:13 +01:00
Pierre
7a884d1f87 getPoolVmStats returns an object with VM IDs as keys instead of an array 2016-02-05 16:42:00 +01:00
Pierre
d21f5f427c getPoolVmStats to get all the VMs stats from a specific pool 2016-02-05 15:01:55 +01:00
Olivier Lambert
ebb472b8f6 4.13.2 2016-02-05 13:01:49 +01:00
Olivier Lambert
1a2ef6479e Merge pull request #232 from vatesfr/fix-xapi-updateObjectMapProperty
Xapi#_updateObjectMapProperty(): fix major issue.
2016-02-05 13:00:58 +01:00
Olivier Lambert
876c63fe80 4.13.1 2016-02-05 13:00:02 +01:00
Julien Fontanet
32236962f5 Xapi#_updateObjectMapProperty(): fix major issue. 2016-02-05 12:53:39 +01:00
Pierre
9ba2a6628d generateGlobalCpuReport: average CPU usage for each host 2016-02-05 10:59:56 +01:00
Julien Fontanet
ba66af922f 4.13.0 2016-02-04 19:43:43 +01:00
Julien Fontanet
739641b857 0.0.3 2016-02-04 18:12:31 +01:00
Julien Fontanet
d02a110f99 Minor comment. 2016-02-04 18:12:16 +01:00
Julien Fontanet
28b9bbe54f 4.13.0-0 2016-02-04 18:01:04 +01:00
Julien Fontanet
bf6bd7cbdc Merge pull request #230 from vatesfr/pierre-vm-migration-details
Fix intra-pool migration on different SRs
2016-02-04 17:30:14 +01:00
Pierre
ddcb2468a6 Minor fixes 2016-02-04 17:26:27 +01:00
Pierre
f048b58935 Fix intra-pool migration on different SRs 2016-02-04 17:17:09 +01:00
Julien Fontanet
09f6200c2e Merge pull request #209 from vatesfr/abhamonr-checksum-verification-delta-backup
Create and verify checksums for VDI delta backups
2016-02-04 16:12:54 +01:00
wescoeur
354692fb06 Add checksum verification for delta backup on restore/merge. (fix vatesfr/xo-web#617) 2016-02-04 15:22:14 +01:00
Julien Fontanet
2c5858c2e0 Merge pull request #228 from vatesfr/pierre-vm-migration-details
Fix default migration
2016-02-04 15:18:31 +01:00
Pierre
1f41fd0436 Better handle of undefined maps 2016-02-04 11:36:04 +01:00
Pierre
e0bbefdfae Fix default migration 2016-02-04 11:02:43 +01:00
Julien Fontanet
bc6fbb2797 Xo#registerPlugin(): log errors. 2016-02-04 10:32:36 +01:00
Julien Fontanet
b579cf8128 Merge pull request #227 from vatesfr/https-redirect
Can redirect to HTTPs (fix vatesfr/xo-web#626).
2016-02-04 09:55:12 +01:00
Julien Fontanet
a94ed014b7 sample config: add redirectToHttps. 2016-02-04 09:52:37 +01:00
thehanatos
9120db2dc6 get n values max 2016-02-04 09:49:14 +01:00
Julien Fontanet
0db991b668 Can redirect to HTTPs. 2016-02-03 17:39:39 +01:00
Julien Fontanet
347ced6942 Merge pull request #214 from vatesfr/better-https
Better https (fix vatesfr/xo-web#685)
2016-02-03 14:32:25 +01:00
Olivier Lambert
5d7a775b2b Merge pull request #225 from vatesfr/xo-acl-resolver
Use xo-acl-resolver.
2016-02-03 14:29:31 +01:00
Julien Fontanet
df732ab4bf Merge pull request #216 from vatesfr/vdi-snapshot-type
VDI-snapshot type
2016-02-03 14:14:42 +01:00
Fabrice Marsaud
31cd3953d6 Fixing VM object properties 2016-02-03 13:56:15 +01:00
Julien Fontanet
4666b13892 Use xo-acl-resolver. 2016-02-03 11:47:02 +01:00
Julien Fontanet
bf586d0837 0.0.0-0 2016-02-03 11:41:01 +01:00
Julien Fontanet
37d7ddb4b0 Merge pull request #224 from vatesfr/pierre-vm-migration-details
Custom VM migration (See vatesfr/xo-web#567)
2016-02-03 11:39:53 +01:00
Julien Fontanet
ed45a9b156 VDI-snapshot inherits from its VDI. 2016-02-03 11:35:48 +01:00
Fabrice Marsaud
3abbaeb44b resolving VDI snapshots 2016-02-03 10:38:09 +01:00
Julien Fontanet
f4ea39b602 Initial commit. 2016-02-03 10:02:39 +01:00
Fabrice Marsaud
847ea49042 VDI-snapshot type 2016-02-03 09:57:42 +01:00
Julien Fontanet
779068c2ee HTTP security: use Helmet. 2016-02-02 20:49:33 +01:00
Julien Fontanet
140cd6882d Allows full TLS config. 2016-02-02 20:45:06 +01:00
Julien Fontanet
a6dca12bad user and password config entries are optional (fix #2). 2016-02-02 16:49:45 +01:00
Julien Fontanet
e40411ef91 Use live stats. 2016-02-02 11:13:27 +01:00
thehanatos
fd20c21243 granularity added 2016-02-02 10:55:32 +01:00
Julien Fontanet
2e295c2391 Merge pull request #213 from vatesfr/fix-cpu-weight
Fixed cpuWeight removal for default
2016-02-02 10:24:32 +01:00
Julien Fontanet
5c0474ef96 Various updates. 2016-02-02 10:23:20 +01:00
Julien Fontanet
73d1de75f9 Fix computeMin() and computeMax(). 2016-02-02 10:23:11 +01:00
Fabrice Marsaud
596b0995f4 Prepare object values for xapi 2016-02-02 10:11:39 +01:00
thehanatos
8ea6989ea4 max, min and mean in the same function 2016-02-02 10:02:15 +01:00
Fabrice Marsaud
b61fe97893 Fixed cpuWeight removal for default 2016-02-02 09:55:40 +01:00
Julien Fontanet
209aa2ebe6 Add a TODO. 2016-02-01 17:14:05 +01:00
Julien Fontanet
c03a0e857e Merge pull request #188 from vatesfr/olivierlambert-cpu-weight
Ability to set vCPU weight
2016-02-01 16:00:21 +01:00
Olivier Lambert
2854d698e6 Implement vCPU weight 2016-02-01 15:56:36 +01:00
Pierre
944163be0e Bug fix: VDIs should be on chosen SRs. 2016-01-29 10:07:02 +01:00
Julien Fontanet
269a9eaff0 Xapi: small but important fix concerning imports. 2016-01-28 17:22:44 +01:00
Olivier Lambert
7f9c49cbc4 Merge pull request #208 from vatesfr/pierre-vm-migration-details
Custom VM migration. (See vatesfr/xo-web#567)
2016-01-28 17:02:28 +01:00
Julien Fontanet
2b6bfeeb15 Merge pull request #212 from vatesfr/contrep-better-snapshot-names
continous replication: clearer VM snapshot names.
2016-01-28 16:05:03 +01:00
Julien Fontanet
fa9742bc92 continous replication: clearer VM snapshot names. 2016-01-28 15:57:25 +01:00
Pierre
472e419abc Using forEach instead of for. Minor fixes. 2016-01-28 13:33:43 +01:00
Pierre
169d11387b Custom VM migration (See vatesfr/xo-web#567)
Optional parameters for migratePool:
- Migration network
- Map each VDI to an SR on destination host
- Map each VIF to a network on destination host
2016-01-28 13:33:43 +01:00
Julien Fontanet
e59ac6d947 Fixes regarding #660. 2016-01-28 11:42:06 +01:00
Olivier Lambert
e193b45562 Merge pull request #207 from vatesfr/abhamonr-avoid-metadata-imp-exp-delta-backups
Avoid metadata import/export in delta backups. (fix vatesfr/xo-web#651)
2016-01-28 11:35:04 +01:00
wescoeur
1ac34f810e Avoid metadata import/export in delta backups. (fix vatesfr/xo-web#651) 2016-01-28 11:12:21 +01:00
Olivier Lambert
e65e5c6e5f Merge pull request #211 from vatesfr/marsaudf-clear-logs#661
Marsaudf clear logs#661
2016-01-28 10:59:37 +01:00
Julien Fontanet
16a9f44d4d Xapi#getObject(): behave nicely when a XAPI object is passed. 2016-01-28 10:08:26 +01:00
Fabrice Marsaud
af6365c76a logger.delete 2016-01-28 09:00:15 +01:00
Julien Fontanet
8c672b23b5 Merge pull request #159 from vatesfr/marsaudf-smb-mounts#338
Remotes refactoring + SMB implementation.
2016-01-27 11:24:52 +01:00
Fabrice Marsaud
3b53f5ac11 fixes 2016-01-27 10:58:16 +01:00
Fabrice Marsaud
ccdc744748 fixes 2016-01-27 10:08:59 +01:00
Fabrice Marsaud
261f0b4bf0 typo fix 2016-01-27 09:11:45 +01:00
Fabrice Marsaud
495b59c2e5 update dependency 2016-01-26 17:34:00 +01:00
Fabrice Marsaud
f26fc9a0f0 0.1.0 2016-01-26 17:32:49 +01:00
Fabrice Marsaud
3fd637b3c7 method rename 2016-01-26 17:32:35 +01:00
Fabrice Marsaud
d6e1c13c39 Handler and remotes reworked 2016-01-26 17:28:27 +01:00
Fabrice Marsaud
ea605383d5 Various info 2016-01-26 16:08:40 +01:00
Fabrice Marsaud
a4fa670dc5 Initial commit 2016-01-26 16:01:03 +01:00
Julien Fontanet
56f99b2129 Implement a more generic method. 2016-01-26 15:38:03 +01:00
thehanatos
ccb508705b Fonctions computemin and computemax added 2016-01-26 15:06:53 +01:00
Julien Fontanet
6f8fa96150 Mutualize code into functions. 2016-01-26 14:22:35 +01:00
thehanatos
72e1632499 Method to get min, max average values (cpu) 2016-01-26 11:39:39 +01:00
Fabrice Marsaud
f7f13b9e07 PR feedback 2 2016-01-26 09:47:47 +01:00
Fabrice Marsaud
62564d747f Errors moved from API to core 2016-01-25 17:29:18 +01:00
Fabrice Marsaud
1d5d59c4c0 Remote handler reworked 2016-01-25 17:01:14 +01:00
Fabrice Marsaud
e8380b8a12 PR feedback 2016-01-25 11:45:53 +01:00
Fabrice Marsaud
c304d9cc62 No vdi merge through smb 2016-01-25 11:45:53 +01:00
Fabrice Marsaud
aad4ebf287 Remote handlers refactored, and adding a smb handler 2016-01-25 11:45:53 +01:00
Julien Fontanet
7d7cc56527 0.8.0-1 2016-01-22 17:47:41 +01:00
Julien Fontanet
85d0271b86 Xo#call(method, args).retry(predicate) 2016-01-22 17:47:35 +01:00
Julien Fontanet
749d5e22bb Update jsonrpc-websocket-client to 0.0.1-4. 2016-01-22 17:46:38 +01:00
Olivier Lambert
6c2f48181c Merge pull request #210 from vatesfr/handle-objects-conflicts
Properly handle multiple XAPI objects with the same XO id.
2016-01-22 16:02:19 +01:00
Julien Fontanet
480b6ff7d6 Properly handle multiple XAPI objects with the same XO id.
When there is a conflict, the existing object keep the place but when
it is removed, the other object (which is in the waiting list) will
take the new place.
2016-01-22 15:57:44 +01:00
Julien Fontanet
4bdd6f972c Remove node-inspector. 2016-01-21 16:44:42 +01:00
Julien Fontanet
61c61adea1 Minor code dedup. 2016-01-21 15:42:34 +01:00
Olivier Lambert
6674d8456a Merge pull request #206 from vatesfr/olivierlambert-fixMigration
Correctly use destination host SR and network
2016-01-20 18:31:33 +01:00
Olivier Lambert
d1478ff694 select the correct migration network 2016-01-20 18:12:37 +01:00
Julien Fontanet
cb20d46b74 Merge pull request #205 from vatesfr/abhamonr-fix-avoid-errors-delta-backups
Delta backups: Fix various issues.
2016-01-20 17:36:33 +01:00
Olivier Lambert
9dd2538043 correctly use destination host SR and network 2016-01-20 17:26:47 +01:00
wescoeur
f25136a512 Avoid errors in delta backups. (fix)
- Wait the task end of vdi export.
- Now, in the error case of vdi backup,
  the current vdi snapshot is removed with catch(noop).
2016-01-20 17:19:41 +01:00
Julien Fontanet
03eb56ad2a Xapi#_updateObjectMapProperty(): do no hide remove errors. 2016-01-20 16:04:23 +01:00
Julien Fontanet
2508840701 4.12.1 2016-01-19 12:49:37 +01:00
Julien Fontanet
6e098f5a4f Merge pull request #203 from vatesfr/fix-scheduling
Scheduler: properly use Xo#runJobSequense() (fix vatesfr/xo-web#657).
2016-01-19 12:45:36 +01:00
Julien Fontanet
31b33406fd Scheduler: properly use Xo#runJobSequense() (fix vatesfr/xo-web#657). 2016-01-19 12:12:29 +01:00
Julien Fontanet
7ab7c763ed startup: ignore non existent paths in plugins lookup. 2016-01-19 11:49:07 +01:00
Julien Fontanet
06258e757a 4.12.0 2016-01-18 10:25:41 +01:00
Julien Fontanet
5919b43a21 @mixin(): compatibility with Node 0.12 (fix #202). 2016-01-18 10:18:02 +01:00
Julien Fontanet
7d4b9521e7 Merge pull request #199 from vatesfr/continuous-replication
Continuous VM replication.
2016-01-17 23:51:29 +01:00
Julien Fontanet
f9d2fd7997 Xapi: Ugly hack seems to be working. 2016-01-17 23:28:45 +01:00
Julien Fontanet
bdbc20c3c6 Xapi: fix private put() when length is known. 2016-01-17 21:05:18 +01:00
Julien Fontanet
69d6d03714 Better debugs in Xapi. 2016-01-17 21:03:19 +01:00
Julien Fontanet
f40e1e55b0 Xapi#importVdiContent(): revert to use Promise.all() instead of Promise.race(). 2016-01-17 12:52:41 +01:00
Julien Fontanet
b9082ed838 Xapi#deleteVm(): Correctly remove VDIs with more than one VBD on the same VM. 2016-01-17 12:52:04 +01:00
Julien Fontanet
4edfefa9a2 Homogenise task names. 2016-01-17 12:52:04 +01:00
Julien Fontanet
0f98ee5407 Xapi#importVdiContent(): better task name. 2016-01-17 12:50:44 +01:00
Julien Fontanet
7fdf119873 Temporarily disable the ugly put hack. 2016-01-17 12:50:44 +01:00
Julien Fontanet
3c054e6ea1 Various changes. 2016-01-17 12:50:42 +01:00
Julien Fontanet
98899ece72 Use $ to prefix injected params names. 2016-01-17 12:49:23 +01:00
Julien Fontanet
2061a006d0 Xapi#createDeltaVdi(): correctly set the source of cloned VDI. 2016-01-17 12:49:23 +01:00
Julien Fontanet
5496c2d7fd Various fixes. 2016-01-17 12:49:22 +01:00
Julien Fontanet
d6b862a4a9 Xapi#_createVif(): Various fixes. 2016-01-17 12:49:22 +01:00
Julien Fontanet
d581f8a852 Xapi#importDeltaVm(): explicit error when base VDI is not found. 2016-01-17 12:49:22 +01:00
Julien Fontanet
3a593ee35a Xapi#_createVm(): clearer type handling. 2016-01-17 12:49:22 +01:00
Julien Fontanet
415d34fdaa Xo#copyDeltaVm(): Cancel exports on failures. 2016-01-17 12:49:22 +01:00
Julien Fontanet
7d28191bb5 Xapi#exportDeltaVm(): full export if the base is not found. 2016-01-17 12:49:20 +01:00
Julien Fontanet
e2c7693370 Xapi#importVdiContent(): do not wait for connection closure. 2016-01-17 12:48:38 +01:00
Julien Fontanet
f17ff02f4d Continuous replication: do not rely on metadata import/export. 2016-01-17 12:48:35 +01:00
Julien Fontanet
225043e01d Properly identify last snapshot as future base. 2016-01-16 19:34:35 +01:00
Julien Fontanet
56f78349f8 Xen expects keys(other_config) to be snake or it will change them itself! 2016-01-16 19:34:35 +01:00
Julien Fontanet
8839d4f55a Delete exportDeltaVm() snapshot on failure. 2016-01-16 19:34:34 +01:00
Julien Fontanet
2562aec1d2 Missing space in utils.pDebug(). 2016-01-16 19:34:34 +01:00
Julien Fontanet
db2361be84 Fix createVbd(). 2016-01-16 19:34:34 +01:00
Julien Fontanet
d08fcbfef3 Various fixes. 2016-01-16 19:34:29 +01:00
Julien Fontanet
7601b93e65 Various fixes. 2016-01-16 19:19:51 +01:00
Julien Fontanet
1103ec40e0 Xapi#importDeltaVm(): clean after failure. 2016-01-16 19:19:51 +01:00
Julien Fontanet
af32c7e3db Properly exports vm.deltaCopy(). 2016-01-16 19:19:51 +01:00
Julien Fontanet
170918eb3b Initial continuous replication. 2016-01-16 19:19:51 +01:00
Julien Fontanet
a91e615a8d @deferrable.onSuccess() 2016-01-16 19:19:51 +01:00
Julien Fontanet
cc92c26fe3 Xapi#_importVdiContent() 2016-01-16 19:19:46 +01:00
Julien Fontanet
937135db32 Xapi#_exportVdi() 2016-01-16 18:57:15 +01:00
Julien Fontanet
01366558b4 Xapi#_deleteVbd() 2016-01-16 18:57:15 +01:00
Julien Fontanet
b0dbd54ea4 Xapi#_disconnectVbd() 2016-01-16 18:57:15 +01:00
Julien Fontanet
f113915307 Xapi#_updateObjectMapProperty() can remove a property. 2016-01-16 18:57:15 +01:00
Julien Fontanet
0a3c3d9bb1 Xapi#remoteCopyVm() falls back on local copy if possible. 2016-01-16 18:50:09 +01:00
Julien Fontanet
ba2e005c3e Merge pull request #201 from vatesfr/custom-http-request
Custom HTTP request implementation instead of got.
2016-01-16 18:31:21 +01:00
Julien Fontanet
b9ea52d65f Add missing space in forbidden operations description. 2016-01-16 18:27:23 +01:00
Julien Fontanet
f1e328d333 Better error handling in patch unzipping. 2016-01-16 18:13:13 +01:00
Julien Fontanet
23f1965398 Custom HTTP request implementation instead of got. 2016-01-16 18:13:04 +01:00
Olivier Lambert
fc82f185cb Merge pull request #200 from vatesfr/abhamonr-forever-forward-incremental-backup-fix
Old vdi bases must be removed at the backup end.
2016-01-15 14:31:04 +01:00
wescoeur
56b25f373f Old vdi bases must be removed at the backup end. 2016-01-15 14:20:11 +01:00
Olivier Lambert
1ac6add122 Merge pull request #196 from vatesfr/abhamonr-forever-forward-incremental-backup
Forever forward incremental backup (fix vatesfr/xo-web#576)
2016-01-15 14:13:02 +01:00
wescoeur
91b1a903f9 Fix rejected backup. 2016-01-15 13:48:15 +01:00
wescoeur
a8d6654ef5 Forever forward incremental backup (fix vatesfr/xo-web#576) 2016-01-15 13:12:05 +01:00
Olivier Lambert
63093b1be6 Merge pull request #198 from vatesfr/abhamonr-vbd-set-bootable-fix-getxapi
vbd.setBootable use xo.getXapi() instead of xo.getXAPI()
2016-01-14 16:28:16 +01:00
wescoeur
60abe8f37e vbd.setBootable use xo.getXapi() instead of xo.getXAPI() 2016-01-14 16:22:16 +01:00
Olivier Lambert
7ba3909aa1 Merge pull request #175 from vatesfr/abhamonr-button-bootable-disk
Add vbd.setBootable api call.
2016-01-14 16:04:30 +01:00
Julien Fontanet
eecdba2d05 Merge pull request #197 from vatesfr/deferrable-decorator
deferrable() decorator.
2016-01-14 14:33:20 +01:00
Julien Fontanet
7bdc005aa7 @deferrable() works with async functions. 2016-01-14 14:24:09 +01:00
Julien Fontanet
d46703fdc4 Cosmetic changes in decorators spec. 2016-01-14 11:58:18 +01:00
Julien Fontanet
e4aa85f603 Cosmetic changes in decorators. 2016-01-14 11:58:18 +01:00
Julien Fontanet
233124ef50 deferrable.onFailure() 2016-01-14 11:58:11 +01:00
Julien Fontanet
36a3012de2 deferrable() decorator. 2016-01-14 11:16:51 +01:00
Olivier Lambert
2b4ee96ed7 Fix issue vatesfr/xo-web/issues/643 2016-01-13 18:55:35 +01:00
Julien Fontanet
85a2afd55c Add --safe-mode which do not registers plugins. 2016-01-13 15:53:55 +01:00
Julien Fontanet
6cd0d8456a Fix plugins (broken by Xo split). 2016-01-13 15:22:14 +01:00
Julien Fontanet
7750a0a773 Integrate api/xo-mixins indexes to the build. 2016-01-13 15:21:03 +01:00
Julien Fontanet
a5364b9257 Camel case: Xo#getXAPI() → Xo#getXapi(). 2016-01-13 14:39:40 +01:00
Julien Fontanet
e0e7b1406d Fix backups listing (broken by Xo split). 2016-01-13 12:12:40 +01:00
Julien Fontanet
38b67a0002 Merge pull request #192 from vatesfr/mixins
Split Xo with mixins.
2016-01-13 11:47:49 +01:00
Julien Fontanet
18dd4f8a52 Print start/stop errors. 2016-01-13 11:40:52 +01:00
Julien Fontanet
879f9b4ea9 Remove listeners after start/stop. 2016-01-13 11:40:51 +01:00
Julien Fontanet
3db0dda67a Fix a race condition in the scheduler. 2016-01-13 11:40:51 +01:00
Julien Fontanet
ed9ee15b90 Expose Xo#scheduler. 2016-01-13 11:40:51 +01:00
Julien Fontanet
44ff85e8e9 Rename Xo {start,stop}{,ing} events. 2016-01-13 11:40:51 +01:00
Julien Fontanet
cb07e9ba11 Split Xo with mixins. 2016-01-13 11:40:48 +01:00
Julien Fontanet
bfe05ce5fc Merge pull request #184 from vatesfr/abhamonr-disable-vm-start-during-delta-import
Disable vm start during delta import and explicit notification.
2016-01-13 11:25:56 +01:00
wescoeur
64ee23cec0 Disable vm start during delta import and explicit notification. (fix vatesfr/xo-web#613) 2016-01-13 11:20:58 +01:00
Julien Fontanet
c022d3c4a4 Merge pull request #182 from vatesfr/abhamonr-properly-remove-vdi-backups
Only delete VDI exports when VM backup is successful.
2016-01-13 10:38:15 +01:00
wescoeur
69c764301f Only delete VDI exports when VM backup is successful (fix vatesfr/xo-web#644). 2016-01-13 10:33:44 +01:00
Julien Fontanet
2f777daef6 Merge pull request #168 from vatesfr/cleaner-xo-stop
xo-server should properly stops on SIGINT/SIGTERM.
2016-01-12 17:38:30 +01:00
Julien Fontanet
a10bf7330e xo-server should properly stops on SIGINT/SIGTERM. 2016-01-12 17:33:32 +01:00
Julien Fontanet
782bb5967d Update level-party to 3.0.4. 2016-01-12 15:17:15 +01:00
Olivier Lambert
aeb2f55f0d Merge pull request #191 from vatesfr/prevent-concurrent-schedule-runs
A schedule cannot have concurrent runs (fix vatesfr/xo-web#642).
2016-01-11 14:43:24 +01:00
Julien Fontanet
ae68749b1b A schedule cannot have concurrent runs (fix vatesfr/xo-web#642). 2016-01-11 14:00:52 +01:00
Julien Fontanet
a3c25d56a0 Update deps. 2016-01-08 18:39:59 +01:00
Julien Fontanet
c8a6fd19a7 0.8.0-0 2016-01-07 18:04:52 +01:00
Julien Fontanet
0b143b580a Various updates. 2016-01-07 18:01:11 +01:00
Julien Fontanet
d2b9cc8df9 Merge pull request #189 from vatesfr/olivierlambert-change-name-during-import
Change VM name during VM delta import. Fix vatesfr/xo-web/issues/641
2016-01-07 14:08:45 +01:00
Olivier Lambert
2027daa75c Change name during VM delta import. Fix vatesfr/xo-web/issues/641 2016-01-07 14:02:53 +01:00
Julien Fontanet
f3493a08bd Api#addMethod() returns a remover function. 2016-01-05 18:16:04 +01:00
Julien Fontanet
ed69fedc0a Initial commit. 2016-01-05 18:13:43 +01:00
Julien Fontanet
8098464f58 Initial commit. 2016-01-05 18:13:43 +01:00
Julien Fontanet
ea0db57388 0.6.0 2016-01-05 18:03:58 +01:00
Julien Fontanet
6fcc148105 0.7.3 2016-01-05 16:09:19 +01:00
Julien Fontanet
3485cb4ec4 Guard against null/undefined error.res. 2016-01-05 16:09:06 +01:00
Julien Fontanet
f3963269ae Initialize FAT buffer with null bytes. 2016-01-04 14:43:49 +01:00
Julien Fontanet
ae2212c245 Merge pull request #183 from vatesfr/pierre-delete-running-vm
Delete not halted VMs. (vatesfr/xo-web/issues/616)
2015-12-31 09:48:37 +01:00
Julien Fontanet
3a19ac4c93 Merge pull request #187 from vatesfr/olivierlambert-vif-deletion
VIF delete typo. Fix issue vatesfr/xo-web/issues/632
2015-12-30 20:01:49 +01:00
Olivier Lambert
666f546cf0 VIF delete typo. Fix issue vatesfr/xo-web/issues/632 2015-12-30 19:57:48 +01:00
Julien Fontanet
e6ef6ccccf 0.5.1 2015-12-30 19:16:05 +01:00
Julien Fontanet
4826e14cad Log bind failures. 2015-12-30 19:15:58 +01:00
Julien Fontanet
5515f90147 README updates. 2015-12-30 19:12:24 +01:00
Julien Fontanet
2193c26acb 0.5.0 2015-12-30 19:03:13 +01:00
Julien Fontanet
1974a2c0e4 Use my Vates email. 2015-12-30 19:01:41 +01:00
Julien Fontanet
84fbe9ee06 Do not depend on Bluebird. 2015-12-30 19:00:32 +01:00
Julien Fontanet
b8e2cfc47f CLI for testing. 2015-12-30 17:46:21 +01:00
Julien Fontanet
464f57d7da Merge pull request #186 from vatesfr/olivierlambert-custom-templates
add 'install_repository' support for vatesfr/xo-web/issues/627
2015-12-30 17:21:12 +01:00
Olivier Lambert
2a192f33a1 add 'install_repository' support for vatesfr/xo-web/issues/627 2015-12-30 17:12:26 +01:00
Julien Fontanet
553fc6f5d9 0.7.4 2015-12-30 12:01:12 +01:00
Julien Fontanet
f5d790b264 Do not automatically retry on connection errors! 2015-12-30 12:00:58 +01:00
Julien Fontanet
9ca2674261 Make unhandled rejected promises visible on exit. 2015-12-29 10:39:26 +01:00
Julien Fontanet
641e13496e Return null instead of throwing when no matches. 2015-12-28 10:18:47 +01:00
Julien Fontanet
a6e18819d4 Use arrow funcs where possible. 2015-12-28 10:18:21 +01:00
Julien Fontanet
faf5ff6aa4 Reading certs is now async. 2015-12-28 10:11:17 +01:00
Julien Fontanet
ae20ca5558 Update deps. 2015-12-28 09:20:11 +01:00
Julien Fontanet
22bd87c965 Update ldapjs to 1.0. 2015-12-28 09:20:11 +01:00
Julien Fontanet
2129645f39 Babel 6. 2015-12-28 09:20:11 +01:00
Julien Fontanet
93a07b6207 Typo. 2015-12-28 09:20:09 +01:00
Julien Fontanet
24bc91dc0c Minor optimizations. 2015-12-23 13:57:29 +01:00
Julien Fontanet
cf2d5b502f Do not remove VDIs attached to other VMs. 2015-12-22 16:27:34 +01:00
Julien Fontanet
61450ef602 Typo. 2015-12-22 16:24:50 +01:00
Julien Fontanet
78f1d1738e Properly ignore snapshot deletion failures after export. 2015-12-22 16:24:00 +01:00
Pierre
9f595cf5f7 Delete not halted VMs. (See vatesfr/xo-web#616) 2015-12-22 15:45:13 +01:00
Julien Fontanet
25b8e49975 4.11.0 2015-12-22 13:35:24 +01:00
Julien Fontanet
d40086cd13 Merge branch 'next-release' into stable 2015-12-22 13:34:57 +01:00
Olivier Lambert
8f9d8d93b9 Merge pull request #181 from vatesfr/fix-vbd-state-after-metadata-import
Fix vbd state after metadata import
2015-12-22 12:23:38 +01:00
Julien Fontanet
1080c10004 Call VM.power_state_reset after a metadata import (fix vatesfr/xo-web#615). 2015-12-22 12:18:02 +01:00
Julien Fontanet
866aeca220 Revert "Snapshots running VM for metadata export (see vatesfr/xo-web#615)."
This reverts commit 121b3afc61.

It is not possible to export metadata of a snapshot.
2015-12-22 11:41:04 +01:00
Julien Fontanet
121b3afc61 Snapshots running VM for metadata export (see vatesfr/xo-web#615). 2015-12-22 11:26:03 +01:00
Julien Fontanet
e8406b04b4 Merge pull request #180 from vatesfr/fix-memory-issue-importVmBackup
Fix memory issue on Xo#importVmBackup().
2015-12-21 19:46:06 +01:00
Julien Fontanet
8e7fe81806 Disable async traces for now (fix vatesfr/xo-web#608). 2015-12-21 19:20:48 +01:00
Olivier Lambert
852807b5d7 Merge pull request #178 from vatesfr/abhamonr-incremental-backups-integration
Some corrections for integration.
2015-12-21 19:05:57 +01:00
Olivier Lambert
9928d47fa2 PR comment review 2015-12-21 19:00:36 +01:00
wescoeur
412a1bd62a Some corrections for delta integration in xo-web.
- List delta backups in subfolders.
- Fix unhandled exception. (ENOENT)
- ...
2015-12-21 17:48:34 +01:00
Julien Fontanet
b290520951 vm.import() accepts a SR id. 2015-12-21 11:13:42 +01:00
Olivier Lambert
dde677b6d3 do NOT backup a CD drive 2015-12-18 21:45:03 +01:00
Julien Fontanet
75030847bd Merge pull request #177 from vatesfr/abhamonr-fix-remote-importVm
The vm import call use a sr instead of a host.
2015-12-18 17:23:48 +01:00
wescoeur
e7b9cb76bc The vm import call use a sr instead of a host. 2015-12-18 17:18:39 +01:00
Olivier Lambert
e96c4c0dd3 restore accidently removed code 2015-12-18 16:56:25 +01:00
Julien Fontanet
b553b3fa50 Merge pull request #176 from vatesfr/olivierlambert-xenstorefix
Fix undefined xenstore_data sent to XAPI
2015-12-18 16:06:50 +01:00
Olivier Lambert
c6fb924b8f Fix undefined xenstore_data sent to XAPI 2015-12-18 16:00:06 +01:00
Julien Fontanet
b13844c4a6 Merge pull request #170 from vatesfr/pierre-read-only-connection
Connection to a Xen Server in read-only mode. (Fix vatesfr/xo-web#439)
2015-12-18 12:09:34 +01:00
Pierre
ab6c83a3fc Connection to a Xen Server in read-only mode. (Fix vatesfr/xo-web#439)
`updateXenServer` applies changes in database and also changes the connection's read-only status if the client is connected to this server.
2015-12-18 11:59:54 +01:00
Julien Fontanet
b2a51bd658 0.7.2 2015-12-18 11:29:08 +01:00
Julien Fontanet
e5ab1dc154 Fix opaque ref detection in arrays. 2015-12-18 11:28:58 +01:00
Julien Fontanet
7e0a97973f Merge pull request #163 from vatesfr/abhamonr-incremental-backups
Implement rolling delta VM backup and import. (vatesfr/xo-web#494)
2015-12-18 11:24:31 +01:00
Julien Fontanet
6274969635 0.7.1 2015-12-18 11:23:29 +01:00
Julien Fontanet
069c430346 Fix opaque ref detection. 2015-12-18 11:23:24 +01:00
wescoeur
6a8a79bba5 Implement rolling delta VM backup and import. (vatesfr/xo-web#494) 2015-12-18 11:20:13 +01:00
wescoeur
4a0c58c50a Add vbd.setBootable api call. (fix vatesfr/xo-web/#583) 2015-12-17 17:07:35 +01:00
Julien Fontanet
cbcc4dd21d 0.7.0 2015-12-17 16:33:55 +01:00
Julien Fontanet
eb0c963332 Coding style. 2015-12-17 16:21:25 +01:00
Julien Fontanet
023fe82932 Merge pull request #150 from vatesfr/olivierlambert-configdrive
Generic CloudConfig Drive
2015-12-16 18:19:51 +01:00
Julien Fontanet
2e1a06c7bf Generic Cloud Config drive. Fix vatesfr/xo-web/issues/549 2015-12-16 18:12:47 +01:00
Julien Fontanet
8b6961d40c VDI.resize{,_online} expect a string contrary to what the doc says. 2015-12-16 16:33:55 +01:00
Julien Fontanet
53351877da Fix typo: size → parseSize. 2015-12-16 15:48:33 +01:00
Julien Fontanet
522445894e Always parse sizes. 2015-12-16 15:36:01 +01:00
Julien Fontanet
550351bb16 Merge pull request #174 from vatesfr/abhamonr-import-vdi-content
Import VDI content is implemented.
2015-12-16 15:06:32 +01:00
wescoeur
328adbb56f Import VDI content is implemented. 2015-12-16 14:59:53 +01:00
Julien Fontanet
b4cdf4d277 Minor optimizations. 2015-12-16 14:19:30 +01:00
Julien Fontanet
716d7bfcf6 Optimize opaque refs detection. 2015-12-16 14:15:37 +01:00
Julien Fontanet
b45a169a2f Read only mode can be altered after initial construction. 2015-12-16 13:58:33 +01:00
Julien Fontanet
44a36bbba3 Use human-format v6 (much nicer with incorrect casing). 2015-12-16 13:17:07 +01:00
Julien Fontanet
4cc4adeda6 disk.{create,resize}() accept integers for size. 2015-12-16 11:34:46 +01:00
Julien Fontanet
c14e6f2a63 disk.resize() accepts human readable size. 2015-12-16 11:34:46 +01:00
Julien Fontanet
cfcb2d54d8 Merge pull request #172 from vatesfr/olivierlambert-vdimove
Allow offline VDI moving. Fix vatesfr/xo-web#591
2015-12-16 10:46:33 +01:00
Julien Fontanet
010d60e504 Coding style. 2015-12-16 09:46:39 +01:00
Julien Fontanet
eabde07ff6 Remove incorrect export. 2015-12-16 09:46:39 +01:00
Olivier Lambert
be19ad5f2a Allow offline VDI moving. Fix https://github.com/vatesfr/xo-web/issues/591 2015-12-15 19:07:20 +01:00
Julien Fontanet
d1d0816961 Merge pull request #171 from vatesfr/olivierlambert-existingdisks
allow edition of existing disks during VM creation
2015-12-15 17:56:38 +01:00
Olivier Lambert
7be7170504 allow edition of existing disks during VM creation 2015-12-15 17:51:03 +01:00
Julien Fontanet
478272f515 Merge pull request #167 from vatesfr/remoteCopyVm-set-nameLabel-asap
Xapi#remoteCopyVm() sets name label ASAP.
2015-12-15 13:49:13 +01:00
Julien Fontanet
09af6958c8 Xapi#remoteCopyVm() sets name label ASAP. 2015-12-15 11:35:03 +01:00
Julien Fontanet
adb3a2b64e Merge pull request #169 from vatesfr/olivierlambert-vdiresize
Clean VDI resize support
2015-12-14 17:09:12 +01:00
Olivier Lambert
1ee7e842dc Clean VDI resize support 2015-12-14 17:05:59 +01:00
Julien Fontanet
b080a57406 Merge pull request #162 from vatesfr/pierre-aborting-vm-export-cancels-operation
VM-export interruption properly transferred to Xen
2015-12-11 18:18:05 +01:00
Julien Fontanet
7c017e345a Minor updates. 2015-12-11 18:02:41 +01:00
Pierre
4b91343155 VM-export interruption properly transferred to Xen. (Fix vatesfr/xo-web#490)
When the connection with the client is lost, the export task is cancelled and the connection is closed.
As the task is over, the snapshot used for the export is deleted.

Cancelling the task is useless as it is cancelled by Xen
2015-12-11 18:02:41 +01:00
Julien Fontanet
02a3df8ad0 Merge pull request #164 from vatesfr/olivierlambert-import-metadata
Support VM metadata import. Fix vatesfr/xo-web#579
2015-12-11 17:01:47 +01:00
Olivier Lambert
6a7080f4ee Support VM metadata import. Fix vatesfr/xo-web#579 2015-12-11 16:56:56 +01:00
Julien Fontanet
4547042577 Fix issue in utils.createRawObject(). 2015-12-10 14:06:22 +01:00
Julien Fontanet
0e39eea7f8 Always use noop from utils. 2015-12-10 14:06:22 +01:00
Olivier Lambert
1e5aefea63 Merge pull request #161 from vatesfr/olivierlambert-set-default-sr
Set default sr
2015-12-10 12:14:27 +01:00
Olivier Lambert
02c4f333b0 minor fixes 2015-12-10 12:08:30 +01:00
Olivier Lambert
1e8fc4020b Add setDefaultSr, fix #572 2015-12-10 11:01:05 +01:00
Olivier Lambert
f969701ac1 Merge pull request #155 from vatesfr/pierre-plugins-autodiscovery
Installed plugins are detected even if the config file does not show …
2015-12-09 20:41:46 +01:00
Olivier Lambert
b236243857 Merge pull request #160 from vatesfr/marsaudf-no-backup-if-unmounted
Rolling backup fails immediatly if remote is disabled. Fix https://github.com/vatesfr/xo-web/issues/561
2015-12-09 19:13:01 +01:00
Fabrice Marsaud
39edc64922 Rolling backup fails immediatly if remote is disabled 2015-12-09 17:18:50 +01:00
Pierre
f22ece403f Installed plugins are automatically detected when the server starts. They are no more loaded from the config file.
Plugins (ie installed modules of which names start with `xo-server-`) are automatically detected and registered from `${__dirname}/node_modules/` and `/usr/local/lib/node_modules/`.
2015-12-09 16:56:48 +01:00
Julien Fontanet
f5423bb314 Merge pull request #158 from vatesfr/olivierlambert-recoveryStart
Generic recovery start (PV or HVM)
2015-12-07 18:11:03 +01:00
Julien Fontanet
b1e5945ebe Xapi#startVm() and Xapi#startVmOnCd() (fix vatesfr/xo-web#563). 2015-12-07 18:02:55 +01:00
Julien Fontanet
d98a457271 0.0.2 2015-12-03 16:34:23 +01:00
Julien Fontanet
ef3a0d881f Add empty file to make Travis not fail. 2015-12-03 16:34:13 +01:00
Julien Fontanet
669a9e5cc3 Merge pull request #1 from Phlogi/patch-1
Fix required field, changed from pass to password
2015-12-03 16:32:31 +01:00
Phlogi
5eb58ae6cc Fix required field, changed from pass to password
this one was missed on 7af5964f13
2015-12-03 16:29:26 +01:00
wescoeur
7fa1923400 0.1.1 2015-12-03 16:24:14 +01:00
wescoeur
4c165bd620 Package is not private. 2015-12-03 16:24:05 +01:00
wescoeur
7c04a455b4 0.1.0 2015-12-03 16:22:16 +01:00
ABHAMON Ronan
06b6061518 Update README.md 2015-12-03 16:19:49 +01:00
wescoeur
3821ee3dcd Update package.json description. 2015-12-03 16:11:58 +01:00
Julien Fontanet
76b5be8171 Revert "Freeze config object before configuring plugin."
This reverts commit 789f51bd2a.

The change introduced issues with nodemailer used in xo-server-transport-email.
2015-12-03 16:00:32 +01:00
wescoeur
03a33646d6 0.2.1 2015-12-03 15:54:24 +01:00
wescoeur
791183553e Update README 2015-12-03 15:53:19 +01:00
wescoeur
de6ef49043 0.2.0 2015-12-03 15:43:35 +01:00
Julien Fontanet
804bca2041 Merge pull request #148 from vatesfr/abhamonr-purge-plugin-config
The plugins configurations can be cleaned.
2015-12-03 14:37:32 +01:00
Julien Fontanet
720b9ef999 0.6.9 2015-12-03 12:40:31 +01:00
Julien Fontanet
9b9e4dddfc Gracefully fails if error.res does not exists. 2015-12-03 12:39:59 +01:00
Julien Fontanet
10602b47b4 4.10.2 2015-12-03 12:20:48 +01:00
Julien Fontanet
8d7c522596 Merge pull request #154 from vatesfr/julienf-fix-patches-for-6.1
Fix patches handling for XenServer 6.1.
2015-12-03 12:20:05 +01:00
Julien Fontanet
3ac455c5a7 Fix patches handling for XenServer 6.1. 2015-12-03 12:16:56 +01:00
Julien Fontanet
2b19a459df Merge pull request #152 from vatesfr/julienf-handle-xapiToXo-failures
Handle XAPI to XO objects failures.
2015-12-03 12:15:29 +01:00
Julien Fontanet
41ba2d9bf6 Properly schedule retry for the next loop. 2015-12-03 12:10:29 +01:00
Julien Fontanet
a7b5eb69d3 Handle XAPI to XO objects failures. 2015-12-03 11:13:00 +01:00
Julien Fontanet
67c209bb5e Properly handle the case where the pool object is not here yet. 2015-12-03 10:27:23 +01:00
Julien Fontanet
a6d436d9ea 4.10.1 2015-12-02 17:45:30 +01:00
Julien Fontanet
652c784e13 Update xen-api to 0.6.8 (fix vatesfr/xo-web#552). 2015-12-02 17:41:32 +01:00
Julien Fontanet
7434e0352f 0.6.8 2015-12-02 17:37:28 +01:00
Julien Fontanet
26d61af902 Fall back to legacy events on server failure (work around #2). 2015-12-02 17:36:29 +01:00
Julien Fontanet
5bd12c5f9e Fix XML-RPC error display. 2015-12-02 17:31:13 +01:00
Julien Fontanet
e07fae4290 Revert to Babel 5 for now. 2015-12-02 17:30:42 +01:00
wescoeur
a0a3b7a158 The plugins configurations can be cleaned. 2015-12-02 16:15:23 +01:00
wescoeur
28bf7ee90b Update schema with titles/descriptions on mails/xmpp attributes. 2015-12-02 15:47:33 +01:00
wescoeur
4d1ca7ede4 Merge remote-tracking branch 'refs/remotes/origin/master' 2015-12-02 15:42:27 +01:00
wescoeur
f3b46515c5 Update for Xmpp support 2015-12-02 15:40:40 +01:00
wescoeur
0aa5e7ba63 Use {...conf} instead of conf (Frozen object) 2015-12-02 15:39:47 +01:00
wescoeur
8d8bf43b46 to parameter is now an array of xmpp address 2015-12-02 15:27:51 +01:00
Julien Fontanet
789f51bd2a Freeze config object before configuring plugin. 2015-12-02 15:20:38 +01:00
wescoeur
9983407c8b Make the client in load. 2015-12-02 15:00:38 +01:00
wescoeur
2471ad4215 Plugin works with few options 2015-12-02 14:33:50 +01:00
wescoeur
f266982560 Use node-xmpp-client for the transport protocol 2015-12-02 10:46:24 +01:00
Julien Fontanet
c059a416f7 0.1.1 2015-12-01 15:54:42 +01:00
Olivier Lambert
82dc0c0593 Update README.md 2015-12-01 14:43:17 +01:00
Olivier Lambert
5faad3db92 Update the documentation 2015-11-30 19:15:01 +01:00
Olivier Lambert
099db6792a Update the documentatioh 2015-11-30 18:58:56 +01:00
Olivier Lambert
c2f1a74f96 Merge pull request #149 from vatesfr/julienf-fix-vm-migration-collision
Use a different id (opaque ref) for VMs which are under migration.
2015-11-30 17:40:31 +01:00
Julien Fontanet
a9ed7a3f3b Use a different id (opaque ref) for VMs which are under migration. 2015-11-30 17:34:12 +01:00
wescoeur
74a31f3301 Add schema 2015-11-27 16:47:16 +01:00
wescoeur
f88c0b9b67 Init 2015-11-27 14:51:54 +01:00
wescoeur
61ef313b1c 0.1.0 2015-11-27 14:45:04 +01:00
Julien Fontanet
b348e88a5f 4.10.0 2015-11-27 14:24:08 +01:00
Julien Fontanet
1615395866 Merge branch 'next-release' into stable 2015-11-27 14:23:57 +01:00
Julien Fontanet
e483abcad0 Merge pull request #130 from vatesfr/marsaudf-generic-job-schedules
Enhancements to prepare generic job scheduling
2015-11-27 12:03:27 +01:00
Fabrice Marsaud
12b6760f6e Extend job & schedule API with job & schedule names, and job.runSequence 2015-11-27 11:56:37 +01:00
Julien Fontanet
048cea19b7 0.0.1 2015-11-27 10:59:41 +01:00
Julien Fontanet
3e77c76c34 Make config entry from required. 2015-11-27 10:59:08 +01:00
Julien Fontanet
9b6c5d2ea3 Rename config entry pass to password. 2015-11-27 10:58:56 +01:00
Julien Fontanet
6fde6d7eac Expose plugin config validation errors (vatesfr/xo-web#530). 2015-11-26 16:18:39 +01:00
Julien Fontanet
a7ef891217 Merge pull request #146 from vatesfr/abhamonr-abort-vm-export-import
Start VM export only when necessary.
2015-11-26 16:10:59 +01:00
wescoeur
2fa081a4ba Plugin supports now Disaster recovery jobs 2015-11-26 15:47:25 +01:00
wescoeur
8f22dfe87b Start VM export only when necessary. 2015-11-26 15:42:07 +01:00
Julien Fontanet
2dc7fab39a Merge pull request #134 from vatesfr/abhamonr-backup-jobs-notifications
Xo event `job:terminated` on job termination.
2015-11-26 15:29:39 +01:00
Julien Fontanet
5b9a3ca1cb This module is no longer private. 2015-11-26 15:22:32 +01:00
Julien Fontanet
bf7c56a269 Remove unnecessary new line. 2015-11-26 15:21:40 +01:00
Julien Fontanet
d33af742dd Initial commit. 2015-11-26 15:19:09 +01:00
wescoeur
823879e9f9 0.0.2 2015-11-26 11:12:08 +01:00
ABHAMON Ronan
98eb285e14 Update README.md 2015-11-26 11:11:16 +01:00
wescoeur
74cb2e3c63 'job:terminated' signal is emitted after job execution. (with one executionStatus object) 2015-11-26 11:07:37 +01:00
wescoeur
37fd2e1103 0.0.1 2015-11-26 10:57:16 +01:00
ABHAMON Ronan
56db5dc341 Update README 2015-11-26 10:39:48 +01:00
ABHAMON Ronan
d48fa235b1 Update README 2015-11-25 17:41:17 +01:00
wescoeur
06a111495b Update package.json with plugin infos 2015-11-25 17:23:52 +01:00
wescoeur
f3fb0797bf Schema description fix 2015-11-25 17:14:58 +01:00
wescoeur
561b8f4eed Coding style fixes 2015-11-25 17:13:29 +01:00
Julien Fontanet
6e763a58f1 Expose UUIDs on all Xapi objects which have one. 2015-11-25 16:53:25 +01:00
wescoeur
8cfc6f0b1d Add schema + Plugin use now an array of receivers 2015-11-25 16:36:08 +01:00
wescoeur
7e04f26f78 Send email to one address 2015-11-25 16:11:27 +01:00
Julien Fontanet
348c30b61e Use Babel 5. 2015-11-25 15:00:41 +01:00
Julien Fontanet
ad1e60e137 Fix transport config. 2015-11-25 14:21:29 +01:00
Julien Fontanet
97e0a983f1 Fix schema. 2015-11-25 14:19:41 +01:00
Julien Fontanet
a8e72ed410 Merge pull request #140 from vatesfr/julienf-xo-defineProperty
Xo#defineProperty() to properly expose attributes
2015-11-25 14:16:55 +01:00
Julien Fontanet
fcdfd5f936 Merge pull request #139 from vatesfr/abhamonr-remember-disabled-servers
Save enabled state for each server
2015-11-25 13:54:44 +01:00
Julien Fontanet
f1faa463c1 Xo#defineProperty() allows (plugins) to define property on Xo instance 2015-11-25 12:27:09 +01:00
wescoeur
a0f4952b54 Save enabled state for each server 2015-11-25 12:15:15 +01:00
Olivier Lambert
bd82ded07d automatically set autopoweron on the pool 2015-11-25 12:06:16 +01:00
Julien Fontanet
016e17dedb Merge pull request #145 from vatesfr/julienf-pool-autopoweron
Xapi#setPoolProperties() supports autoPowerOn.
2015-11-25 12:03:23 +01:00
Julien Fontanet
5cd3e1b368 Xapi#setPoolProperties() supports autoPowerOn. 2015-11-25 11:03:33 +01:00
Julien Fontanet
b2b39458da Merge pull request #144 from vatesfr/julienf-fix-redis-items-updates
Fix items updates in Redis.
2015-11-25 10:57:54 +01:00
wescoeur
556bbe394d Add: Job and params-vector schemas. 2015-11-25 10:44:40 +01:00
Julien Fontanet
07288b3f26 Fix items updates in Redis. 2015-11-25 10:39:50 +01:00
Julien Fontanet
45681e645b Revert to Babel 5. 2015-11-25 10:21:02 +01:00
Julien Fontanet
a4e9f1a683 Remove unused code. 2015-11-24 11:48:31 +01:00
Julien Fontanet
f8c74daef5 Use object spread instead of altering passed object. 2015-11-24 11:47:53 +01:00
Julien Fontanet
b3a593afd7 Test on Node stable. 2015-11-24 11:47:31 +01:00
Julien Fontanet
90f79b7708 Shallow copy the configuration object before configuring a plugin. (fix vatesfr/xo-web#513) 2015-11-24 11:25:52 +01:00
Julien Fontanet
e220786a20 Merge pull request #142 from vatesfr/marsaudf-parameter-fix
Fix: group.getAll() has no params.
2015-11-24 10:49:51 +01:00
Fabrice Marsaud
f16b993294 Removed unwanted API parameter 2015-11-24 10:42:43 +01:00
Julien Fontanet
d45461bc47 Various updates. 2015-11-23 16:24:47 +01:00
Julien Fontanet
c241bea3bf Add vendor config file. 2015-11-20 18:28:32 +01:00
Julien Fontanet
084654cd3c Merge branch 'stable' into next-release 2015-11-20 18:17:08 +01:00
Julien Fontanet
d21742afb6 4.9.2 2015-11-20 18:05:26 +01:00
Julien Fontanet
b5259384e8 Merge pull request #138 from vatesfr/julienf-fix-tokens-expiration
Auth tokens expires after one month (side effect: remove old tokens).
2015-11-20 18:05:03 +01:00
Julien Fontanet
bf78ad9fbe Auth tokens expires after one month (side effect: remove old tokens). 2015-11-20 17:42:18 +01:00
Olivier Lambert
ab3577c369 Merge pull request #136 from vatesfr/olivierlambert-cloudconfig
Cloud config management for CoreOS
2015-11-20 17:30:53 +01:00
Olivier Lambert
6efb90c94e Merge pull request #135 from vatesfr/pierre-emergency-host-shutdown
emergencyHostShutdown(hostId) : suspends all the VMs running on the host
2015-11-20 17:30:27 +01:00
Olivier Lambert
cbcc400eb4 Cloud config management for CoreOS 2015-11-20 17:12:12 +01:00
Julien Fontanet
15aec7da7e vm.clone() requires permissions on SRs. 2015-11-20 16:19:33 +01:00
Julien Fontanet
46535e4f56 Utils: pAll() & pReflect() 2015-11-20 15:31:55 +01:00
Julien Fontanet
e3f945c079 Minor fixes. 2015-11-20 14:34:07 +01:00
Julien Fontanet
04239c57fe pSettle() returns an object for an object. 2015-11-20 11:42:49 +01:00
wescoeur
58aa2b6a49 Check backup calls 2015-11-20 11:30:01 +01:00
Pierre
ad4439ed55 emergencyHostShutdown(hostId) : suspends all the VMs running on the host and then shuts the host down 2015-11-20 11:26:03 +01:00
wescoeur
fb06905c86 Fix NoSuchObject exception 2015-11-20 11:07:47 +01:00
Julien Fontanet
9fe3ef430f More tests for pSettle(). 2015-11-20 10:43:56 +01:00
Julien Fontanet
ff30773097 Fix pSettle() to accept non-promises. 2015-11-20 10:43:56 +01:00
Julien Fontanet
f7531d1e18 pSettle() accepts either arrays or objects. 2015-11-20 10:43:56 +01:00
wescoeur
4a2911557d Fix remove listener 2015-11-20 10:31:29 +01:00
wescoeur
99caa5dddc Load/unload implem. 2015-11-20 10:13:12 +01:00
Julien Fontanet
86b42a3716 Initial commit. 2015-11-19 18:22:57 +01:00
wescoeur
12c4680501 Initial commit 2015-11-19 17:22:55 +01:00
Julien Fontanet
b7e05c236f Initial commit. 2015-11-19 16:59:06 +01:00
Olivier Lambert
658008ab64 add comment for quiesce 2015-11-19 16:03:28 +01:00
Olivier Lambert
b089d63112 allow snapshots on halted VMs 2015-11-19 16:01:08 +01:00
Julien Fontanet
ee9b1b7f57 Merge pull request #133 from vatesfr/abhamonr-validate-config-plugins-registration
Avoid plugin loading if config is not valid
2015-11-19 14:40:33 +01:00
wescoeur
cd0fc8176f Avoid plugin loading if config is not valid 2015-11-19 13:51:25 +01:00
Julien Fontanet
8e291e3e46 Define CoffeeScript API modules as ES6 (fix default value). 2015-11-19 13:13:53 +01:00
Julien Fontanet
e3024076cd Merge pull request #131 from vatesfr/abhamonr-delete-user-with-tokens
remove tokens on user deletion
2015-11-19 12:55:38 +01:00
wescoeur
6105874abc remove tokens on user deletion 2015-11-19 12:40:31 +01:00
Julien Fontanet
1855f7829d Advanced setting: verboseApiLogsOnErrors. 2015-11-19 11:11:54 +01:00
Julien Fontanet
456e8bd9c0 New FIXME. 2015-11-19 11:11:54 +01:00
Julien Fontanet
d5f2efac26 Merge pull request #132 from vatesfr/abhamonr-add-leveldown-dep
Add leveldown dep
2015-11-19 10:45:17 +01:00
wescoeur
21e692623c Add leveldown dep 2015-11-19 10:40:11 +01:00
Julien Fontanet
80e9589af5 Initial --repair command in xo-server-logs. 2015-11-19 10:11:01 +01:00
Julien Fontanet
b2b9ae0677 Quick fix for groups.getAll() attributes. 2015-11-19 09:26:34 +01:00
Julien Fontanet
63122905e6 Comments. 2015-11-18 18:36:27 +01:00
Julien Fontanet
f99b6f4646 Merge pull request #123 from vatesfr/abhamonr-logs-cli
CLI to explore xo-server's logs.
2015-11-18 17:01:26 +01:00
wescoeur
39090c2a22 Logs CLI:
- Can print logs for one namespace or all namespaces
- Can sort logs since one start timestamp/until one end timestamp
- The sort results can be limited by one value
2015-11-18 16:57:28 +01:00
Julien Fontanet
76baa8c791 Minor fix. 2015-11-18 16:40:08 +01:00
Julien Fontanet
74e4b9d6d2 Merge imports. 2015-11-18 15:24:38 +01:00
Julien Fontanet
bbfc5039f7 Merge pull request #129 from vatesfr/abhamonr-ghost-user
Avoid ghost user and ghost group.
2015-11-18 15:14:31 +01:00
wescoeur
b2fd694483 Avoid ghost user and ghost group. 2015-11-18 15:02:54 +01:00
Julien Fontanet
b03f38ff22 Include user name in console proxy logs. 2015-11-17 16:24:22 +01:00
Julien Fontanet
fe48811047 Include user name in API logs. 2015-11-17 16:24:07 +01:00
Julien Fontanet
bd9396b031 Ability to not create users on first sign in (fix #497). 2015-11-17 15:59:31 +01:00
Julien Fontanet
f0497ec16d Move default configuration to config.json. 2015-11-17 15:49:45 +01:00
Julien Fontanet
7e9e179fa7 Minor fixes. 2015-11-17 15:01:58 +01:00
Julien Fontanet
de62464ad8 Improve security: check token for console access. 2015-11-17 15:01:58 +01:00
Julien Fontanet
f6911ca195 Merge pull request #128 from vatesfr/olivierlambert-setbootorder
Rename vm.bootOrder() to vm.setBootOrder() and ensure VM is HVM.
2015-11-17 15:00:03 +01:00
Olivier Lambert
aec09ed8d2 Rename vm.bootOrder() to vm.setBootOrder() and ensure VM is HVM 2015-11-17 14:56:15 +01:00
Julien Fontanet
51a983e460 Logs clients IPs for WebSocket connections. 2015-11-17 13:24:07 +01:00
Julien Fontanet
0eb46e29c7 Merge pull request #122 from vatesfr/fix-poolPatches-removal
Properly remove objects for which `xo.id !== xapi.$id`.
2015-11-17 11:00:05 +01:00
Julien Fontanet
5ee11c7b6b Properly remove objects for which xo.id !== xapi.$id. 2015-11-17 10:33:56 +01:00
Olivier Lambert
b55accd76f add tag for quiesced snapshots 2015-11-16 12:41:16 +01:00
Julien Fontanet
fef2be1bc7 Merge pull request #125 from vatesfr/olivierlambert-snapquiesce
Add VM snapshot quiesce support
2015-11-16 10:59:39 +01:00
Olivier Lambert
0b3858f91d Add VM snapshot quiesce support 2015-11-16 10:55:51 +01:00
Julien Fontanet
d07ea1b337 Explicit Node versions compatibility. 2015-11-16 10:31:28 +01:00
Julien Fontanet
7e2dbc7358 4.9.1 2015-11-13 17:08:54 +01:00
Julien Fontanet
c676f08a7c Use correct host to import VM without known length. 2015-11-13 16:53:00 +01:00
Julien Fontanet
92f24b5728 Sets a long timeout for vm.import(). 2015-11-13 16:08:44 +01:00
Julien Fontanet
0254e71435 4.9.0 2015-11-13 11:27:40 +01:00
Julien Fontanet
2972fc5814 Merge pull request #124 from vatesfr/abhamonr-logs-avoid-sublevel
avoid sublevel for logs
2015-11-13 11:08:44 +01:00
wescoeur
975c96217c avoid sublevel for logs 2015-11-13 11:03:02 +01:00
Julien Fontanet
c30c1848bc Fix VM naming in vm.rollingDrCopy(). 2015-11-12 18:21:35 +01:00
Julien Fontanet
94615d3b36 Fix optional options in Xapi#remoteCopyVm(). 2015-11-12 18:21:12 +01:00
Julien Fontanet
37a00f0d16 Minor fixes. 2015-11-12 15:25:34 +01:00
Julien Fontanet
0dbe70f5af vm.copy() handles running VMs and compression can be disabled. 2015-11-12 11:02:05 +01:00
Fabrice Marsaud
7584374b0b Merge pull request #119 from vatesfr/marsaudf-DR-API
Disaster recovery feature
2015-11-12 10:24:57 +01:00
Fabrice Marsaud
71ca51dc1a Disaster recovery feature 2015-11-12 10:20:57 +01:00
Fabrice Marsaud
aa81e72e45 Merge pull request #115 from vatesfr/abhamonr-logger-module
Logger is implemented.
2015-11-12 10:16:04 +01:00
wescoeur
9954bb9c15 Logger is implemented.
Logger save jobs events : (start, end, call start, call end)
Logs can be obtained in api.
2015-11-12 09:59:56 +01:00
Julien Fontanet
e304395179 Work around ESLint bug. 2015-11-11 15:58:15 +01:00
Julien Fontanet
6b83130853 Various updates. 2015-11-11 15:52:12 +01:00
Julien Fontanet
9565718699 Update deps. 2015-11-11 15:52:06 +01:00
Julien Fontanet
e5c0250423 Xapi#importVm() crash on failure. 2015-11-10 21:28:01 +01:00
Olivier Lambert
135799ed5e Merge pull request #121 from vatesfr/marsaudf-backup-fix
Fixed rolling tag detection
2015-11-10 16:24:35 +01:00
Fabrice Marsaud
22c3b57960 Fixed backup rolling bug 2015-11-10 16:18:09 +01:00
Fabrice Marsaud
7054dd74a4 Merge pull request #120 from vatesfr/marsaudf-function-move
Moving rollingSnapshot form xapi to xo
2015-11-10 15:34:49 +01:00
Fabrice Marsaud
d4f1e52ef6 fix 2015-11-10 09:04:11 +01:00
Fabrice Marsaud
76a44459cf Moving rollingSnapshot form xapi to xo 2015-11-10 08:49:38 +01:00
Julien Fontanet
a5590b090c Merge pull request #116 from vatesfr/julien-f-vm-copy
vm.copy() can a copy a VM on a remote or local SR.
2015-11-09 15:14:04 +01:00
Julien Fontanet
74c9a57070 Replace lodash.assign() with ES2016 object spread. 2015-11-09 15:07:42 +01:00
Julien Fontanet
06e283e070 vm.copy() can a copy a VM on a remote or local SR. 2015-11-09 14:40:49 +01:00
Julien Fontanet
8ab2ca3f24 Remove unnecessary Bluebird-isms. 2015-11-09 12:05:18 +01:00
Julien Fontanet
0eb949ba39 Move often used lodash utils to utils.js 2015-11-09 12:03:34 +01:00
Julien Fontanet
be35693814 Minor rewrite in utils. 2015-11-09 11:20:41 +01:00
Julien Fontanet
1e5f13795c Merge pull request #117 from vatesfr/promise-settle
Implement utils.pSettle().
2015-11-06 14:51:56 +01:00
Julien Fontanet
cca2265633 Fix PV drivers detection. 2015-11-06 13:23:03 +01:00
Julien Fontanet
0f0d1ac370 Expose vm.xenTools property. 2015-11-06 13:08:03 +01:00
Julien Fontanet
d52d4ac183 Implement utils.pSettle(). 2015-11-06 11:17:35 +01:00
Julien Fontanet
841220fd01 Remove unused variable. 2015-11-05 16:42:17 +01:00
Julien Fontanet
ca5e10784b Only use absolute paths in redirects to ease reverse proxies. 2015-11-05 16:33:07 +01:00
Olivier Lambert
712319974b Merge pull request #114 from vatesfr/marsaudf-import-backup
Import a VM from a remote backup
2015-11-05 15:46:26 +01:00
Fabrice Marsaud
067a6d01bc List backup Files in remotes ans import them for restore 2015-11-05 15:38:09 +01:00
Julien Fontanet
27825f9e2e Unit tests for utils.pFinally(). 2015-11-04 15:36:07 +01:00
Julien Fontanet
425eb115dc Use ES2016 bind syntax for pFinally(). 2015-11-04 14:54:10 +01:00
Julien Fontanet
0a5ce55e2b Expose xapi.parseDateTime(). 2015-11-03 12:03:57 +01:00
Julien Fontanet
dbc8ed9d4c Update deps. 2015-11-03 10:54:14 +01:00
Julien Fontanet
e31e990684 Do not use ES6 method String#endsWith(). 2015-11-03 10:31:21 +01:00
Julien Fontanet
8618f56481 Support vm.import() without knowning the length. 2015-10-30 18:55:04 +01:00
Julien Fontanet
a39fc4667e Do not test on Node 5 for now. 2015-10-30 17:10:25 +01:00
Julien Fontanet
4c369e240b Merge pull request #112 from vatesfr/abhamonr-stats-use-server-time
The local xen orchestra timestamp is never used for get stats.
2015-10-30 14:32:56 +01:00
wescoeur
4e291d01d4 The local xen orchestra timestamp is never used for get stats.
Only the timestamp of one xenServer/rrd is used.
2015-10-30 14:18:37 +01:00
Julien Fontanet
0f03208aa1 Commands filtering. 2015-10-30 11:30:22 +01:00
Julien Fontanet
b32fce46cb Merge pull request #111 from vatesfr/abhamonr-fixs-debugs-stats-messages
Fix debugs messages for stats
2015-10-29 18:14:13 +01:00
wescoeur
d1fcd45aac Fix debugs messages for stats 2015-10-29 16:49:13 +01:00
Julien Fontanet
ebdb92c708 4.8.1 2015-10-29 16:31:10 +01:00
Julien Fontanet
112909d35b Merge pull request #110 from vatesfr/julien-f-fix-password-rehash
Fix user password rehash.
2015-10-29 16:30:29 +01:00
Julien Fontanet
c6e2c559f1 Fix user password rehash. 2015-10-29 16:11:45 +01:00
Julien Fontanet
cf8613886a 4.8.0 2015-10-29 10:45:37 +01:00
Olivier Lambert
39c25c2001 moving json5 as a real dep and not a dev dep anymore. Fix #109 2015-10-28 19:21:32 +01:00
Julien Fontanet
9c9721ade5 Fix permissions checking for API -_-" 2015-10-28 17:22:09 +01:00
Julien Fontanet
4b8abe4ce8 Fix test.hasPermission(). 2015-10-28 17:09:33 +01:00
Julien Fontanet
33dfaba276 Remove useless console.log. 2015-10-28 16:56:50 +01:00
Julien Fontanet
dd8bbcf358 VM snapshots require operate permission on all SRs. (fix vatesfr/xo-web#429). 2015-10-28 16:56:41 +01:00
Julien Fontanet
cc3e4369ed Fix some VM-snapshot & VDI ACLs resolution. 2015-10-28 16:51:09 +01:00
Julien Fontanet
548355fce6 Use Xo#getUserByName() where possible. 2015-10-28 16:17:33 +01:00
Julien Fontanet
a4e0e6544b Merge pull request #108 from vatesfr/julien-f-acl-inheritance
ACLs inheritance (fix vatesfr/xo-web#279).
2015-10-28 15:29:31 +01:00
Julien Fontanet
62067e0801 ACLs inheritance (fix vatesfr/xo-web#279). 2015-10-28 15:11:28 +01:00
Olivier Lambert
5eb40d2299 Merge pull request #107 from vatesfr/pierre-remember-me-label
Clicking on 'remember me' label checks the box
2015-10-28 14:49:59 +01:00
Julien Fontanet
d58add18fc Document --list-objects 2015-10-28 14:47:24 +01:00
Pierre
53990a531b Clicking on 'remember me' label checks the box 2015-10-28 14:46:14 +01:00
Olivier Lambert
d799aea3c4 Merge pull request #105 from vatesfr/abhamonr-intelligent-stats
New parser for host and vms stats.
2015-10-28 14:44:56 +01:00
Julien Fontanet
9af86cbba2 Adds granularity param spec to {host,vm}.stats(). 2015-10-28 14:35:00 +01:00
wescoeur
6fbfece4ff New parser for host and vms stats.
The data are cached for other http requests.
2015-10-28 14:20:48 +01:00
Julien Fontanet
3a0413d8bb Fix coding style. 2015-10-28 12:54:52 +01:00
Julien Fontanet
9122f9b291 Always use session.signIn(). 2015-10-28 12:46:51 +01:00
Julien Fontanet
d279db2a0e Update deps. 2015-10-28 12:42:20 +01:00
Julien Fontanet
d56cca7873 Use undefined provider for local providers. 2015-10-28 12:38:55 +01:00
Julien Fontanet
fa1096a6ba Remove unused variable. 2015-10-28 12:38:27 +01:00
Julien Fontanet
16ff721331 Throttle authentications tries by user (fix #339). 2015-10-28 12:11:50 +01:00
Julien Fontanet
798ee9dc46 Remove commented code. 2015-10-28 11:45:18 +01:00
Julien Fontanet
bc17c60305 Refactor Xo#authenticateUser(). 2015-10-28 11:44:17 +01:00
Julien Fontanet
432688d577 Remove unused code. 2015-10-28 11:44:17 +01:00
Julien Fontanet
da8d4b47f1 Remove some console logs. 2015-10-28 11:44:17 +01:00
Julien Fontanet
c6657b9619 Sets the length when/if known on download. 2015-10-27 18:47:44 +01:00
Olivier Lambert
ed1e2e2449 Merge pull request #102 from vatesfr/julien-f-refactor-vm-import
Refactor `vm.import()`
2015-10-27 18:26:29 +01:00
Julien Fontanet
b9744b4688 Refactor vm.import()
- Move logic code to `Xapi#importVm()`
- `vm.import()` following request now returns the id of the imported VM
2015-10-27 18:00:51 +01:00
Julien Fontanet
80d8388eb6 Update deps. 2015-10-27 16:12:09 +01:00
Julien Fontanet
b1ee4bdc09 Standard coding style. 2015-10-27 12:27:57 +01:00
Julien Fontanet
2f328f8f37 Merge pull request #106 from vatesfr/pierre-patch-name-in-upload-task-description
'Pending tasks' panel: upload task displays patch name
2015-10-27 12:23:59 +01:00
Pierre
ffefd7e50b Added default patch name for uploadPoolPatch to handle handlePatchUpload in pool.js 2015-10-27 11:07:45 +01:00
Pierre
c2445f8a7c 'Pending tasks' panel: upload task displays patch name 2015-10-27 10:05:14 +01:00
Julien Fontanet
54d44079cc Remove unused dep. 2015-10-27 09:16:59 +01:00
Julien Fontanet
87f089a12c Do not proxy data when the connection is closed. 2015-10-26 18:30:45 +01:00
Julien Fontanet
aa2172e4db Use source-map-support-2 from npm (fix old npm). 2015-10-26 18:30:45 +01:00
Julien Fontanet
0a33e94e79 Remove unused variable. 2015-10-26 18:30:44 +01:00
Julien Fontanet
fada54abae Enable XO API HTTP requests without HTTP auth. 2015-10-26 18:30:44 +01:00
Olivier Lambert
802641b719 Merge pull request #103 from vatesfr/pierre-install-all-patches-on-host
Algorithm to install all patches in correct order
2015-10-26 18:24:07 +01:00
Pierre
1da93829d4 Algorithm to install patches in correct order 2015-10-26 17:56:50 +01:00
Julien Fontanet
9e7acbc49a Avoid special chars in date formatting (fix #448). 2015-10-26 16:49:41 +01:00
Julien Fontanet
318765d40b Remove unused dep. 2015-10-26 10:47:07 +01:00
Julien Fontanet
ac11885379 0.6.7 2015-10-23 16:53:53 +02:00
Julien Fontanet
277669a13c Fix events watching XenServer < 6.0. 2015-10-23 16:53:42 +02:00
Julien Fontanet
fcbc476462 Fix coding style. 2015-10-23 16:53:05 +02:00
Julien Fontanet
94ba20dfa1 Register objects with the correct key. 2015-10-23 16:26:06 +02:00
Julien Fontanet
4944b415c7 0.6.6 2015-10-23 16:03:02 +02:00
Julien Fontanet
5da7312d2d Correctly publish .mocha.js 2015-10-23 16:02:42 +02:00
Julien Fontanet
954d19fe50 Fix objects collection in read-only mode. 2015-10-23 15:33:22 +02:00
Julien Fontanet
addd86f5d2 Better stack traces in CLI. 2015-10-23 15:33:02 +02:00
Julien Fontanet
2ad3dc4a32 Uniformize pool patches between collection and host.listMissingPatches(). 2015-10-23 15:09:13 +02:00
Julien Fontanet
eef940dd7c Pool patches ids are opaque refs instead of UUIDs. 2015-10-23 15:08:29 +02:00
Julien Fontanet
1b90223210 0.6.5 2015-10-23 14:54:02 +02:00
Julien Fontanet
95989ff63b Add find() and findAll() in CLI. 2015-10-23 14:51:25 +02:00
Julien Fontanet
1b5fc12ac1 Use createRawObject() instead of Object.create(null). 2015-10-21 17:17:15 +02:00
Julien Fontanet
c1c7b8dfcd Minor updates in utils.js 2015-10-21 17:15:49 +02:00
Julien Fontanet
d4510c2afe Put schemas in a dedicated directory. 2015-10-20 18:02:57 +02:00
Julien Fontanet
799f758dce Document constructor options. 2015-10-20 15:46:50 +02:00
Julien Fontanet
f241f073a3 Merge pull request #101 from vatesfr/julien-f-hvm-network-install
Set correct boot order when installing HVM from network.
2015-10-19 15:08:50 +02:00
Julien Fontanet
26a6c72611 Set correct boot order when installing HVM from network. 2015-10-19 15:06:08 +02:00
Julien Fontanet
51cee7804b Merge pull request #100 from vatesfr/julien-f-expose-virtualization-mode
Expose virtualization mode in VM object.
2015-10-19 15:02:40 +02:00
Julien Fontanet
52228430f1 Expose virtualization mode in VM object. 2015-10-19 14:30:08 +02:00
Julien Fontanet
4fcd45d8a4 Do not filter out node_modules in stack traces. 2015-10-16 09:53:13 +02:00
Julien Fontanet
ea5736947d No need to parse source maps for ignored call sites. 2015-10-16 09:42:16 +02:00
Julien Fontanet
6b5f36fb7e Move source mapping after async support. 2015-10-15 15:05:42 +02:00
Julien Fontanet
b328d6d95f Augment stack traces limit to 100. 2015-10-15 15:05:42 +02:00
Julien Fontanet
2e06921bf8 Merge pull request #99 from vatesfr/abhamonr-stats-optimization-host
Cache Host stats for 5 secs to avoid unnecessary requests.
2015-10-15 11:30:07 +02:00
Julien Fontanet
fd95e2d711 Use source-map-support-2.
It is based on stack-chain and should give better results with
`trace`.
2015-10-15 10:42:51 +02:00
wescoeur
490e253b79 Cache Host stats for 5 secs to avoid unnecessary requests. 2015-10-14 17:03:53 +02:00
Julien Fontanet
8a10f5cd52 Merge pull request #98 from vatesfr/abhamonr-stats-optimization
Cache VM stats for 5 secs to avoid unnecessary requests.
2015-10-14 16:43:20 +02:00
wescoeur
5cebcc2424 Cache VM stats for 5 secs to avoid unnecessary requests. 2015-10-14 16:34:57 +02:00
Julien Fontanet
7663b89289 Allowed favicon before sign in. 2015-10-13 11:49:38 +02:00
Julien Fontanet
d0d1f9e3c0 4.7.0 2015-10-12 16:34:55 +02:00
Julien Fontanet
5b782993fd Fix the license. 2015-10-12 15:39:26 +02:00
Julien Fontanet
138e60e77c 0.4.2 2015-10-12 15:38:50 +02:00
Julien Fontanet
9771402c54 No need to reload the plugin after a configure. 2015-10-12 15:38:34 +02:00
Julien Fontanet
30dcb4d8d2 Should be globally installed. 2015-10-12 15:31:09 +02:00
Julien Fontanet
4433760e37 Add better-stacks.js to package.json 2015-10-12 13:46:50 +02:00
Julien Fontanet
c418c766d8 This test is no longer relevant. 2015-10-12 10:26:45 +02:00
Julien Fontanet
334d843955 Move defaults to the schema. 2015-10-12 10:16:45 +02:00
Julien Fontanet
2e5169eb46 0.4.1 2015-10-09 18:55:23 +02:00
Julien Fontanet
3cdc1c03c3 0.1.1 2015-10-09 18:54:19 +02:00
Julien Fontanet
733c619b1f 0.2.1 2015-10-09 18:53:13 +02:00
Julien Fontanet
2021b644c0 0.4.1 2015-10-09 18:52:57 +02:00
Julien Fontanet
b63fcd2254 Merge pull request #89 from vatesfr/plugins-api
Plugins API.
2015-10-09 18:41:26 +02:00
Julien Fontanet
eb2aa352ef API really manages plugins. 2015-10-09 18:36:24 +02:00
Julien Fontanet
f55ed13bd2 0.2.0 2015-10-09 17:57:27 +02:00
Julien Fontanet
14b7072b5b 0.1.0 2015-10-09 17:56:59 +02:00
Julien Fontanet
98395abc17 0.4.0 2015-10-09 17:56:37 +02:00
Julien Fontanet
5db5c4e52c 0.4.0 2015-10-09 17:56:00 +02:00
Julien Fontanet
ec95f198ec Initial plugins API (with mockup data). 2015-10-08 14:00:33 +02:00
Olivier Lambert
f166e480f1 Merge pull request #96 from vatesfr/abhamonr-auth-non-persistent-cookies
Checkbox added on login page for create persistent session (1 year in…
2015-10-08 13:57:04 +02:00
Julien Fontanet
b31f55063d New plugin API. 2015-10-08 13:56:03 +02:00
Julien Fontanet
71e77ad45a New plugin API. 2015-10-08 13:55:57 +02:00
Julien Fontanet
25873e0e02 New plugin API. 2015-10-08 13:55:26 +02:00
Julien Fontanet
22638a8147 New plugin API. 2015-10-08 13:54:33 +02:00
wescoeur
2051f0486c Checkbox added on login page for create persistent session (1 year in practice) only for internal provider.
If checkbox is not checked or if an external provider is used (as Github, Twitter...) the session is not-persistent.
2015-10-08 12:28:11 +02:00
Julien Fontanet
f33fc5d730 Minor fixes. 2015-10-07 15:01:19 +02:00
Julien Fontanet
1603df3503 Avoid listing node_modules in stacks. 2015-10-07 14:42:36 +02:00
Julien Fontanet
6055ac182b Minor fix on pool merge. 2015-10-07 14:42:36 +02:00
Olivier Lambert
4678f60adf fix the pool merge issue #402 2015-10-06 15:15:54 +02:00
Julien Fontanet
e075f1c08b 0.6.4 2015-10-06 14:35:33 +02:00
Julien Fontanet
b48521950e Always use got instead of request. 2015-10-05 18:41:54 +02:00
Julien Fontanet
45da6fb39f Upgrade must and got. 2015-10-05 18:41:50 +02:00
Julien Fontanet
1604d327da Use redis 2 directly. 2015-10-05 15:32:34 +02:00
Julien Fontanet
98b2b325a1 Reorder some imports. 2015-10-05 13:07:17 +02:00
Julien Fontanet
55b3def630 Avoid direct dependency on Blubird AMAP. 2015-10-05 13:06:53 +02:00
Julien Fontanet
7e0aa719b4 Use Collection.unset() instead of remove() to avoid exceptions. 2015-10-02 14:05:26 +02:00
Julien Fontanet
ce7bc9f438 Correctly export isObject(). 2015-10-02 12:57:51 +02:00
Julien Fontanet
43a362d0eb Use constants for code robustness & performance. 2015-10-02 12:56:39 +02:00
Julien Fontanet
7d7e6e10b9 Properly use Object.prototype.hasOwnProperty(). 2015-10-02 12:27:18 +02:00
Julien Fontanet
73821b0f12 Isolate isObject(). 2015-10-02 12:26:54 +02:00
Julien Fontanet
2071a7d308 Use kindof instead of typeof where appropriate. 2015-10-01 20:47:32 +02:00
Julien Fontanet
c439daadad Minor opt. 2015-10-01 20:43:27 +02:00
Julien Fontanet
083f325076 Temporary work around for eslint/eslint#3946. 2015-10-01 20:31:43 +02:00
Julien Fontanet
ee53433dcc Use const wherever possible. 2015-10-01 18:25:01 +02:00
Julien Fontanet
ad10d13a75 Update standard. 2015-10-01 18:23:17 +02:00
Julien Fontanet
1b5f6bd3eb Only unregister the Xen Server on success. 2015-10-01 16:13:18 +02:00
Julien Fontanet
3472b85345 Minor fix. 2015-10-01 15:46:31 +02:00
Julien Fontanet
1c6ae53656 Remove a xen pool only after successful pool.mergeInto() (fix #403). 2015-10-01 15:45:03 +02:00
Julien Fontanet
a84a56f611 Merge pull request #95 from vatesfr/julien-f-pool-merge
pool.mergeInto(source, target)
2015-09-30 19:06:29 +02:00
Julien Fontanet
69751aa415 Expose XAPI error messages in pool.mergeInto(). 2015-09-30 17:36:25 +02:00
Julien Fontanet
9ef0337807 Correctly export pool.mergeInto(). 2015-09-30 16:39:30 +02:00
Julien Fontanet
a3fdd274c3 pool.mergeInto(source, target) 2015-09-30 16:26:44 +02:00
Julien Fontanet
f069c02153 Only test on Node 0.10, 0.12 and latest stable. 2015-09-25 10:22:09 +02:00
Olivier Lambert
ad0d14c517 Merge pull request #93 from vatesfr/next-release
4.6 release
2015-09-25 00:28:48 +02:00
Olivier Lambert
a72da79743 4.6.0 2015-09-25 00:12:03 +02:00
Julien Fontanet
4fd9639457 0.7.3 2015-09-24 16:40:31 +02:00
Julien Fontanet
2f2ee1f431 Update ws 0.8.0 to support Node 4. 2015-09-24 16:39:54 +02:00
Julien Fontanet
6bc35217d9 vm.set() supports PV args. 2015-09-24 10:05:20 +02:00
Julien Fontanet
c526e9ac8f Temporary disable incorrect standard reports. 2015-09-23 15:10:53 +02:00
Julien Fontanet
3dfebcadc1 Fix permissions check for networks and SRs (fix #91). 2015-09-23 15:10:53 +02:00
Julien Fontanet
ad06c8147f Initial commit. 2015-09-22 17:27:57 +02:00
Olivier Lambert
693af532a2 Merge pull request #90 from vatesfr/better-vm-migration
Better VM migration.
2015-09-22 15:42:11 +02:00
Julien Fontanet
4bac57fcd1 Better VM migration. 2015-09-22 15:22:01 +02:00
Julien Fontanet
a2f5f1cb0e 0.5.0 2015-09-21 18:13:13 +02:00
Julien Fontanet
1fbe7d92eb Add --list-objects (fix #8 and fix #9). 2015-09-21 18:13:04 +02:00
Julien Fontanet
760974c7c7 Clearer explanation for the callback URL. 2015-09-21 10:30:53 +02:00
Julien Fontanet
e1587d11b1 FIXME: certificates reading should be async. 2015-09-21 10:23:48 +02:00
Julien Fontanet
0595360808 Update deps. 2015-09-18 14:51:34 +02:00
Julien Fontanet
1a8149e456 This package should be installed globally. 2015-09-18 14:51:18 +02:00
Julien Fontanet
59291fcac2 VM export is named after the VM name label (fix #370). 2015-09-17 16:57:30 +02:00
Julien Fontanet
1f21b202a5 Merge pull request #87 from vatesfr/pvargs
PV args can be specified at VM creation.
2015-09-17 16:40:30 +02:00
Olivier Lambert
b3ca02a166 add PV args for VM 2015-09-17 16:17:11 +02:00
Julien Fontanet
2462f8f87e Fix Xapi#_setObjectProperties() for uppercase properties. 2015-09-17 16:16:35 +02:00
Olivier Lambert
18268acc1f Merge pull request #83 from vatesfr/tags
Tags
2015-09-16 20:39:11 +02:00
Julien Fontanet
fd6f92f6b5 0.3.1 2015-09-16 11:57:52 +02:00
Julien Fontanet
ddf7226ba8 Minor fixes in the README. 2015-09-16 11:57:44 +02:00
Julien Fontanet
a1cd95752a 0.3.0 2015-09-16 11:35:32 +02:00
Julien Fontanet
d131a26a41 Fix the license. 2015-09-16 11:35:26 +02:00
Julien Fontanet
10a7c75001 Enable tests on Node 4. 2015-09-16 11:13:25 +02:00
Julien Fontanet
1f454ababf Support custom username field. 2015-09-16 11:12:42 +02:00
Julien Fontanet
44f4423a9d Fix tag.{add,remove}(). 2015-09-15 16:25:45 +02:00
Olivier Lambert
37250a6f48 Support tags on Xen objects. 2015-09-15 11:59:25 +02:00
Julien Fontanet
4ee352fdb2 Always use instances of Error for errors. 2015-09-14 16:45:17 +02:00
Olivier Lambert
fd97541417 Merge pull request #85 from vatesfr/changePassword
Password change API for any user. Related to xo-web issue#362
2015-09-14 16:34:45 +02:00
Fabrice Marsaud
dba3e30d02 Fixes after PR feedback 2015-09-14 16:28:29 +02:00
Julien Fontanet
96ea3ded4a Better stacktraces in CLI. 2015-09-14 16:02:09 +02:00
Julien Fontanet
8bbc6e9ff5 Initial read only mode (fix #3). 2015-09-14 16:01:46 +02:00
Julien Fontanet
5962283ad3 Directly use posix path functions. 2015-09-14 14:14:40 +02:00
Fabrice Marsaud
cdd705831b reworked password change 2015-09-14 13:33:44 +02:00
Fabrice Marsaud
a1a7c5e4bb Password change API for any user. Related to xo-web issue#362 2015-09-14 11:28:33 +02:00
Fabrice Marsaud
c1e9061568 Minor code style fix 2015-09-14 11:28:10 +02:00
Julien Fontanet
90ee04de57 Fix bad sign in redirections (fix vatesfr/xo-web#373). 2015-09-14 11:19:38 +02:00
Julien Fontanet
cd24cfbe5c Minor fix in vm.stop(). 2015-09-11 18:03:47 +02:00
Julien Fontanet
af7029812c 0.6.3 2015-09-11 15:32:16 +02:00
Julien Fontanet
5b05668a30 4.5.0 2015-09-11 13:00:24 +02:00
Julien Fontanet
a2eca9589f Avoid crashes on failed VM backups. 2015-09-11 12:48:42 +02:00
Julien Fontanet
a2adbb19bd Avoid crashes on failed VM exports. 2015-09-11 12:48:22 +02:00
Julien Fontanet
012e5c09ed Minor fixes. 2015-09-11 12:31:53 +02:00
Julien Fontanet
84c9532456 0.1.0 2015-09-11 10:45:02 +02:00
Julien Fontanet
aa7c9bca46 Test with Node 4. 2015-09-11 10:44:32 +02:00
Julien Fontanet
3d00b4ffbe 0.2.0 2015-09-11 10:43:36 +02:00
Fabrice Marsaud
5f33aa7fd4 Fixed host stats 2015-09-10 17:16:21 +02:00
Fabrice Marsaud
7ea2204dfd Merge pull request #82 from vatesfr/vmMetadata
Only VM metadata handle in various backup/export methods
2015-09-10 17:14:19 +02:00
Julien Fontanet
be8cadf5ac Pass context to ACL checkers. 2015-09-10 17:01:12 +02:00
Fabrice Marsaud
fc7192c748 Only VM metadata handle in various backup/export methods 2015-09-10 16:20:49 +02:00
Julien Fontanet
c517b59138 Enable testing on Node 4. 2015-09-10 15:22:09 +02:00
Julien Fontanet
5c6b6b3919 Implements ACL inheritance for hosts, networks, SRs and VMs. 2015-09-10 14:57:10 +02:00
Julien Fontanet
87553ac685 Use relative paths for sign in (fix vatesfr/xo-web#361). 2015-09-10 14:45:35 +02:00
Julien Fontanet
384f396bbb Revert redis to 0.12.1 for compatibility with then-redis. 2015-09-09 17:33:34 +02:00
Julien Fontanet
d40560bd49 Allow a query string in external auth providers callback. 2015-09-07 17:27:42 +02:00
Julien Fontanet
0304d6079d GitHub screenshot. 2015-09-07 17:24:27 +02:00
Julien Fontanet
ae41e64999 Fix passport-github links. 2015-09-07 17:02:57 +02:00
Julien Fontanet
8c9f32c927 Initial commit. 2015-09-07 17:01:37 +02:00
Julien Fontanet
5485e8a322 Test on iojs 3 and use containers on Travis. 2015-09-07 16:23:33 +02:00
Julien Fontanet
67952ca246 Update deps. 2015-09-07 16:07:23 +02:00
Julien Fontanet
b4c612ff6d Remove unnecessary ESLint directive. 2015-09-07 14:16:10 +02:00
Julien Fontanet
e708268067 Test on iojs 3 and use Travis containers. 2015-09-07 14:15:55 +02:00
Julien Fontanet
4ddbefb147 Update standard to 5.2 and fix coding style. 2015-09-04 11:00:36 +02:00
Julien Fontanet
edabc17ac9 onlyMetadata param for vm.export() is optional. 2015-09-04 10:38:45 +02:00
Olivier Lambert
c7e8211fae replace passport placehold by password 2015-09-02 22:00:51 +02:00
Olivier Lambert
dc3f07dd52 add the parameter in the VM method 2015-09-02 17:01:06 +02:00
Olivier Lambert
fae6a5cfb4 add the onlyMetadata parameter 2015-09-02 16:34:31 +02:00
Julien Fontanet
cafd225797 Better logs for the consoles proxy. 2015-09-02 16:34:20 +02:00
Julien Fontanet
bf77d2973e Error handling should be in place before the connection. 2015-09-02 16:22:47 +02:00
Julien Fontanet
dfd8133431 Handle errors in consoles proxy. 2015-09-02 16:15:28 +02:00
Olivier Lambert
e9d78b8990 fix xo-web/#304 2015-09-02 15:43:27 +02:00
Olivier Lambert
13532cdffb Merge pull request #81 from vatesfr/julien-f-direct-consoles
Access directly to consoles without using wsproxy.
2015-09-01 17:58:06 +02:00
Julien Fontanet
c17620efb7 Access directly to consoles without using wsproxy. 2015-09-01 17:51:25 +02:00
Julien Fontanet
d3b5b1080f Correctly handle VM_LACKS_FEATURE_SHUTDOWN. 2015-09-01 17:45:03 +02:00
Julien Fontanet
e4b0c23bb9 Add comment regarding chained certificates. 2015-09-01 15:22:47 +02:00
Julien Fontanet
e61873f335 username is not define in passport-saml. 2015-08-28 18:23:46 +02:00
Julien Fontanet
6c24fb6d79 Minor cleanup. 2015-08-28 18:06:49 +02:00
Julien Fontanet
bd93551c13 Minor fixes for external auth providers. 2015-08-28 18:06:49 +02:00
Julien Fontanet
6c3719b9b8 0.1.0 2015-08-28 17:47:53 +02:00
Fabrice Marsaud
dc0799a56b 4.4.0 2015-08-28 17:43:02 +02:00
Julien Fontanet
8c9ea7885a First working version. 2015-08-28 16:16:32 +02:00
Julien Fontanet
e1fca1520b Merge pull request #79 from vatesfr/passport
Passport integration.
2015-08-28 16:12:00 +02:00
Julien Fontanet
c72f3b8efb Fix providers list on sign in page. 2015-08-28 16:03:24 +02:00
Julien Fontanet
afcd172a94 Put signin page in its own file. 2015-08-28 15:52:46 +02:00
Julien Fontanet
5957700699 Better error feedback. 2015-08-28 15:14:41 +02:00
Julien Fontanet
451d023e81 Authentication is now handled by passport. 2015-08-28 15:04:01 +02:00
Julien Fontanet
64d166cebf Enable Travis for iojs v3. 2015-08-28 09:06:01 +02:00
Julien Fontanet
2540ac34b3 Be verbose on XML-RPC errors. 2015-08-28 08:51:38 +02:00
Julien Fontanet
76e5d41a34 Upgrade deps. 2015-08-28 08:51:15 +02:00
Fabrice Marsaud
51b067def7 host.stats fixed 2 2015-08-27 17:51:29 +02:00
Fabrice Marsaud
de25e8dd6f host.stats fixed 2015-08-27 16:48:42 +02:00
Fabrice Marsaud
39ac291ba2 vm.stats fix 2015-08-27 09:57:53 +02:00
Julien Fontanet
722d26c5b9 Only super admins can interact with a network (should fix vatesfr/xo-web#322). 2015-08-24 17:34:15 +02:00
Julien Fontanet
0346760a75 Hide non managed VDIs (should fix #324). 2015-08-24 16:12:27 +02:00
Julien Fontanet
a2015143f8 Fix coding style. 2015-08-24 13:27:00 +02:00
Julien Fontanet
071d99a7b4 Update deps. 2015-08-24 13:26:24 +02:00
Julien Fontanet
2c32a4e912 0.6.2 2015-08-10 15:52:55 +02:00
Julien Fontanet
c66f7235b6 Fix master change. 2015-08-10 15:51:45 +02:00
Fabrice Marsaud
e6d8e063c9 stats api funcs now have 4 possible time granularities 2015-08-10 15:41:16 +02:00
Fabrice Marsaud
29526144c9 4.3.2 2015-07-29 15:59:54 +02:00
Fabrice Marsaud
b88bcafddd Merge branch 'next-release' 2015-07-29 15:52:55 +02:00
Fabrice Marsaud
78d844d693 Fixed backup depth 2015-07-29 15:36:18 +02:00
Fabrice Marsaud
49310b53e9 4.3.1 2015-07-29 15:32:57 +02:00
Fabrice Marsaud
4684487ff8 Fixed backup path failure for nfs remotes 2015-07-29 15:32:57 +02:00
Fabrice Marsaud
89250205dc 4.3.1 2015-07-29 15:25:04 +02:00
Fabrice Marsaud
9039919b03 Fixed backup path failure for nfs remotes 2015-07-29 15:15:14 +02:00
Julien Fontanet
df16803f11 Expose host.powerOnMode (fixes #77). 2015-07-27 16:24:38 +02:00
Julien Fontanet
48327cf5f8 A pool’s name defaults to its master’s name. 2015-07-24 13:42:08 +02:00
Varchar38
2ead125b9d Check if the server already exist 2015-07-23 14:24:28 +02:00
Fabrice Marsaud
23807f11f9 4.3.0 2015-07-22 15:46:07 +02:00
Fabrice Marsaud
cad666d07f Merge branch 'next-release' 2015-07-22 15:44:12 +02:00
Varchar38
a0b11051e1 Position can be a string or a number 2015-07-22 09:40:00 +02:00
Julien Fontanet
b6e6fb9de2 Closes WebSockets connections on SIGINT/SIGTERM. 2015-07-21 16:03:20 +02:00
Olivier Lambert
4172fd8aff Merge pull request #75 from vatesfr/marsaud-backup
Scheduled VM Backup feature
2015-07-21 14:35:15 +02:00
Fabrice Marsaud
d60df6ca69 Backup, rolling backup, and remote backup location features 2015-07-21 14:22:31 +02:00
Julien Fontanet
f9ba7377eb Do not create the promise if unnecessary. 2015-07-21 13:58:43 +02:00
Julien Fontanet
5d3c47b8ae Prefer pathname over path with got. 2015-07-21 13:58:25 +02:00
Fabrice Marsaud
ef9cc860a9 removed console output 2015-07-17 14:57:21 +02:00
Julien Fontanet
5a1ec8aa74 Merge pull request #76 from vatesfr/xo-web-issue#301
Deleting a VM also deletes its snapshots.
2015-07-16 17:11:13 +02:00
Fabrice Marsaud
ac435f3699 Deleting a VM also deletes its snapshots. 2015-07-16 17:03:15 +02:00
Julien Fontanet
20cbf0c710 Initial commit. 2015-07-15 15:51:43 +02:00
Julien Fontanet
0374dec79c Use standard Promise instead of Bluebird where possible. 2015-07-15 15:15:54 +02:00
Julien Fontanet
41b6bf38c4 Fix disks deletion in deleteVm(). 2015-07-15 13:44:16 +02:00
Julien Fontanet
ddba251449 Coding style fixes. 2015-07-15 09:42:50 +02:00
Julien Fontanet
bf76e47648 Coding style fixes. 2015-07-15 09:41:54 +02:00
Julien Fontanet
5a3ad35bdd Update standard to 4.5.4. 2015-07-15 09:41:54 +02:00
Julien Fontanet
7da18274ad Use standard Promise instead of Bluebird where possible. 2015-07-15 09:41:54 +02:00
Varchar38
9b66ae05eb Delete set_enable 2015-07-13 15:49:25 +02:00
Fabrice Marsaud
d407964625 Avoid deleting Isos in drive when deleting a VM 2015-07-09 21:59:09 +02:00
Fabrice Marsaud
bc254d5a8d Issue #303, delete unpluggable disks with VMs 2015-07-09 19:09:36 +02:00
Fabrice Marsaud
1d9128a650 Removed unused import 2015-07-02 17:29:20 +02:00
Fabrice Marsaud
a1f2e9e4e2 Fixed a xapi call 2015-07-02 16:50:37 +02:00
Julien Fontanet
8c8188c24f Update deps. 2015-07-01 16:54:24 +02:00
Julien Fontanet
e42eaf73b8 Update xen-api to 0.6.1. 2015-06-30 17:23:20 +02:00
Julien Fontanet
5444381f7d 0.6.1 2015-06-30 17:20:31 +02:00
Julien Fontanet
fbd8552c0b Fix error symbol in API traces. 2015-06-30 17:15:38 +02:00
Julien Fontanet
daa26b2e1e Created VBDs should be unpluggable. 2015-06-30 16:23:51 +02:00
Julien Fontanet
dc44679031 Optimize and clean _watchEvents() & _watchEventsLegacy(). 2015-06-30 14:24:43 +02:00
Julien Fontanet
18473e6819 Fix inter pool migration. 2015-06-30 13:05:30 +02:00
Julien Fontanet
2cbd17b745 Better traces. 2015-06-30 11:07:33 +02:00
Julien Fontanet
a51d6b9a74 Better API traces. 2015-06-30 11:06:31 +02:00
Olivier Lambert
706871c12a 4.2.0 2015-06-29 09:17:00 +02:00
Julien Fontanet
16c49e965c Update json-rpc-peer to 0.10 (fixes #71, fixes #72 and maybe vatesfr/xo-web#297) 2015-06-26 20:24:04 +02:00
Fabrice Marsaud
f29e867441 Merge pull request #66 from vatesfr/marsaud-issue176
Marsaud issue176 schedules/jobs
2015-06-26 14:23:16 +02:00
Fabrice Marsaud
4a5f6d8393 Job scheduler feature 2015-06-26 14:13:38 +02:00
Julien Fontanet
39e3025077 Work around babel/babel#1850. 2015-06-26 14:02:11 +02:00
Julien Fontanet
8de2066634 0.4.0 2015-06-26 12:01:51 +02:00
Julien Fontanet
dfc312c092 Various updates. 2015-06-26 11:57:41 +02:00
Julien Fontanet
ce15dbf31b New Collection#unset(). 2015-06-26 11:20:50 +02:00
Julien Fontanet
9ee293816d Properly cast booleans from xen-api. 2015-06-26 10:51:09 +02:00
Julien Fontanet
b3c1397753 Fix invalid exception in vdi.set(). 2015-06-25 17:02:25 +02:00
Julien Fontanet
93d63538bb vdi.set() supports size as string 2015-06-25 16:34:10 +02:00
Julien Fontanet
09c28d2311 Update source-map-support to 0.3.2. 2015-06-25 14:10:42 +02:00
Julien Fontanet
5b8ed496db Fix disk.create(). 2015-06-25 13:53:42 +02:00
Julien Fontanet
27b4cf743e Work around for dates from XAPI JSON. 2015-06-25 10:32:30 +02:00
Julien Fontanet
95938a65b6 Minor fix. 2015-06-24 17:47:47 +02:00
Julien Fontanet
70780fc4ef New Xapi#ejectCdFromVm(). 2015-06-24 17:46:34 +02:00
Julien Fontanet
21d265d12f Only set the CD drive bootable on VM creation. 2015-06-24 17:30:02 +02:00
Julien Fontanet
788526d6eb disk.create() requires a sr. 2015-06-24 17:02:25 +02:00
Julien Fontanet
a7203e9a17 Xapi#createVdi() use default_SR if necessary. 2015-06-24 16:27:16 +02:00
Julien Fontanet
eff50daae4 Fix CD insertion for HVM VM creation. 2015-06-23 15:34:04 +02:00
Julien Fontanet
7612db15e0 Do not use babel-plugin-closure-elimination. 2015-06-23 14:59:29 +02:00
Julien Fontanet
0731ee473d Minor fix. 2015-06-23 14:43:51 +02:00
Julien Fontanet
3a6a76fe19 Prefers position (device) 3 for CD drive. 2015-06-23 14:38:16 +02:00
Julien Fontanet
edb0509194 Minor package.json change. 2015-06-23 14:07:58 +02:00
Julien Fontanet
1806be1fd7 Xapi#_createTask() now returns a ref. 2015-06-23 14:04:54 +02:00
Varchar38
7769f25869 Add delete VM-template 2015-06-23 13:57:59 +02:00
Julien Fontanet
f6e5743f20 Update xen-api to v0.6. 2015-06-23 10:47:34 +02:00
Julien Fontanet
9ef13696d8 0.6.0 2015-06-23 10:39:55 +02:00
Julien Fontanet
c3f635fd12 Ask JSON encoded values to XenApi.
The XML is therefore much faster to parse (3-4 ×).
2015-06-23 10:39:04 +02:00
Julien Fontanet
e3d1380435 0.5.7 2015-06-23 10:38:41 +02:00
Julien Fontanet
1ef6196de6 TODOs. 2015-06-23 10:14:16 +02:00
Julien Fontanet
f83737b538 Make objects immutable. 2015-06-23 09:17:42 +02:00
Julien Fontanet
bb1ea4e4d0 Optimization for empty arrays. 2015-06-23 09:13:43 +02:00
Julien Fontanet
9cb4de2ea8 Inline an only-used-once function. 2015-06-22 23:33:52 +02:00
Julien Fontanet
048cbf60ec Added tested Xen Server versions in README. 2015-06-22 16:23:38 +02:00
Julien Fontanet
36f40b4188 Support Xen Server < 6. 2015-06-22 16:19:32 +02:00
Julien Fontanet
ea1afb260a Update README.md 2015-06-22 14:00:35 +02:00
Julien Fontanet
75ceee23ec Fix attachVdiToVm. 2015-06-22 10:52:56 +02:00
Julien Fontanet
38f2372ee8 Do not use require-tree. 2015-06-22 10:41:36 +02:00
Julien Fontanet
b58826da6e Merge pull request #70 from vatesfr/vm-create-refactoring
vm.create() refactoring
2015-06-19 16:59:36 +02:00
Julien Fontanet
a3bba92063 Remove duplicate source-map-support. 2015-06-19 15:53:23 +02:00
Julien Fontanet
ebcc6c9341 Remove unused lodash.{find,findkey,size}. 2015-06-19 15:51:22 +02:00
Julien Fontanet
95f765055e Fix invalid session handling. 2015-06-19 15:15:23 +02:00
Julien Fontanet
49aa5ffccc Password can be supplied on the command line. 2015-06-19 15:13:21 +02:00
Varchar38
2c05e606c7 Merge branch 'next-release' of https://github.com/vatesfr/xo-server into next-release 2015-06-18 16:55:08 +02:00
Varchar38
92f1c080c4 Add missing await for async unregisterXenServer 2015-06-18 16:54:00 +02:00
Julien Fontanet
8f79699e84 Xapi#_createVbd() correctly finds a default position. 2015-06-18 16:11:37 +02:00
Julien Fontanet
e7b3e28f76 vm.delete() must not remove unpluggable VDIs. 2015-06-18 16:11:08 +02:00
Julien Fontanet
123677b6c6 Fix isVmHvm(). 2015-06-18 16:10:45 +02:00
Julien Fontanet
f393c7173c vm.create() only one VBD is bootable. 2015-06-18 16:10:32 +02:00
Julien Fontanet
0abfb9f1e4 vm.create() can set the description. 2015-06-18 16:09:59 +02:00
Julien Fontanet
379771a5c1 Remove unused import. 2015-06-18 15:26:31 +02:00
Julien Fontanet
2f4a76b3fa Fix handling when vm.create(installation) is undefined. 2015-06-18 15:18:42 +02:00
Julien Fontanet
7d82e199b7 Fix Xapi#_deleteVdi(). 2015-06-18 15:09:28 +02:00
Julien Fontanet
de693a08ad vm.create() seems to work ok. 2015-06-18 15:09:28 +02:00
Julien Fontanet
923091ca62 Various updates. 2015-06-18 15:09:28 +02:00
Julien Fontanet
cb65ddedb6 Remove problematic _waitObject(). 2015-06-18 15:09:27 +02:00
Julien Fontanet
7aa75539c9 Fix VDIs creation. 2015-06-18 15:09:27 +02:00
Julien Fontanet
a1a7cf59b3 vm.create() returns the new VM id. 2015-06-18 15:09:27 +02:00
Julien Fontanet
f572cb5f3e Test utils.formatXml(). 2015-06-18 15:09:27 +02:00
Julien Fontanet
8f1a31ad13 Fix XML generation. 2015-06-18 15:09:26 +02:00
Julien Fontanet
dcf63e3da2 Typo. 2015-06-18 15:09:26 +02:00
Julien Fontanet
153dca8137 More tolerant parsing of VM-template.disks. 2015-06-18 15:09:26 +02:00
Julien Fontanet
db97787b15 Fix other_config.disks XML generation. 2015-06-18 15:09:26 +02:00
Julien Fontanet
7148fec6e1 Object watchers are never rejected. 2015-06-18 15:09:25 +02:00
Julien Fontanet
db6d48f8ca vm.create() refactoring. 2015-06-18 15:09:25 +02:00
Julien Fontanet
6d87a1a604 Update xen-api to 0.5.6. 2015-06-18 13:42:03 +02:00
Julien Fontanet
d09d3fa80b 0.5.6 2015-06-18 13:40:18 +02:00
Julien Fontanet
4c8cd50643 Better build & tests. 2015-06-18 13:15:27 +02:00
Julien Fontanet
eee72f4f27 Test on both io.js v1 & v2. 2015-06-18 13:13:40 +02:00
Julien Fontanet
5c414fc7b4 Test on both io.js v1 & v2. 2015-06-18 11:05:44 +02:00
Julien Fontanet
127f4446ae Log SIGINT & SIGTERM. 2015-06-18 10:48:40 +02:00
Julien Fontanet
45f6a7cb4d Minor changes. 2015-06-17 17:09:46 +02:00
Julien Fontanet
8866bd8663 Minor code simplification. 2015-06-17 15:53:48 +02:00
Julien Fontanet
3f9c515f1d Better error messages. 2015-06-17 15:39:33 +02:00
Julien Fontanet
e9e0fdae37 Run linter with npm test. 2015-06-16 17:53:47 +02:00
Julien Fontanet
124f7f43ab Minor changes. 2015-06-16 17:53:47 +02:00
Julien Fontanet
27df44bf44 Use more ES6/7 features. 2015-06-16 16:09:40 +02:00
Julien Fontanet
b934a7de6a npm run lint 2015-06-16 16:00:29 +02:00
Julien Fontanet
d521c75085 Minor changes. 2015-06-16 16:00:17 +02:00
Julien Fontanet
5e18b6b878 Improve Babel configuration. 2015-06-16 15:57:12 +02:00
Julien Fontanet
3183ca02b3 Improve tests execution. 2015-06-16 15:56:36 +02:00
Julien Fontanet
60a278490f Fix coding style. 2015-06-16 12:49:22 +02:00
Julien Fontanet
b78e74cdf6 Use a valid SPDX license. 2015-06-16 12:46:58 +02:00
Julien Fontanet
f61a16074b Update deps. 2015-06-16 12:46:11 +02:00
Julien Fontanet
82766d1645 Update README.md 2015-06-16 12:39:54 +02:00
Julien Fontanet
49a49e2a2c Use must instead of chai. 2015-06-15 16:41:11 +02:00
Julien Fontanet
8b9389b468 Fix tests execution on Windows. 2015-06-15 16:27:02 +02:00
Julien Fontanet
ee17336d64 Remove unused import. 2015-06-15 16:24:50 +02:00
Julien Fontanet
2b768d2fb5 TODO: an user should be able to delete its tokens. 2015-06-15 13:15:38 +02:00
Julien Fontanet
4fc63010d4 Remove incorrect (and unused) code. 2015-06-15 13:15:24 +02:00
Julien Fontanet
3311ded843 Fix tokens deletion. 2015-06-15 13:15:12 +02:00
Julien Fontanet
135c2e7a71 Better npm test. 2015-06-12 10:59:36 +02:00
Julien Fontanet
a3a8f600b6 Add Travis CI badge on README. 2015-06-12 10:56:23 +02:00
Olivier Lambert
23643b99e2 remove old permissions for snapshot, convert, clone and set 2015-06-11 14:42:15 +02:00
Julien Fontanet
764a334952 Various updates. 2015-06-11 14:21:47 +02:00
Julien Fontanet
6f163f2d01 Use Xapi#createVirtualInterface in vm.create(). 2015-06-11 13:59:39 +02:00
Julien Fontanet
aae65f8235 Fix CD drive creation in vm.create(). 2015-06-11 13:59:20 +02:00
Julien Fontanet
764ea571eb Fix VIFs creation in vm.create(). 2015-06-11 13:42:33 +02:00
Julien Fontanet
aef719b574 Fix stack traces on Node 0.10. 2015-06-11 13:02:16 +02:00
Julien Fontanet
73e52e625b Build on install to fix tests on Travis CI. 2015-06-11 09:16:50 +02:00
Julien Fontanet
a967588fe1 Travis CI integration. 2015-06-10 17:00:46 +02:00
Julien Fontanet
72e530f062 Do not distribute examples & tests. 2015-06-10 17:00:06 +02:00
Julien Fontanet
a0b422f99e Also ignore npm-debug.log.* 2015-06-10 16:59:03 +02:00
Julien Fontanet
6b92f30324 Better stack traces in tests and production. 2015-06-10 16:59:03 +02:00
Julien Fontanet
464cfe701c Add Babel plugin for closure elimination (disabled for now). 2015-06-10 16:59:03 +02:00
Olivier Lambert
070fa03108 4.1.0 2015-06-10 16:32:24 +02:00
Olivier Lambert
51abeabb33 fix issue xo-web/#287 2015-06-10 16:22:13 +02:00
Olivier Lambert
74b0697da1 4.0.3 2015-06-07 16:11:41 +02:00
Julien Fontanet
0ca409bb22 4.0.3-alpha.2 2015-06-05 18:52:35 +02:00
Julien Fontanet
527cf25d1b Explicitly depends on redis. 2015-06-05 18:50:29 +02:00
Julien Fontanet
a49594e6a5 4.0.3-alpha.1 2015-06-05 18:38:11 +02:00
Julien Fontanet
5cd22b41d6 No longer use fibers. 2015-06-05 18:34:04 +02:00
Julien Fontanet
934949c514 Remove unused dependencies. 2015-06-05 17:42:54 +02:00
Julien Fontanet
cc61e8d334 Require package.json instead of package.
Not using the extension confuses dependency-check.
2015-06-05 17:21:34 +02:00
Julien Fontanet
81be499c49 4.0.3-alpha.0 2015-06-05 16:02:35 +02:00
Julien Fontanet
082aa55566 Disable Babel experiemental transformers. 2015-06-05 15:45:57 +02:00
Julien Fontanet
c783039557 Use julien-f-unzip instead of @julien-f/unzip. 2015-06-05 15:45:49 +02:00
Julien Fontanet
206dfeb879 Use json-rpc-peer & json-rpc-protocol instead of deprecated @julien-f/json-rpc. 2015-06-05 15:00:08 +02:00
Julien Fontanet
f839e76f4b Show app-conf debug messages. 2015-06-05 15:00:08 +02:00
Julien Fontanet
c67151f922 Disable Babel minification.deadCodeElimination which has issues with Node 0.12. 2015-06-05 12:53:34 +02:00
Julien Fontanet
aedec5de18 Update source-map-support to 0.3. 2015-06-05 12:04:44 +02:00
Julien Fontanet
3df973a1ea External Babel configuration. 2015-06-03 17:34:50 +02:00
Julien Fontanet
0253031d7f Use standard with babel-eslint. 2015-06-03 17:34:49 +02:00
Olivier Lambert
f4445d4681 4.0.2 2015-06-02 20:33:49 +02:00
Olivier Lambert
e399dfa7e6 fix permissions issues 2015-06-02 18:13:54 +02:00
Olivier Lambert
787f95ac3a 4.0.1 2015-06-01 10:45:29 +02:00
Fabrice Marsaud
d2f35d46d2 Fix for xo-web Issue #264 password not saving 2015-06-01 09:34:56 +02:00
Julien Fontanet
b21d078c5d 4.0.0 2015-05-29 16:14:39 +02:00
Julien Fontanet
032c3fb856 Merge branch 'next-release' 2015-05-29 16:14:22 +02:00
Julien Fontanet
bbd79379ce Remove unused import. 2015-05-29 16:11:43 +02:00
Julien Fontanet
d01d544a0a Remove a fixed FIXME. 2015-05-29 15:23:53 +02:00
Julien Fontanet
01ecd76976 vm.ejectCd() succeed even if the VBD cannot be destroyed. 2015-05-29 15:23:36 +02:00
Julien Fontanet
26e8ae4bf3 position is now optional for vm.attachDisk(). 2015-05-29 11:55:59 +02:00
Julien Fontanet
3befdbc93d Fix group.setUsers(). 2015-05-29 10:21:49 +02:00
Olivier Lambert
c91a890d42 add ACLs in objects 2015-05-29 09:35:20 +02:00
Julien Fontanet
3369ab601a Stupide error -_-". 2015-05-28 23:26:07 +02:00
Julien Fontanet
bfe5b71f19 Various updates. 2015-05-28 23:12:32 +02:00
Julien Fontanet
eb25cf65dd acl.getCurrent() handles groups. 2015-05-28 22:42:57 +02:00
Julien Fontanet
aa1ca3be64 Various updates. 2015-05-28 22:32:30 +02:00
Julien Fontanet
a4e03daeee Various updates. 2015-05-28 22:14:20 +02:00
Julien Fontanet
cbd0b9db1d Users must also linked to their groups. 2015-05-28 20:47:42 +02:00
Julien Fontanet
621e8e89a5 Implements groups. 2015-05-28 19:26:16 +02:00
Julien Fontanet
c9eca5ec7e ACLs have a role and existing ACLs are automatically upadted. 2015-05-28 18:08:36 +02:00
Julien Fontanet
05063b76eb Initial role API. 2015-05-28 16:57:11 +02:00
Julien Fontanet
7d1d34d1eb Remove unused code. 2015-05-28 16:56:45 +02:00
Julien Fontanet
725f471a6a 0.7.2 2015-05-28 15:36:49 +02:00
Julien Fontanet
0b01a79d9d Implements object.messages. 2015-05-28 15:36:33 +02:00
Julien Fontanet
2653ff6536 Comment currently unused declarations. 2015-05-28 15:36:04 +02:00
Julien Fontanet
0f30cc8e59 Work around linter issue (eslint/espree#136). 2015-05-28 15:35:27 +02:00
Julien Fontanet
e3879cd4d1 Minor style fix. 2015-05-28 15:34:41 +02:00
Julien Fontanet
7a4cdf8688 Fix connection errors handling in Api#connect(). 2015-05-28 15:33:49 +02:00
Julien Fontanet
40423a0547 Set debug to xo:main only in production. 2015-05-28 14:57:04 +02:00
Julien Fontanet
682804b1ad Fix consoles proxy. 2015-05-28 12:45:37 +02:00
Julien Fontanet
790e67866c Fix VM-template.template_info.disks. 2015-05-28 12:25:59 +02:00
Julien Fontanet
8399edb4dc Fix vm.docker.version. 2015-05-28 11:42:30 +02:00
Julien Fontanet
55a1c27d6d Fix VIF creation. 2015-05-28 11:42:13 +02:00
Julien Fontanet
35bf7dc484 Better message when a object param is not found. 2015-05-28 11:41:51 +02:00
Julien Fontanet
4d3dfa1dca Typo. 2015-05-27 19:27:37 +02:00
Olivier Lambert
ac4686125f fix RRD fetching on VM view 2015-05-27 18:49:07 +02:00
Olivier Lambert
fb2ca3bb19 fix CPU parsing error in RRD 2015-05-27 18:43:26 +02:00
Julien Fontanet
c0122aace7 Various fixes. 2015-05-27 18:25:24 +02:00
Fabrice Marsaud
c141e92cc4 Group managment for ACLs (Mock. No implementation) 2015-05-27 17:22:07 +02:00
Julien Fontanet
c92567d4fa 0.5.5 2015-05-27 17:04:04 +02:00
Julien Fontanet
1839bf938a 0.7.1 2015-05-27 17:02:25 +02:00
Julien Fontanet
5236441be0 New collection! 2015-05-27 17:00:35 +02:00
Julien Fontanet
44d4096a79 Remove a console.log(). 2015-05-27 14:07:14 +02:00
Julien Fontanet
41280c9d38 Various updates. 2015-05-27 12:18:41 +02:00
Olivier Lambert
94620748ab filter IOPS 2015-05-27 10:56:14 +02:00
Julien Fontanet
da70c03845 Use correct HTTP status code
See https://tools.ietf.org/html/rfc7231#section-6.5.10
2015-05-27 10:33:57 +02:00
Olivier Lambert
337eb0f27b remove useless debug 2015-05-26 19:57:10 +02:00
Olivier Lambert
26a63c4baf optimize the stats code 2015-05-26 19:43:51 +02:00
Julien Fontanet
8b03890f2a New util extractProperty() and some tests. 2015-05-26 17:59:52 +02:00
Julien Fontanet
df3c76fa72 Remove useless statement. 2015-05-26 16:47:14 +02:00
Julien Fontanet
cea4157402 Perf traces in the CLI. 2015-05-26 16:35:51 +02:00
Julien Fontanet
61731e2c2e Detect blocked event loop. 2015-05-26 11:57:49 +02:00
Julien Fontanet
5c1611c484 @autobind decorator. 2015-05-25 16:50:27 +02:00
Julien Fontanet
a502965d19 Fix syntax. 2015-05-25 15:29:42 +02:00
Julien Fontanet
b55764db56 More code in Xapi. 2015-05-25 15:20:59 +02:00
Julien Fontanet
510897f672 Display error stack if available in Xo#_handleHttpRequest(). 2015-05-25 14:56:40 +02:00
Julien Fontanet
2689fd17d0 Correctly forward req & res in Xo#_handleHttpRequest(). 2015-05-25 14:56:06 +02:00
Julien Fontanet
75e3949cec Expose patch UUID. 2015-05-25 14:49:19 +02:00
Julien Fontanet
a7bb4b7104 Check for patch existence in Xapi#_getOrUploadPoolPatch(). 2015-05-25 14:44:15 +02:00
Julien Fontanet
9bcb2ac094 Fix snapshot deletion after VM export. 2015-05-25 12:51:42 +02:00
Julien Fontanet
9ab110277a Do not include conflicting patches in Xapi#listMissingPoolPatchesOnHost(). 2015-05-25 12:03:29 +02:00
Olivier Lambert
d1506bcdae start to work on patches conflicts and dependencies 2015-05-25 11:24:49 +02:00
Julien Fontanet
00c38c96cd Remove now unneeded code. 2015-05-25 10:51:58 +02:00
Julien Fontanet
9798d4ff6a Update deps. 2015-05-24 18:55:30 +02:00
Julien Fontanet
5801b29ede Do not crash when the console URL cannot be found. 2015-05-24 16:51:51 +02:00
Julien Fontanet
22ed022787 Updates @julien-f/json-rpc to 0.4.4. 2015-05-24 16:22:38 +02:00
Julien Fontanet
f7e7ecf5ae Minor coding style fix. 2015-05-24 15:24:27 +02:00
Julien Fontanet
c116d3f453 Use babel-standard instead of standard. 2015-05-24 15:24:18 +02:00
Julien Fontanet
d9b3d263ae Remove no longer used xo.$running_VMs. 2015-05-24 15:23:01 +02:00
Julien Fontanet
7c54adec9d 0.3.2 2015-05-24 14:41:22 +02:00
Julien Fontanet
68abd91fc2 Api#close() returns a promise. 2015-05-24 14:41:01 +02:00
Julien Fontanet
4d2e42d244 One more Angular work around. 2015-05-24 14:39:48 +02:00
Julien Fontanet
5a87a6c502 This lib is not ES6! 2015-05-22 16:41:33 +02:00
Julien Fontanet
9a265a0437 New API method: test.wait(). 2015-05-22 16:37:26 +02:00
Julien Fontanet
d8ca15ceb3 Fix objects removal. 2015-05-22 15:12:22 +02:00
Julien Fontanet
a17f718517 Update xo-collection to 0.3.1. 2015-05-22 14:53:52 +02:00
Julien Fontanet
3589dda8ee Remove ugly hack. 2015-05-22 14:52:27 +02:00
Julien Fontanet
21f8e4d55b Remove unused UUID index. 2015-05-22 14:52:19 +02:00
Julien Fontanet
811e0123c9 0.3.1 2015-05-22 14:46:46 +02:00
Julien Fontanet
47c4516060 Index & UniqueIndex: Correctly updates even if the hash has not changed. 2015-05-22 14:46:20 +02:00
Julien Fontanet
16450e2133 Remove useless statement. 2015-05-22 11:58:31 +02:00
Julien Fontanet
5678742810 Fix SR editing. 2015-05-22 11:58:19 +02:00
Julien Fontanet
29ce3bd05e Source maps support in the CLI. 2015-05-22 10:38:38 +02:00
Julien Fontanet
b3d58f4f0c Update to xo-collection 0.3. 2015-05-22 10:38:08 +02:00
Julien Fontanet
76d551a238 Move consoles in /api/consoles/ 2015-05-20 10:28:22 +02:00
Julien Fontanet
5467c4b1b8 Fix proxy URLs generation (fix #58). 2015-05-19 18:40:49 +02:00
Julien Fontanet
e48d277440 SPDX valid license. 2015-05-19 17:45:02 +02:00
Julien Fontanet
13913334b6 0.7.0 2015-05-19 16:48:19 +02:00
Julien Fontanet
7f60725c88 Make it work with current version of xo-web. 2015-05-19 16:48:03 +02:00
Julien Fontanet
d55fb36182 0.3.0 2015-05-19 16:39:54 +02:00
Julien Fontanet
41205aef20 Work around xo-web bug due to Angular. 2015-05-19 16:38:02 +02:00
Julien Fontanet
aeadbc1d58 Minor standardization. 2015-05-19 16:35:23 +02:00
Julien Fontanet
bd12ade426 UniqueIndex only expose the values of contained items. 2015-05-19 16:34:48 +02:00
Julien Fontanet
f9c26089cd Document exceptions. 2015-05-19 15:25:44 +02:00
Julien Fontanet
7ddb57078c Finish event. 2015-05-19 15:25:30 +02:00
Julien Fontanet
3e7f1275d8 Remove unnecessary array. 2015-05-19 14:43:16 +02:00
Julien Fontanet
e963938016 Do not attach collection to index if duplicate. 2015-05-19 14:42:11 +02:00
Julien Fontanet
9d1da81557 Remove unnecessary traces. 2015-05-19 13:03:12 +02:00
Julien Fontanet
91f557ac9e TODO: sort proxies by descending prefix length. 2015-05-19 12:59:02 +02:00
Julien Fontanet
452826bd61 Missing token is not a auth provider bug. 2015-05-19 12:58:46 +02:00
Julien Fontanet
84564bb7fb WS proxy forwards the subprotocol. 2015-05-19 12:56:06 +02:00
Julien Fontanet
bf7647c737 WS proxy correctly handle subpaths. 2015-05-19 12:55:46 +02:00
Julien Fontanet
1f98d7e5ec HTTP proxy correctly handle subpaths. 2015-05-19 12:55:35 +02:00
Julien Fontanet
e4486f4c17 Fix send error messages in wsProxy. 2015-05-19 12:31:14 +02:00
Julien Fontanet
65daa23a74 Do not set rejectUnauthorized by default in wsProxy. 2015-05-19 12:27:02 +02:00
Julien Fontanet
523a30afb4 Fix initial user creation (fix #57). 2015-05-19 09:54:57 +02:00
Julien Fontanet
1d0de4584e Fix session.getUser(). 2015-05-18 11:56:37 +02:00
Julien Fontanet
7aac124407 Forward the upgrade event to connect. 2015-05-18 11:15:29 +02:00
Olivier Lambert
03e8b664ac add host stats 2015-05-17 23:08:16 +02:00
Julien Fontanet
312fcea5f1 Auto links. 2015-05-15 18:08:21 +02:00
Julien Fontanet
66883ae37c Remove discouraged path for the config file from the doc. 2015-05-15 11:47:18 +02:00
Julien Fontanet
9d05653f5b Use xo-collection. 2015-05-14 17:19:28 +02:00
Julien Fontanet
644ebd0a4f 0.2.1 2015-05-14 17:18:12 +02:00
Julien Fontanet
1033bfcfe5 Add missing files. 2015-05-14 17:16:35 +02:00
Julien Fontanet
2a075d929a Xapi#_setObjectProperties() gets the object type itself. 2015-05-14 15:53:54 +02:00
Julien Fontanet
d93d234c71 Fix Travis badge. 2015-05-14 15:06:27 +02:00
Julien Fontanet
7fe9ae8a04 Document custom props. 2015-05-14 15:04:55 +02:00
Julien Fontanet
87cf1ed7cb All custom properties are read-only and non enumerable. 2015-05-14 14:58:54 +02:00
Julien Fontanet
a0ba5c8a57 Fix auto links for arrays. 2015-05-14 14:58:27 +02:00
Julien Fontanet
d7208a15d9 Remove unused dep. 2015-05-14 14:46:06 +02:00
Julien Fontanet
debde0c67a Links do not shadow refs. 2015-05-14 14:39:36 +02:00
Julien Fontanet
97db55156a $pool should not be enumerable. 2015-05-13 17:29:24 +02:00
Julien Fontanet
9d3477d465 Fix propagation of Xapi errors. 2015-05-13 17:27:22 +02:00
Olivier Lambert
41147483d8 remove old docker method in VM and add the bootOrder method 2015-05-13 15:25:36 +02:00
Julien Fontanet
ca517784ed Fix many errors and styles. 2015-05-13 14:27:14 +02:00
Julien Fontanet
4dd3be1568 ACLs functions moved to Xo. 2015-05-13 12:00:01 +02:00
Julien Fontanet
7412d97bf3 Do not attempt to set up proxies if there are none. 2015-05-13 10:33:00 +02:00
Fabrice Marsaud
ab7b2da83b Mixed missing error import 2015-05-13 10:05:05 +02:00
Julien Fontanet
19e26729a8 Correctly initialize Xo#_httpRequestWatchers. 2015-05-12 18:49:40 +02:00
Julien Fontanet
0101365ebc Configurable proxies. 2015-05-12 18:45:21 +02:00
Julien Fontanet
1f56e63f9c Comments. 2015-05-12 18:24:52 +02:00
Julien Fontanet
883a30c7ad Patch upload reworked. 2015-05-12 17:34:13 +02:00
Julien Fontanet
6e151a9f8b Properties settings moved into xapi.js 2015-05-12 17:08:38 +02:00
Julien Fontanet
321bb299b1 Fix grammar in error message. 2015-05-12 17:03:58 +02:00
Julien Fontanet
2ca18340c7 Remove 2 unused imports. 2015-05-12 14:07:16 +02:00
Julien Fontanet
74d4237913 Fix docker methods. 2015-05-12 12:52:29 +02:00
Olivier Lambert
a4f9b9208d fix registration 2015-05-09 11:43:21 +02:00
Olivier Lambert
8fd65b7365 replace unregister by deregister 2015-05-09 00:29:16 +02:00
Olivier Lambert
4f4d0bf6aa work in progress. Find where (un)register raise UNKNOWN_XENAPI_PLUGIN_FUNCTION. Because it shouldn't. 2015-05-09 00:26:14 +02:00
Olivier Lambert
873e2aed94 enable/disable docker and more robust spec with XML parsing for docker stuff 2015-05-08 19:03:25 +02:00
Olivier Lambert
89d485e188 remove typo in id 2015-05-08 16:12:15 +02:00
Julien Fontanet
2e9870014f Fix docker.*() functions export. 2015-05-08 16:02:46 +02:00
Julien Fontanet
528529c0d1 docker.*() methods. 2015-05-08 15:51:53 +02:00
Olivier Lambert
9bddec2dfd first Docker attempt 2015-05-08 15:37:30 +02:00
Olivier Lambert
f986487df9 Update README.md 2015-05-07 19:42:34 +02:00
Julien Fontanet
031af000e6 Alias Object.create() and Object.defineProperty() for perf. 2015-05-06 18:14:43 +02:00
Julien Fontanet
0512fac3aa Better name for the OpaqueRef regex constant. 2015-05-06 18:14:20 +02:00
Julien Fontanet
99461a70e6 Remove useless $coroutine. 2015-05-06 17:53:36 +02:00
Julien Fontanet
adbbb15a92 Fix possibly long standing bug in Api#call(). 2015-05-06 17:53:20 +02:00
Julien Fontanet
d85a4c9ad4 Fix patch upload! 2015-05-06 17:37:31 +02:00
Julien Fontanet
41baea780a Xapi#_watchTask() unpack the ref if necessary. 2015-05-06 17:23:38 +02:00
Julien Fontanet
a165884bcb Fix debug message. 2015-05-06 17:23:17 +02:00
Julien Fontanet
456adc5d0b Add missing Error class. 2015-05-06 17:22:46 +02:00
Julien Fontanet
cfc42906b9 Add debug traces for patch install. 2015-05-06 16:49:26 +02:00
Julien Fontanet
738d657c8e Fix copy pasta -_-". 2015-05-06 16:19:17 +02:00
Julien Fontanet
a51452ee7c Remove unused var. 2015-05-06 16:13:58 +02:00
Julien Fontanet
5d2a41082a Fix server management due to f*** merge. 2015-05-06 16:06:04 +02:00
Julien Fontanet
f9dd00b79b Do not XO & XAPI objects. 2015-05-06 15:36:27 +02:00
Olivier Lambert
898244d04d link pool_patches to a pool 2015-05-06 15:34:57 +02:00
Julien Fontanet
33334830cc Various fixes. 2015-05-06 15:33:09 +02:00
Julien Fontanet
8503350bfd Missing dep (xo-collection). 2015-05-06 15:01:59 +02:00
Julien Fontanet
a4bb2aaf12 Missing file. 2015-05-06 15:01:26 +02:00
Julien Fontanet
da443045bf Merge branch 'patch' into next-release 2015-05-06 14:50:40 +02:00
Julien Fontanet
b9927cd48d pool.installPatch() & host.installPatch(). 2015-05-06 14:33:49 +02:00
Julien Fontanet
4272e8196a Bypass Xapi#objects getter internally for perf. 2015-05-06 14:08:59 +02:00
Julien Fontanet
140f9d05df Code style and comments. 2015-05-06 14:06:25 +02:00
Julien Fontanet
9222733243 Xapi#getObject() 2015-05-06 14:06:17 +02:00
Julien Fontanet
5838c56c4e Xapi#getObjectByRef() and Xapi#getObjectByUuid() 2015-05-06 13:27:59 +02:00
Julien Fontanet
7af3f7e881 Xapi#_getXenUpdates() should be static. 2015-05-06 10:54:28 +02:00
Julien Fontanet
ee81febc89 Fix @debounce to work correctly with multiple instances. 2015-05-06 10:54:10 +02:00
Julien Fontanet
8146bee846 Upload to pool master. 2015-05-05 19:00:22 +02:00
Julien Fontanet
53e94378ae Correctly handle patch upload error. 2015-05-05 19:00:22 +02:00
Julien Fontanet
8592ead0e3 Missing import. 2015-05-05 19:00:22 +02:00
Olivier Lambert
67699372f2 add url parameter 2015-05-05 18:44:29 +02:00
Julien Fontanet
95a8ced558 Modularize. 2015-05-05 18:42:02 +02:00
Julien Fontanet
ae437be6e7 Memoize Xapi#listMissingHostPatches() 2015-05-05 18:41:47 +02:00
Julien Fontanet
1441d9f4ee host.listMissingPatches() & host.installPatchFromUrl(). 2015-05-05 17:06:52 +02:00
Julien Fontanet
1814e0a260 0.5.4 2015-05-05 13:46:03 +02:00
Julien Fontanet
711c5781e6 Export wrapError(). 2015-05-05 13:45:51 +02:00
Julien Fontanet
adeb5c2344 Put high level Xen Server features in dedicated class. 2015-05-05 11:40:25 +02:00
Julien Fontanet
f0b0277b9d Fix Xen error handling (#56). 2015-05-05 10:24:13 +02:00
Julien Fontanet
a688310b95 Remove thisArg param. 2015-05-04 17:34:02 +02:00
Olivier Lambert
6fb5fb63e7 allow to patch one host only and not the whole pool 2015-05-02 18:14:50 +02:00
Olivier Lambert
5330cc5ae9 fix a typo 2015-05-02 14:04:14 +02:00
Julien Fontanet
bcc2244fdb Various updates. 2015-04-30 18:31:42 +02:00
Julien Fontanet
ad2de95f32 Various updates. 2015-04-30 17:45:53 +02:00
Julien Fontanet
e3ffc8784e Use shared module instead of custom isNotEmpty(). 2015-04-30 11:45:14 +02:00
Julien Fontanet
bb35fc3801 Fix README title. 2015-04-30 11:44:53 +02:00
Julien Fontanet
c804630576 0.2.0 2015-04-29 18:17:39 +02:00
Julien Fontanet
e5f3ca1623 Initial UniqueIndex. 2015-04-29 17:51:18 +02:00
Olivier Lambert
453dee33ba initial Docker control 2015-04-29 17:27:53 +02:00
Julien Fontanet
0880787d68 new Index() now accepts a computeHash() callback-ish. 2015-04-29 14:33:37 +02:00
Julien Fontanet
cd582e2e3a Rename Index#itemsByHash to Index#items. 2015-04-29 14:12:22 +02:00
Julien Fontanet
aebd9319f5 Comments in Collection#_onUpdate(). 2015-04-29 13:22:36 +02:00
Julien Fontanet
de6cbb0f45 Fix Index#sweep(). 2015-04-29 13:22:36 +02:00
Julien Fontanet
e14dcd0184 Put some utils in their own modules. 2015-04-29 13:22:30 +02:00
Julien Fontanet
17ef653903 0.1.1 2015-04-28 17:10:58 +02:00
Julien Fontanet
f5d5b5efc0 Make View and Index requireable. 2015-04-28 17:10:31 +02:00
Julien Fontanet
59dbee8f28 Minor doc about views. 2015-04-28 17:06:37 +02:00
Julien Fontanet
13f36b3f79 Various code simplifications and fixes. 2015-04-28 15:47:26 +02:00
Julien Fontanet
719b63ee02 Typo. 2015-04-28 14:44:44 +02:00
Julien Fontanet
38a5698f90 Use async functions instead of Bluebird.coroutine(). 2015-04-28 14:36:16 +02:00
Julien Fontanet
4db6971cc4 0.3.2 2015-04-28 14:06:08 +02:00
Julien Fontanet
71482bd06c Correctly build the package. 2015-04-28 14:05:47 +02:00
Julien Fontanet
c3acf8341b 0.3.1 2015-04-28 13:25:03 +02:00
Julien Fontanet
a05b60f48e Remove no-lone-blocks directive which is no longer needed. 2015-04-28 13:06:57 +02:00
Julien Fontanet
8694ecd417 xo: CoffeeScript to ES6 and split in multiple files. 2015-04-28 13:06:26 +02:00
Julien Fontanet
1bc48fbf96 0.1.0 2015-04-27 15:27:12 +02:00
Julien Fontanet
d45348c167 Minor fixes. 2015-04-27 15:09:07 +02:00
Julien Fontanet
22caa0ee66 Initial Index implementation (see #1). 2015-04-27 15:05:02 +02:00
Julien Fontanet
e6e8ccc855 Remove standard from npm test.
Currently broken du to due to eslint/espree#123
2015-04-27 15:04:52 +02:00
Julien Fontanet
d78522f5e1 Comment doc for Collection#getId(). 2015-04-27 12:14:30 +02:00
Julien Fontanet
3da2a618b9 Coding style. 2015-04-27 10:55:22 +02:00
Julien Fontanet
100d007271 3.9.2 2015-04-26 11:29:09 +02:00
Julien Fontanet
a1a764d807 Fix json-rpc dep. 2015-04-26 11:28:53 +02:00
Julien Fontanet
047fa5b2db Fix checkCertificate (thx @wrigby). 2015-04-26 11:16:15 +02:00
Julien Fontanet
6cb30adf5d helpers.spec: CoffeeScript to ES6. 2015-04-24 17:52:05 +02:00
Julien Fontanet
9eb939e38f helpers: CoffeeScript to ES6. 2015-04-24 17:16:43 +02:00
Julien Fontanet
3e26060979 fibers-urils: CoffeeScript to ES6 and tests fixed. 2015-04-24 14:01:12 +02:00
Julien Fontanet
cc60aa7b84 Remove Coffeelint as it is not really used. 2015-04-24 11:23:04 +02:00
Julien Fontanet
c763794ef3 Install json-rpc from the npm repository. 2015-04-24 11:21:15 +02:00
Julien Fontanet
bdfdafaec0 Install json-rpc from the npm repository. 2015-04-24 10:58:49 +02:00
Julien Fontanet
7737dc6b6c Convert last ES5 files to ES6. 2015-04-22 14:28:30 +02:00
Julien Fontanet
1a89465201 Replace AMAP var by const. 2015-04-22 14:10:04 +02:00
Julien Fontanet
7a4dcd52c4 0.3.0 2015-04-21 17:52:07 +02:00
Julien Fontanet
e8e7a92131 Minor README updates. 2015-04-21 17:48:26 +02:00
Julien Fontanet
7e8c2211d8 The REPL waits for promise completion. 2015-04-21 17:20:38 +02:00
Julien Fontanet
99694161e1 The REPL waits for promise completion. 2015-04-21 17:17:00 +02:00
Julien Fontanet
fe3ce45b8e Remove unused dep. 2015-04-21 14:40:12 +02:00
Julien Fontanet
7af0883f08 gulp-sourcemaps is a dev dep. 2015-04-21 14:39:20 +02:00
Julien Fontanet
f48c21b124 Remove unused code. 2015-04-21 14:38:21 +02:00
Julien Fontanet
abc2e74f2c 3.9.1 2015-04-21 11:10:11 +02:00
Julien Fontanet
6130c49b83 Merge branch 'next-release' 2015-04-21 11:10:05 +02:00
Julien Fontanet
433b58511c Fix VM_guest_metrics. 2015-04-20 19:47:58 +02:00
Julien Fontanet
f0858b7d93 0.5.3 2015-04-20 19:14:48 +02:00
Julien Fontanet
3af6c28ab0 Do not swallow all errors. 2015-04-20 19:01:05 +02:00
Julien Fontanet
5c31c7f14c Typo! 2015-04-20 19:00:52 +02:00
Olivier Lambert
b04111c79b add snapshot type for certain VM actions 2015-04-20 18:30:26 +02:00
Olivier Lambert
06ca0079b3 better error message if host unreach 2015-04-20 18:30:02 +02:00
Julien Fontanet
ff53c6b49d 3.9.0 2015-04-20 17:40:09 +02:00
Julien Fontanet
da58458fb7 Merge branch 'next-release' 2015-04-20 17:40:01 +02:00
Julien Fontanet
1a21989ad1 Use lodash.includes instead of lodash.contains. 2015-04-20 16:26:14 +02:00
Julien Fontanet
2610a9c777 0.5.2 2015-04-20 15:19:06 +02:00
Julien Fontanet
58cf611497 Fix this._sessionId. 2015-04-20 15:18:48 +02:00
Julien Fontanet
76d54b8914 Update to make-error v1. 2015-04-20 12:58:46 +02:00
Julien Fontanet
00f944f3f4 Remove unused import. 2015-04-19 00:42:02 +02:00
Julien Fontanet
1269411771 Add iteration to the README. 2015-04-18 22:33:32 +02:00
Julien Fontanet
d4d8ea6cf2 Collection #getId() renamed to getKey(). 2015-04-18 22:20:57 +02:00
Julien Fontanet
160522c520 Collection iteration more similar to Map. 2015-04-18 22:04:37 +02:00
Julien Fontanet
7024b5ec1b Reorganization of Collection code. 2015-04-18 21:58:17 +02:00
Julien Fontanet
5b020035d6 Collection is iterable. 2015-04-18 21:34:36 +02:00
Julien Fontanet
fcea7fd4bf mkdir -p is more portable. 2015-04-18 19:37:04 +02:00
Julien Fontanet
d22d64f68c Minor fixes. 2015-04-18 19:35:27 +02:00
Julien Fontanet
580ae005f4 Fix some compilation errors. 2015-04-18 19:35:18 +02:00
Julien Fontanet
75ab9d2e8c Use Babel 5. 2015-04-18 19:34:58 +02:00
Julien Fontanet
37e5bcad61 Minor style fixes. 2015-04-18 12:37:02 +02:00
Julien Fontanet
20679a62fd Merge pull request #1 from wrigby/tls_options
Ability to ignore SSL/TLS certs errors and to specify custom CAs.
2015-04-17 21:15:10 +02:00
Julien Fontanet
bb5a5bf2ed Merge pull request #2 from wrigby/fix-osx-build
`mkdir -p` is more portable
2015-04-17 21:02:36 +02:00
Julien Fontanet
c1db993b92 Fix missing quotes. 2015-04-17 16:25:18 +02:00
Julien Fontanet
61631e405b Coding style. 2015-04-17 16:22:23 +02:00
Julien Fontanet
c19916ff1c Add CLI. 2015-04-17 14:05:49 +02:00
Julien Fontanet
6fa2e79c1c Use standard code style. 2015-04-17 13:35:33 +02:00
Julien Fontanet
185e0849b1 0.5.1 2015-04-17 12:04:06 +02:00
Julien Fontanet
f48b9d364b Shebang and executable mode for cli.js 2015-04-17 12:04:01 +02:00
Julien Fontanet
e4f1a7d4c1 0.5.0 2015-04-17 11:58:08 +02:00
Julien Fontanet
e02f19ff67 Typo. 2015-04-17 11:58:05 +02:00
Julien Fontanet
72a2110845 Add CLI. 2015-04-17 10:38:15 +02:00
Julien Fontanet
9baa415249 0.4.0 2015-04-16 16:44:05 +02:00
Julien Fontanet
22b840af14 Add a description. 2015-04-16 16:43:15 +02:00
Julien Fontanet
61f32d89ca Declare Xapi#_pool in the constructor for perf. 2015-04-16 16:34:09 +02:00
Julien Fontanet
3c7da93dfc Xapi#_poolId is no longer used. 2015-04-16 16:33:45 +02:00
Julien Fontanet
5831616fac Merge branch 'linked-objects' 2015-04-16 16:30:46 +02:00
Julien Fontanet
d7b6d9f124 Objects are now linked together!
```javascript
const {pool} = xapi

console.log(pool.master.name_label)
```
2015-04-16 16:22:01 +02:00
Will Rigby
6e7588e9fc Fix npm scripts on OS X
BSD's mkdir doesn't support the long --parents flag.
2015-04-16 01:03:20 -04:00
Will Rigby
03cc8248bc Update documentation 2015-04-16 00:59:29 -04:00
Will Rigby
068df6f2b1 Support specifying path(s) to CA certificate(s)
Wires the 'ca_certificates' configuration option
through to tls.connect's 'ca' option.
2015-04-16 00:48:04 -04:00
Will Rigby
0966ba909b Allow connecting to SSL-secured servers with self-signed certificates
Adds a new configuration parameter ('check_certificate'),
which gets wired up to the rejectUnauthorized option of
tls.connect.
2015-04-16 00:25:55 -04:00
Fabrice Marsaud
6c246768e9 Fixed broken graphs after reboot #228 2015-04-15 18:45:16 +02:00
Julien Fontanet
245978e2b3 0.3.1 2015-04-15 18:27:02 +02:00
Julien Fontanet
3aae60bde9 Better handling of transport call retries. 2015-04-15 18:23:49 +02:00
Julien Fontanet
7941a24d51 Force npm test to be successful before committing. 2015-04-15 15:16:28 +02:00
Olivier Lambert
bc75bc199b remove admin permission for stats 2015-04-15 14:19:08 +02:00
Julien Fontanet
91d36122eb Rmove unused JSHint conf. 2015-04-15 10:46:25 +02:00
Julien Fontanet
e004ba63f8 Remove unused JSHint conf. 2015-04-15 10:46:09 +02:00
Julien Fontanet
f234b6a540 Better error message when authentication fails in server.connect(). 2015-04-14 18:15:21 +02:00
Julien Fontanet
36c1e2cc73 Limit tries in case of transport errors (ugly). 2015-04-14 17:57:31 +02:00
Julien Fontanet
4a0a09ba3e Update to latest make-error. 2015-04-14 17:56:51 +02:00
Julien Fontanet
bff8bfea7b server.add() does not wait for the connection. 2015-04-14 17:01:08 +02:00
Julien Fontanet
48bf0d1942 Do not compact the dev build. 2015-04-14 15:24:52 +02:00
Julien Fontanet
04bbb84845 Typos. 2015-04-14 15:24:28 +02:00
Julien Fontanet
1f30a19566 Improved view example. 2015-04-14 12:18:29 +02:00
Julien Fontanet
51f4578a41 View handles existing items. 2015-04-14 12:18:24 +02:00
Julien Fontanet
311f8cd00f pool.$id not pool.id!! 2015-04-14 11:45:06 +02:00
Julien Fontanet
ed0ab78048 Better error messages in XO#getXAPI(). 2015-04-14 11:40:46 +02:00
Julien Fontanet
bd3954a5f1 Rename index.* to collection.*. 2015-04-14 10:47:47 +02:00
Julien Fontanet
94967add7c Merge branch 'views' 2015-04-14 10:25:49 +02:00
Julien Fontanet
783ab0b611 Initial view implementation (fix #3). 2015-04-13 20:23:43 +02:00
Julien Fontanet
0eec1c1f61 Use standard style. 2015-04-13 18:33:15 +02:00
Julien Fontanet
b4a3b832dc Update to latest xen-api. 2015-04-13 17:47:16 +02:00
Julien Fontanet
04b44cff2b 0.3.0 2015-04-13 17:44:55 +02:00
Julien Fontanet
8309755ee3 Expose session identifier. 2015-04-13 17:44:05 +02:00
Julien Fontanet
8e7830dd7d Minor fixes. 2015-04-13 16:50:00 +02:00
Julien Fontanet
41a75d404c 0.2.1 2015-04-13 16:48:45 +02:00
Julien Fontanet
8eb63de201 Stupid fix -_-". 2015-04-13 16:48:32 +02:00
Julien Fontanet
1dec134a6b 0.2.0 2015-04-13 16:42:58 +02:00
Julien Fontanet
6f6a8e4bb1 Do not require params to be in an array. 2015-04-13 16:42:30 +02:00
Julien Fontanet
d32a18d965 Increment VIF # when creating a VM (fix #229). 2015-04-13 16:27:53 +02:00
Julien Fontanet
7d00d47cb6 Port XAPI code to xen-api. 2015-04-13 16:21:44 +02:00
Julien Fontanet
b0853eb119 ES6 style. 2015-04-13 16:21:44 +02:00
Julien Fontanet
25d29fb389 server: CoffeeScript → ES6. 2015-04-13 16:21:44 +02:00
Julien Fontanet
87d216c578 0.1.1 2015-04-13 16:17:53 +02:00
Julien Fontanet
bb0ee61870 Various fixes. 2015-04-13 16:16:30 +02:00
Julien Fontanet
653a9526f5 0.0.1 2015-04-13 14:54:19 +02:00
Julien Fontanet
34ac4b25af Test and fix #clear(). 2015-04-13 14:53:25 +02:00
Julien Fontanet
c7b7f9236f Default to secure if no protocol. 2015-04-13 14:13:56 +02:00
Julien Fontanet
881779744f 0.1.0 2015-04-13 13:34:31 +02:00
Julien Fontanet
ddf3356b5d Expose the pool object. 2015-04-13 13:27:29 +02:00
Olivier Lambert
ed241ede9d fix force reboot method 2015-04-13 13:12:13 +02:00
Julien Fontanet
94e8f3e2c1 Initial doc. 2015-04-10 17:12:59 +02:00
Julien Fontanet
2c4a7f48d1 Update package.json & README. 2015-04-10 16:49:00 +02:00
Julien Fontanet
af47c23ca1 Swallow any errors in #_watchEvents(). 2015-04-10 16:45:40 +02:00
Julien Fontanet
326a001c57 More log. 2015-04-10 16:41:59 +02:00
Julien Fontanet
fe9e548e89 #connect() & #disconnect(). 2015-04-10 16:41:43 +02:00
Julien Fontanet
e58ef1f436 connected/disconnected events. 2015-04-10 16:41:17 +02:00
Julien Fontanet
f249fa6f65 Minor fixes. 2015-04-10 16:40:45 +02:00
Julien Fontanet
68c6b63c9c Host is slave correctly handled. 2015-04-10 16:00:20 +02:00
Julien Fontanet
a249597225 Skip failing test for now. 2015-04-10 15:36:47 +02:00
Julien Fontanet
4906c677af Remove unused code. 2015-04-10 15:35:39 +02:00
Julien Fontanet
2534a9f14a _fetchObjects() is not necessary. 2015-04-10 15:34:10 +02:00
Julien Fontanet
5488c2bdeb Various updates. 2015-04-10 15:33:39 +02:00
Julien Fontanet
e072ff2d77 Update README.md 2015-04-10 11:51:54 +02:00
Julien Fontanet
41dfbc2709 Publish to npm as xo-collection. 2015-04-10 11:41:02 +02:00
Julien Fontanet
04a27d5778 Authentication providers can throw null. 2015-04-10 11:20:35 +02:00
Julien Fontanet
964e461597 Better Collection#_resolveItem(). 2015-04-10 10:51:01 +02:00
Julien Fontanet
ef2eec4c4a Minor build updates. 2015-04-10 10:50:23 +02:00
Julien Fontanet
bf1d76d853 Source map support for tests. 2015-04-10 10:49:25 +02:00
Julien Fontanet
0682cbd554 Test for Collection#touch(). 2015-04-10 10:49:08 +02:00
Julien Fontanet
f5191cdd42 Better error classes. 2015-04-10 10:48:47 +02:00
Julien Fontanet
b1c73208c5 Do not return this. 2015-04-08 16:33:28 +02:00
Julien Fontanet
ab221a465b Use lodash.foreach instead of native implementation. 2015-04-08 16:32:46 +02:00
Julien Fontanet
4ecfa0477d Optimize Collection#_touch(). 2015-04-08 14:30:16 +02:00
Julien Fontanet
bab2de36ad Tests for events deduplication. 2015-04-08 14:24:07 +02:00
Fabrice Marsaud
70a2067a06 Fixed date in vm stat data 2015-04-08 12:54:26 +02:00
Fabrice Marsaud
4a13c01817 First stat view delivery for #228 2015-04-08 12:54:26 +02:00
Fabrice Marsaud
151c2b573c vm stats code enhancment 2015-04-08 12:53:34 +02:00
Olivier Lambert
4cdb3f4c6a allow variable CPUs number 2015-04-08 12:53:34 +02:00
Olivier Lambert
3cf0384bc5 use a promise 2015-04-08 12:53:34 +02:00
Olivier Lambert
ad2f6ebe93 add npm dependencies 2015-04-08 12:53:34 +02:00
Olivier Lambert
178a429f26 start to work on RRD 2015-04-08 12:52:56 +02:00
Julien Fontanet
f479e914bb #getId() should behave even if the item is null or undefined. 2015-04-08 12:00:52 +02:00
Julien Fontanet
45441653f6 #bufferChanges() → #bufferEvents(). 2015-04-08 11:51:18 +02:00
Julien Fontanet
0303558ae1 Prefer the term of item over entry. 2015-04-08 11:49:25 +02:00
Julien Fontanet
b70e0e3e2b Tests for #add(), #update(), #set() and #remove() with an object. 2015-04-08 11:40:07 +02:00
Julien Fontanet
5e0c4d7b7a Avoid Function#apply() for performance. 2015-04-08 10:50:04 +02:00
Julien Fontanet
6c83308451 Optimize Collection#get(). 2015-04-08 10:48:27 +02:00
Julien Fontanet
eeb898179e Minor simplification of buffer flushing. 2015-04-08 10:42:00 +02:00
Julien Fontanet
0ea662d8fe Replace let by const where possible. 2015-04-08 10:05:41 +02:00
Julien Fontanet
ea3219fa10 Typo. 2015-04-08 10:04:58 +02:00
Julien Fontanet
fb9203d396 Fix doc: unset() → remove(). 2015-04-07 18:49:20 +02:00
Julien Fontanet
23e7542871 Document Collection#all. 2015-04-07 18:15:38 +02:00
Julien Fontanet
a40832dffd Typo. 2015-04-07 18:06:17 +02:00
Julien Fontanet
5ba7493613 Better repo architecture. 2015-04-07 18:01:33 +02:00
Julien Fontanet
e7b406c127 Initial commit. 2015-04-02 18:44:16 +02:00
Fabrice Marsaud
dd1d16f91c Fixes and enhancements 2015-04-02 16:49:40 +02:00
Julien Fontanet
82e2a19749 0.2.0 2015-04-02 16:34:21 +02:00
Julien Fontanet
b73126e6c1 README updates [skip ci]. 2015-04-02 16:34:11 +02:00
Fabrice Marsaud
cbd93f450e Implementation seems ok. Deeper tests to come 2015-04-02 15:32:08 +02:00
Fabrice Marsaud
35c64be3d7 All tests for "simple" buffer 2015-04-02 10:14:32 +02:00
Olivier Lambert
71194d5b4e use get dedicated call to avoid confusions between UUIDs and Refs 2015-04-01 21:54:34 +02:00
Olivier Lambert
771c530b85 add createNetwork method for issue https://github.com/vatesfr/xo-web/issues/225 2015-04-01 21:29:26 +02:00
Fabrice Marsaud
96ea70c027 Buffer implemented and tested 2015-04-01 18:06:23 +02:00
Julien Fontanet
ea277d0579 Add missing dev dep. 2015-04-01 16:35:51 +02:00
Julien Fontanet
10d7cd1520 Build sources in npm test. 2015-04-01 16:30:51 +02:00
Julien Fontanet
9051322338 Remove erroneous paste. 2015-04-01 16:16:35 +02:00
Julien Fontanet
d26b6103b5 Tweak ESLint. 2015-04-01 16:16:22 +02:00
Julien Fontanet
f2e7963e1f New implementation. 2015-04-01 16:08:40 +02:00
Olivier Lambert
78a6b622fb refactoring of VM auto power 2015-04-01 15:40:08 +02:00
Olivier Lambert
0177bbebe0 autopower VM feature, see https://github.com/vatesfr/xo-web/issues/224 2015-04-01 15:22:25 +02:00
Fabrice Marsaud
a3d7e541d3 Events implemented and tested, without buffering 2015-04-01 15:06:39 +02:00
Olivier Lambert
8deed4a9cd better handling of other_config value 2015-04-01 14:56:33 +02:00
Julien Fontanet
4617025bd4 Travis CI 2015-04-01 10:47:12 +02:00
Julien Fontanet
0693e19605 Unit tests. 2015-04-01 10:47:02 +02:00
Julien Fontanet
62618acfed ES6 & standard style 2015-04-01 10:46:38 +02:00
Julien Fontanet
1feaa43d2e Update license. 2015-04-01 10:45:37 +02:00
Fabrice Marsaud
92d7d61926 Various fixes and enhancements 2015-03-31 17:08:41 +02:00
Fabrice Marsaud
265d77d776 First main methods. No events, no buffer yet 2015-03-31 16:09:05 +02:00
Julien Fontanet
60b2576ce8 Fix #53. 2015-03-30 23:24:50 +02:00
Julien Fontanet
90cc58a8fe Fix authentication providers iteration. 2015-03-30 18:37:41 +02:00
Julien Fontanet
d79f750e30 Add missing files to distribution. 2015-03-30 18:09:36 +02:00
Julien Fontanet
9f9ab01508 Proper compilation phase (fix #50). 2015-03-30 17:58:13 +02:00
Olivier Lambert
4dc89c9082 add local LVM SR creation 2015-03-30 12:02:09 +02:00
Fabrice Marsaud
48d9fde3b6 Left over solution 2015-03-30 09:31:42 +02:00
Olivier Lambert
500349a8bd start to implement vgpus and pgpus 2015-03-29 14:25:08 +02:00
Olivier Lambert
e299f3e510 initial work on PCI attach devices 2015-03-29 01:48:48 +01:00
Fabrice Marsaud
a9ea1a02ed Use let and const 2015-03-27 16:43:43 +01:00
Fabrice Marsaud
19cd5c8881 Minor renaming 2015-03-27 15:55:37 +01:00
Fabrice Marsaud
cdb9c661bd A first version without unit tests, but a gross test script 2015-03-27 15:55:37 +01:00
Fabrice Marsaud
c3a01c240b First base 2015-03-27 15:55:37 +01:00
Fabrice Marsaud
e2f748e63d Initial commit 2015-03-27 15:51:06 +01:00
Julien Fontanet
6114f4644f 3.8.0 2015-03-27 15:13:15 +01:00
Julien Fontanet
eb664404e1 Update proxy-http-request. 2015-03-27 12:51:11 +01:00
Olivier Lambert
370f645cf0 add createInterface in VM object 2015-03-26 00:14:56 +01:00
Julien Fontanet
bd5b18a163 Minor changes. 2015-03-25 17:20:25 +01:00
Olivier Lambert
c51b0c6a41 add destroy task 2015-03-25 17:07:07 +01:00
Julien Fontanet
d56f6e75f9 Fix host.*(). 2015-03-25 15:22:24 +01:00
Olivier Lambert
c743348872 add setter for VBD position 2015-03-25 11:26:37 +01:00
Olivier Lambert
578049bfb6 fix wrong case VDI call 2015-03-23 15:56:24 +01:00
Julien Fontanet
564cd37628 Only send objects notifs to authenticated clients (2/2). 2015-03-20 13:37:35 +01:00
Julien Fontanet
60ecf91935 Only send objects notifs to authenticated clients. 2015-03-20 13:22:28 +01:00
Julien Fontanet
7b452e93b2 xo.getAllObjects() requires authentication. 2015-03-20 10:36:00 +01:00
Julien Fontanet
0bc1f7bf8c New disk.create(). 2015-03-19 17:17:03 +01:00
Olivier Lambert
62c2421d85 already implemented in vm with attach disk 2015-03-19 16:41:07 +01:00
Olivier Lambert
f2edf56d02 add method description 2015-03-19 16:27:52 +01:00
Olivier Lambert
376e5aeb45 add VBD create method 2015-03-19 16:23:04 +01:00
Julien Fontanet
3d1c7e0bc1 Fix sr.set(). 2015-03-19 15:18:10 +01:00
Julien Fontanet
a2603f882d Remove unused code in fiber-utils. 2015-03-19 14:31:47 +01:00
Julien Fontanet
0c1dcafc35 Cast model ids to string. 2015-03-19 13:24:05 +01:00
Julien Fontanet
d5108f8007 Remove dead code. 2015-03-19 13:23:42 +01:00
Julien Fontanet
ebeca9aa04 Fix token.create(). 2015-03-19 12:07:38 +01:00
Julien Fontanet
7307d9f7f1 Collection returns either an array of properties or an instance of Model. 2015-03-19 11:32:33 +01:00
Julien Fontanet
eac7cdae1c Fix handling of no password in PasswordAuthenticationProvider. 2015-03-19 11:24:21 +01:00
Julien Fontanet
7e548cb133 Coding style. 2015-03-19 11:23:51 +01:00
Julien Fontanet
0a61512fc7 Clean fiber-utils. 2015-03-19 11:05:30 +01:00
Julien Fontanet
52fa4f11ac 0.1.2 2015-03-18 18:21:44 +01:00
Julien Fontanet
479f2010a9 Restore session.signOut(). 2015-03-18 18:02:43 +01:00
Julien Fontanet
55796932c4 Better handling of plugin short names + Debug traces. 2015-03-18 17:38:59 +01:00
Julien Fontanet
bfcabd30c5 ldapjs is a production dependency! 2015-03-18 17:33:33 +01:00
Julien Fontanet
095ea470a1 0.1.1 2015-03-18 17:24:59 +01:00
Julien Fontanet
c9b502c72b Use YAML in config example. 2015-03-18 17:24:36 +01:00
Julien Fontanet
9390eacb7c Remove ES6 syntax. 2015-03-18 17:23:21 +01:00
Julien Fontanet
f193ce87bf 0.1.0 2015-03-18 17:10:58 +01:00
Julien Fontanet
9267adf79a Create an authenticated user if necessary. 2015-03-18 17:09:00 +01:00
Julien Fontanet
cc2f86cb06 A user can be created without a password. 2015-03-18 17:08:34 +01:00
Julien Fontanet
14c6895135 User permission default to none. 2015-03-18 17:08:19 +01:00
Julien Fontanet
83f6647352 Extend Babel ignore regexp. 2015-03-18 17:07:45 +01:00
Julien Fontanet
f6b3f898de Various fixes. 2015-03-18 17:07:19 +01:00
Julien Fontanet
792ecee399 FIXME: VM restarting is not properly handled in console. 2015-03-18 14:17:45 +01:00
Julien Fontanet
93a1ef6bdb session.getUser() description. 2015-03-18 14:16:59 +01:00
Julien Fontanet
62607b16f8 session.signIn() 2015-03-18 14:16:44 +01:00
Julien Fontanet
ca60376447 Password & Token auth providers. 2015-03-18 14:16:28 +01:00
Julien Fontanet
3cc4b5db79 Initial plugin system (#37). 2015-03-18 14:14:08 +01:00
Julien Fontanet
f8179c83e7 Fix signInWithPassword(). 2015-03-17 19:05:10 +01:00
Julien Fontanet
b2233f61e4 Use proxy-http-request. 2015-03-17 19:05:10 +01:00
Julien Fontanet
a7e2f776e4 Update deps. 2015-03-17 19:05:09 +01:00
Julien Fontanet
de5ba5d0d3 Initial commit. 2015-03-17 16:28:31 +01:00
Olivier Lambert
50d672892c Enable Babel for XO-Server files 2015-03-17 16:07:26 +01:00
Julien Fontanet
e6154db6e5 API session: CoffeeScript → ES6. 2015-03-09 15:28:20 +01:00
Julien Fontanet
34e8f57f7d 3.7.0 2015-03-06 17:04:46 +01:00
Julien Fontanet
4a8c089fa9 Merge branch 'next-release' 2015-03-06 17:02:38 +01:00
Julien Fontanet
b3aa5ee247 Fix various vm.*() methods. 2015-03-06 16:52:50 +01:00
Julien Fontanet
64bf98a7d3 Fix VM creation. 2015-03-06 16:45:30 +01:00
Julien Fontanet
e8e38beeb8 Fix task.cancel(). 2015-03-06 16:31:49 +01:00
Julien Fontanet
de96a96ac6 Use babel instead of legacy 6to5 for the test runner. 2015-03-06 15:32:38 +01:00
Julien Fontanet
ee3ad17163 Minor fix. 2015-03-06 15:31:25 +01:00
Julien Fontanet
fafd8a5d51 Fix sr.reattachIso(). 2015-03-06 15:30:33 +01:00
Julien Fontanet
c5879f17f8 ACLs for task.cancel(). 2015-03-06 15:30:23 +01:00
Julien Fontanet
999cbd314c Fix vif.connect(). 2015-03-06 15:21:15 +01:00
Julien Fontanet
a9d34a223a Fix VM-snapshot authorization. 2015-03-06 15:18:50 +01:00
Julien Fontanet
3381030ed5 Add VIF authorization. 2015-03-06 15:09:35 +01:00
Julien Fontanet
2bacc6cfe8 vm.clone() is only authorized for admins. 2015-03-06 15:09:22 +01:00
Julien Fontanet
973c936514 Fix VBD authorization. 2015-03-06 14:59:39 +01:00
Julien Fontanet
c5121a7fc5 More ACLs. 2015-03-06 14:55:25 +01:00
Julien Fontanet
37bf0f6b53 ACLs for message.*(). 2015-03-06 14:27:42 +01:00
Julien Fontanet
203d51cdbf ACLs for host.*(). 2015-03-06 14:15:17 +01:00
Julien Fontanet
9669d8eb8b ACLs for vm.*(). 2015-03-06 14:10:03 +01:00
Julien Fontanet
1b7571be5b Improve authorizations checking. 2015-03-06 14:10:03 +01:00
Julien Fontanet
614ff2a30e Update to latest http-server-plus. 2015-03-06 14:10:03 +01:00
Julien Fontanet
5b11671997 Snapshots inherit ACLs of their VM. 2015-03-06 14:10:03 +01:00
Julien Fontanet
5158e08901 Properly handle optional params in resolve. 2015-03-06 14:10:03 +01:00
Julien Fontanet
2cb9c7211e Some types do not require explicit authorization. 2015-03-06 14:10:03 +01:00
Olivier Lambert
24e26c95ff add reattach iso and fix reattach 2015-03-05 16:30:50 +01:00
Julien Fontanet
b8286af8fa Gracefully shutdown on SIGINT & SIGTERM. 2015-03-05 16:15:58 +01:00
Julien Fontanet
c539dd5570 0.6.3 2015-03-04 18:23:21 +01:00
Julien Fontanet
de76afea99 New implementation of Xo (fixes many issues). 2015-03-04 18:22:11 +01:00
Julien Fontanet
1d3616ae71 Minor changes. 2015-03-04 17:42:22 +01:00
Julien Fontanet
d76cb440f9 Move BackOff to its own module. 2015-03-04 17:42:18 +01:00
Julien Fontanet
7c89d658f7 Fix setScheduler(). 2015-03-04 17:37:12 +01:00
Olivier Lambert
735279c27c ACLization of SR object 2015-03-04 17:36:53 +01:00
Julien Fontanet
292c929117 Split code in to multiple files. 2015-03-04 17:31:14 +01:00
Olivier Lambert
d75be22d1f add reattach for iscsi and nfs 2015-03-04 17:09:57 +01:00
Olivier Lambert
40f1b1c665 add probeNfsExists and fix array 2015-03-04 16:53:56 +01:00
Julien Fontanet
daf42b63c8 Better back off implementation. 2015-03-04 16:18:57 +01:00
Julien Fontanet
07da03618f Use specific version of json-rpc. 2015-03-04 15:51:35 +01:00
Olivier Lambert
d076c875ed fix bad parameter name 2015-03-04 15:28:34 +01:00
Olivier Lambert
771c7fe863 fix serverPath parameter 2015-03-04 15:08:21 +01:00
Julien Fontanet
dda51f2801 Xo::call() should never through synchronously. 2015-03-04 15:01:30 +01:00
Julien Fontanet
25472bcfa6 Correctly catch some errors. 2015-03-04 15:01:03 +01:00
Olivier Lambert
369454c12a return UUID of createIscsi and createNfs created 2015-03-04 14:57:23 +01:00
Olivier Lambert
1784eacf58 ACLization of PIF object 2015-03-04 14:54:12 +01:00
Olivier Lambert
e86f5b3b7c return UUID of createISO created 2015-03-04 14:53:35 +01:00
Olivier Lambert
80ff6cda04 ACLization of PBD object 2015-03-04 14:24:58 +01:00
Julien Fontanet
dff96cfd95 Remove a proxy request after one use. 2015-03-04 14:04:16 +01:00
Julien Fontanet
31d244ef78 Remove an unnecessary import. 2015-03-04 14:04:16 +01:00
Olivier Lambert
8325a84ab2 fix typo in PBD class 2015-03-04 13:48:46 +01:00
Olivier Lambert
793839c7d5 new acl model for import 2015-03-03 19:28:46 +01:00
Olivier Lambert
23cf87dbc0 add requiered parameters 2015-03-03 11:53:04 +01:00
Julien Fontanet
7171de336d Remove an unnecessary import. 2015-03-02 13:31:45 +01:00
Julien Fontanet
e206cfe6d6 Fix acl.get(). 2015-03-02 13:31:17 +01:00
Julien Fontanet
1a71cc9223 Implement method.resolve
API methods can now have some of their objects automatically fetched:

```
method.resolve = {
	vm: ['vm', 'VM'],
};
```

The key is the name of the property with which the object will be
attached in the parameters dictionary, the first entry of the array is
the name of the parameter to use to fetch the object and the second
the expected type/types of the object.

Note that permissions are automatically checked via the ACLs.
2015-03-02 13:27:37 +01:00
Julien Fontanet
ed6fcf5ae7 Move ensureArray() in utils. 2015-02-27 17:31:11 +01:00
Olivier Lambert
bb31693a4d fix array check 2015-02-27 15:00:02 +01:00
Olivier Lambert
d15c8b16f3 add NFS SR 2015-02-26 23:15:58 +01:00
Olivier Lambert
8b9c932b80 add optionnal port 2015-02-26 22:34:52 +01:00
Olivier Lambert
c10e8f5f9a handle correctly iSCSI exists 2015-02-26 15:55:35 +01:00
Olivier Lambert
cd27e43994 iscsi target probe 2015-02-26 14:17:17 +01:00
Olivier Lambert
20614cf64b start to work on iscsi SR 2015-02-26 13:16:44 +01:00
Julien Fontanet
c69c02bcb3 formatXml() & parseXml(). 2015-02-26 12:58:27 +01:00
Julien Fontanet
21b177cbb4 Cannot use arrow function here. (fix #44) 2015-02-26 10:23:23 +01:00
Olivier Lambert
31a7e48768 add methods for SR: createIso, destroy and forget 2015-02-25 18:10:10 +01:00
Julien Fontanet
fd3d60ed7d Fix vdi.migrate() & vdi.delete() parameters. 2015-02-25 17:10:08 +01:00
Julien Fontanet
e2e369a463 Cannot use arrow functions. 2015-02-25 16:08:55 +01:00
Julien Fontanet
0c3304f041 API sr.*() converted to ES6. 2015-02-25 16:07:10 +01:00
Julien Fontanet
0d4b9b4bce Update Api code. 2015-02-24 18:28:56 +01:00
Julien Fontanet
1192bf6a87 The identifier of an object is its UUID not its ref. 2015-02-23 18:37:01 +01:00
Julien Fontanet
2366a91e8d Shameful typo (fix consoles). 2015-02-23 17:44:46 +01:00
Julien Fontanet
6ff17d16f0 0.6.2 2015-02-23 14:48:39 +01:00
Julien Fontanet
06b7116692 Never break object refs for Collection:all & Collection:indexes[*]. 2015-02-23 14:48:32 +01:00
Julien Fontanet
3c3ea0f3e1 Fix Collection::data. 2015-02-23 14:47:11 +01:00
Julien Fontanet
db4d6511d6 0.6.1 2015-02-23 12:25:53 +01:00
Julien Fontanet
6e42a67268 Update README. 2015-02-23 12:25:30 +01:00
Julien Fontanet
fd066e5eef Handle credentials directly in constructor. 2015-02-23 12:25:17 +01:00
Julien Fontanet
3dd0c44410 Handle string parameter in Xo constructor. 2015-02-23 12:24:47 +01:00
Julien Fontanet
12b42854e4 Delete useless example. 2015-02-23 12:23:42 +01:00
Julien Fontanet
2fcb6d0c7c 0.6.0 2015-02-23 12:11:53 +01:00
Julien Fontanet
68e863723a Explicitely handle sign in/out. 2015-02-23 12:10:45 +01:00
Julien Fontanet
d0b37d0f9a Update example. 2015-02-20 17:15:00 +01:00
Julien Fontanet
a0a1353445 Update collection API. 2015-02-20 17:14:44 +01:00
Julien Fontanet
2c4e46c630 Rename acl.* methods and always accept identifiers. 2015-02-19 16:28:16 +01:00
Julien Fontanet
a989e296b0 Missing file. 2015-02-19 12:54:53 +01:00
Julien Fontanet
26648dbcd2 Remove debug trace. 2015-02-19 12:46:44 +01:00
Julien Fontanet
147d759d35 Minor fixes. 2015-02-19 12:45:49 +01:00
Julien Fontanet
f6b07c5609 Remove no longer relevant comment. 2015-02-19 12:40:42 +01:00
Julien Fontanet
29fa7a053f Minor fixes. 2015-02-19 12:40:31 +01:00
Julien Fontanet
f380f245c6 Minor fix. 2015-02-18 16:06:40 +01:00
Julien Fontanet
1824a30cde 6to5 has been renamed Babel. 2015-02-18 14:52:56 +01:00
Julien Fontanet
8ab86fd6bb Remove unused deps. 2015-02-18 14:48:11 +01:00
Julien Fontanet
2c7bdc54c1 Minor fixes. 2015-02-18 13:35:28 +01:00
Julien Fontanet
39b57da42b Remove a debugging trace. 2015-02-18 11:58:59 +01:00
Julien Fontanet
a98a9fd97a Remove unused memory collection implementation. 2015-02-18 11:58:36 +01:00
Julien Fontanet
093a5c1019 Minor fixes. 2015-02-18 11:56:11 +01:00
Julien Fontanet
ba25acaab9 Redis implementation converted to ES6. 2015-02-18 11:53:51 +01:00
Julien Fontanet
9783802370 ACL model and collection. 2015-02-17 18:15:00 +01:00
Julien Fontanet
47bb02ac08 Minor fixes. 2015-02-17 18:14:32 +01:00
Julien Fontanet
1f952d81aa API methods never return undefined. 2015-02-17 18:13:26 +01:00
Julien Fontanet
0632019e44 Collection & Model rewritten in ES6. 2015-02-17 17:01:12 +01:00
Julien Fontanet
bc14d0f580 Revert problematic changes. 2015-02-12 18:06:59 +01:00
Julien Fontanet
4bc3998010 Update EditorConfig. 2015-02-12 18:03:50 +01:00
Julien Fontanet
cd9c2d1988 Remove unused $waitEvent(). 2015-02-12 16:54:50 +01:00
Julien Fontanet
5d597c22bf Remove $fiberize in favor of $coroutine. 2015-02-12 16:52:09 +01:00
Julien Fontanet
574144f9b1 Minor fix in tests. 2015-02-12 16:01:40 +01:00
Julien Fontanet
b26bee3524 Fix tests using ES6. 2015-02-12 15:58:44 +01:00
Julien Fontanet
c835cf7829 utils: CoffeeScript → ES6. 2015-02-12 15:58:29 +01:00
Julien Fontanet
a1d819dcb6 Remove unused code. 2015-02-12 14:47:36 +01:00
Julien Fontanet
2234cc9334 Always use let instead of var in ES6. 2015-02-12 14:18:40 +01:00
Julien Fontanet
cabd1506b7 Remove unused import. 2015-02-12 13:45:29 +01:00
Julien Fontanet
a7c2e321bf Remove incorrectly saved dep. 2015-02-12 13:45:16 +01:00
Julien Fontanet
31b75179bd Remove unused dep. 2015-02-12 13:32:19 +01:00
Julien Fontanet
06152f3131 Use graceful-fs. 2015-02-12 12:28:06 +01:00
Julien Fontanet
c82f8c997f Use fs-promise. 2015-02-12 12:27:48 +01:00
Julien Fontanet
6725cc6f61 0.5.2 2015-02-12 12:23:56 +01:00
Julien Fontanet
7e9639052b getCurrentUrl() must not ignore protocol and search parts. 2015-02-12 12:23:35 +01:00
Julien Fontanet
21bd5ba376 fixUrl() properly handles search and hash parts. 2015-02-12 12:22:58 +01:00
Julien Fontanet
f06840f4b8 Main startup file: CoffeeScript → ES6. 2015-02-12 11:54:36 +01:00
Julien Fontanet
11c3d6d056 Async methods must return promises. 2015-02-12 11:40:45 +01:00
Julien Fontanet
814a566845 Update to http-server-plus 0.5. 2015-02-12 11:32:09 +01:00
Julien Fontanet
28d5fb1822 0.5.1 2015-02-11 15:17:51 +01:00
Julien Fontanet
cd3c031df1 Fix back off reset. 2015-02-11 15:17:42 +01:00
Julien Fontanet
a6db0f6fd9 Fix reconnection. 2015-02-11 15:11:23 +01:00
Julien Fontanet
c80f6e8285 Better status during reconnection. 2015-02-11 15:11:03 +01:00
Julien Fontanet
c6d779853a Remove unused require. 2015-02-11 15:10:52 +01:00
Julien Fontanet
1b720a504c 0.5.0 2015-02-11 14:40:19 +01:00
Julien Fontanet
72f8854a7a Remove factory. 2015-02-11 14:39:52 +01:00
Julien Fontanet
097d195f00 Disable session.*() from high level API. 2015-02-11 14:16:38 +01:00
Julien Fontanet
807da8f696 Make Xo.connect() private. 2015-02-11 14:13:01 +01:00
Julien Fontanet
a8ca6b6fcb Do not use assign for methods. 2015-02-11 14:11:38 +01:00
Julien Fontanet
85e2e14c81 README update. 2015-02-11 14:11:10 +01:00
Julien Fontanet
f3bcaf2710 Typo. 2015-02-11 11:05:30 +01:00
Julien Fontanet
f9dba9266f Fix: NoSuchMethod → MethodNotFound. 2015-02-11 11:05:30 +01:00
Olivier Lambert
00f7df3982 add bios strings 2015-02-10 23:32:54 +01:00
Julien Fontanet
5ae45ddd55 Do not clear objects on disconnect. 2015-02-10 20:13:11 +01:00
Julien Fontanet
4e0a3da01e 0.4.1 2015-02-10 18:57:03 +01:00
Julien Fontanet
541a99bbc5 Fix item removal. 2015-02-10 18:56:32 +01:00
Julien Fontanet
f62008aba4 0.4.0 2015-02-10 18:22:11 +01:00
Julien Fontanet
74f7415f84 Minor changes. 2015-02-10 18:21:53 +01:00
Julien Fontanet
1e1e079b65 Use current location if URL not provided (for browsers). 2015-02-10 18:21:07 +01:00
Julien Fontanet
0b4f808b2d Only emit disconnected event if previously connected. 2015-02-10 18:13:01 +01:00
Julien Fontanet
ae4af99c59 Xo cannot be closed. 2015-02-10 17:53:56 +01:00
Julien Fontanet
0b17556fa4 Auto reconnect. 2015-02-10 17:53:43 +01:00
Julien Fontanet
e6ebc347e5 setScheduler() to ease integration. 2015-02-10 17:53:33 +01:00
Julien Fontanet
f2323a9d19 Various updates. 2015-02-10 17:12:10 +01:00
Julien Fontanet
ce53fe5e31 Fix module exports. 2015-02-10 14:47:16 +01:00
Julien Fontanet
f1d359b3e7 Smart objects collection. 2015-02-10 14:42:56 +01:00
Julien Fontanet
da99f3bc2a High level interface. 2015-02-10 11:40:11 +01:00
Julien Fontanet
fec8dd74af Use json-rpc. 2015-02-05 17:05:49 +01:00
Julien Fontanet
f598e0d0d5 Not available via Bower. 2015-02-05 14:13:06 +01:00
Julien Fontanet
656d2494b0 Travis CI. 2015-02-05 13:51:50 +01:00
Julien Fontanet
6d07d58f37 0.3.0 2015-02-05 13:45:52 +01:00
Olivier Lambert
b873a77409 add task cancel 2015-02-05 13:40:49 +01:00
Julien Fontanet
dd5270f620 Minimalist browser example. 2015-02-05 13:33:21 +01:00
Julien Fontanet
216f895953 Update deps. 2015-02-05 13:33:21 +01:00
Julien Fontanet
6acb87b7ea Update Bluebird. 2015-02-05 13:33:21 +01:00
Julien Fontanet
acdccd697c Fix browser compatibility. 2015-02-05 13:33:21 +01:00
Julien Fontanet
cecc4b1f6d Fix secure URL check. 2015-02-05 13:33:21 +01:00
Julien Fontanet
f93f115e13 Better and tested fixUrl(). 2015-02-05 13:33:16 +01:00
Julien Fontanet
debcf086b5 Code style. 2015-02-05 11:57:05 +01:00
Julien Fontanet
c6db974962 Update jshintrc. 2015-02-05 11:55:00 +01:00
Julien Fontanet
e9b0b0c42e ws supports browser natively. 2015-02-05 11:53:27 +01:00
Julien Fontanet
ebee1a02fd Promise is already defined in ES6. 2015-02-05 11:46:56 +01:00
Julien Fontanet
cd5a26398a Fix host.tasks. 2015-02-05 11:18:20 +01:00
Julien Fontanet
5e8a614d82 Unregister task watchers when finished. 2015-02-04 16:34:17 +01:00
Julien Fontanet
bad601edb1 Main file is now much cleaner. 2015-02-04 16:30:37 +01:00
Julien Fontanet
58297219a8 Update deps. 2015-02-04 15:06:03 +01:00
Julien Fontanet
087b191e5b More traces during startup. 2015-02-04 15:05:56 +01:00
Julien Fontanet
de4468a15a Enable console for hosts. 2015-02-04 13:54:43 +01:00
Julien Fontanet
b73de087d2 Console proxy (fix vatesfr/xo#14). 2015-02-03 17:39:12 +01:00
Julien Fontanet
39fd092055 Update .jshintrc. 2015-02-03 15:38:07 +01:00
Julien Fontanet
dec88bd601 Correctly handle WebSocket send errors. 2015-02-03 14:34:15 +01:00
Julien Fontanet
bc9975baa1 Fix connection double closing. 2015-02-03 14:33:39 +01:00
Julien Fontanet
d2d401883e Do not display “starting...” log when --help. 2015-01-30 10:59:50 +01:00
Julien Fontanet
3b3ac1688a Update deps. 2015-01-27 18:28:44 +01:00
Julien Fontanet
6bb0ca22d0 Enable ES6. 2015-01-27 18:26:32 +01:00
Julien Fontanet
e157bc7b97 Fix JSON-RPC. 2015-01-24 15:27:33 +01:00
Julien Fontanet
578da0f1a7 Fix JSON-RPC. 2015-01-24 15:27:11 +01:00
Olivier Lambert
8f0dd0b0c6 manage suspend/resume 2015-01-12 14:04:52 +01:00
Julien Fontanet
9e05bc4fad Compatibility with Node 0.11.14. 2015-01-09 18:12:55 +01:00
Olivier Lambert
4cee341ce5 solve the issue https://github.com/vatesfr/xo-web/issues/126 2015-01-02 16:52:22 +01:00
Olivier Lambert
c40192aa46 Update README.md 2014-12-29 20:43:51 +01:00
Olivier Lambert
651748cd4e add VDI migration on another SR 2014-12-27 20:30:35 +01:00
Olivier Lambert
9e8f8357b1 Authorize storage motion to a host with different CPU config 2014-12-19 16:37:56 +01:00
Julien Fontanet
3cc4c07fa1 3.6.0 2014-11-28 17:23:41 +01:00
Julien Fontanet
8ed52af203 Merge branch 'next-release' 2014-11-28 17:23:17 +01:00
Julien Fontanet
8e9a941b5d Minor comments & coding style. 2014-11-28 15:50:12 +01:00
Olivier Lambert
4538a4d33a add pif object 2014-11-24 21:01:51 +01:00
Olivier Lambert
a8469456ce add VIF management 2014-11-24 20:42:57 +01:00
Julien Fontanet
6ca25f913a Do not log API/XAPI parameters (might be sensitive). 2014-11-24 18:53:03 +01:00
Julien Fontanet
da74c7df8a Improve API logging. 2014-11-24 18:52:25 +01:00
Julien Fontanet
278aa87753 Various API cleanup. 2014-11-24 18:39:14 +01:00
Olivier Lambert
0f77294718 add pbd plug and unplug 2014-11-24 18:28:11 +01:00
Olivier Lambert
38df160a5e add patches in the data model 2014-11-24 13:55:03 +01:00
Olivier Lambert
dc61a3307c resolve a snapshot rename bug 2014-11-20 15:21:38 +01:00
Olivier Lambert
2724f8d3c5 add position to VBD 2014-11-19 20:14:47 +01:00
Olivier Lambert
36e1c1eff0 add vbd connect method 2014-11-19 20:14:29 +01:00
Olivier Lambert
81f830fe23 remove bootable because xo-cli can't send boolean 2014-11-19 15:10:41 +01:00
Olivier Lambert
6a42482b92 try to add diskattach feature 2014-11-16 15:35:53 +01:00
Olivier Lambert
8be83c278b first work 2014-11-14 18:28:58 +01:00
Olivier Lambert
eb82980cbc fix small bug 2014-11-11 13:37:48 +01:00
Olivier Lambert
08a6d28868 modify variable ha name 2014-11-10 17:29:48 +01:00
Olivier Lambert
37afbc8e9d expose higher level call for HA on a VM: enable or disable it 2014-11-10 17:01:47 +01:00
Olivier Lambert
12546b3f17 add the possibility to get and set HA for a VM 2014-11-10 16:12:13 +01:00
Julien Fontanet
70821c5d26 Fix XAPI double logins. 2014-11-08 16:23:26 +01:00
Julien Fontanet
2f7725c5a9 Debug traces in XAPI. 2014-11-08 15:03:57 +01:00
Julien Fontanet
a96d26c3bd Handle ETIMEDOUT error. 2014-11-08 14:50:28 +01:00
Julien Fontanet
a9f37c9238 Use the make-error package. 2014-10-11 18:11:35 +02:00
Julien Fontanet
de05139dfc Use xdg-basedir instead of xdg. 2014-10-08 09:50:34 +02:00
Olivier Lambert
239ebcdcb8 pool.patch() also applies the patch. 2014-10-01 15:12:34 +02:00
Olivier Lambert
9e6e62c5e8 Use task watching in vm.export(). 2014-10-01 15:12:04 +02:00
Olivier Lambert
3a0e9f422e Use task ref instead of UUIDs and minor fixes. 2014-10-01 15:11:44 +02:00
Julien Fontanet
ef8beb9310 xo.watchTask(uuid) 2014-10-01 14:27:15 +02:00
Julien Fontanet
260094a666 Add separators in spec. 2014-10-01 14:04:28 +02:00
Julien Fontanet
659f9a8f18 Add generic id field. 2014-10-01 14:04:28 +02:00
Olivier Lambert
cf2e3c8018 add basic patch upload 2014-10-01 14:01:03 +02:00
Julien Fontanet
e88d0579b0 Use nice-pipe instead of own code. 2014-09-29 14:53:11 +02:00
Olivier Lambert
a05901e792 add a small todo 2014-09-26 22:33:16 +02:00
Olivier Lambert
0928ec5c4c vm.export() works for running VM 2014-09-26 13:26:03 +02:00
Julien Fontanet
ef843d02c0 vm.snapshot() returns the ref of the new snapshot. 2014-09-26 11:03:46 +02:00
Julien Fontanet
07cdc6bf2f Merge branch 'file-transfer' into next-release 2014-09-25 15:36:04 +02:00
Julien Fontanet
5564e4daa2 Minor update. 2014-09-25 15:23:53 +02:00
Julien Fontanet
4742cd4a03 0.4.0 2014-09-25 14:59:54 +02:00
Julien Fontanet
832c1ef83c Better handling of proxy requests errors. 2014-09-24 20:30:26 +02:00
Julien Fontanet
f5d0fc8672 Put API debug in the correct file. 2014-09-24 19:40:43 +02:00
Julien Fontanet
99985f4fab Better progress stats. 2014-09-24 18:18:17 +02:00
Julien Fontanet
4c0c917fb5 Minor coding style update. 2014-09-24 17:26:18 +02:00
Julien Fontanet
9e5ac261e2 Can proxy a request using a different method. 2014-09-24 17:25:45 +02:00
Julien Fontanet
42bb3b5aca Always use the POST method. 2014-09-24 17:22:44 +02:00
Olivier Lambert
06abfc4337 add PUT method 2014-09-24 17:10:16 +02:00
Olivier Lambert
70bedaf8dd fix by using PUT instead of POST 2014-09-24 17:09:59 +02:00
Olivier Lambert
c9c54200aa minor fix 2014-09-24 14:55:30 +02:00
Julien Fontanet
c5f948099d Parameter names should be more semantic. 2014-09-24 14:14:31 +02:00
Julien Fontanet
a78cb59bc3 Fix operations on VM snapshots (fixes vatesfr/xo-web#147 and fixes vatesfr/xo-cli#5). 2014-09-24 10:43:32 +02:00
Julien Fontanet
fb5ff24747 Minor improvements in proxy request. 2014-09-24 09:36:45 +02:00
Julien Fontanet
38683a7fea Syntax update. 2014-09-23 19:16:11 +02:00
Julien Fontanet
ae1a68500c Remove erroneous require. 2014-09-23 17:57:04 +02:00
Julien Fontanet
578f842eed vm.export. 2014-09-23 17:31:29 +02:00
Julien Fontanet
acb2ede658 Proxy requests. 2014-09-23 17:30:19 +02:00
Julien Fontanet
a7dea95f90 Named functions for better stack traces. 2014-09-22 15:35:12 +02:00
Julien Fontanet
1080562d96 Sort requires. 2014-09-22 15:29:45 +02:00
Julien Fontanet
b8cf5a2347 Use per function lodash modules. 2014-09-22 15:29:28 +02:00
Julien Fontanet
e9706d605a Promise is already defined in ES6. 2014-09-22 15:12:14 +02:00
Julien Fontanet
4b338c56b5 Remove dead code. 2014-09-22 15:11:04 +02:00
Julien Fontanet
05b1bffeef Small fix in token generation. 2014-09-22 13:55:08 +02:00
Julien Fontanet
b330b55054 Various updates. 2014-09-22 12:51:56 +02:00
Julien Fontanet
9a67e63e9b Proper constructor for XO. 2014-09-15 22:48:35 +02:00
Julien Fontanet
0d629a5385 Minor fix. 2014-09-15 22:47:51 +02:00
Julien Fontanet
4e6a214581 Comments. 2014-09-15 19:17:05 +02:00
Julien Fontanet
333c591771 Parallelization of first connection, logs & fixes. 2014-09-15 19:03:15 +02:00
Julien Fontanet
e6645101ad Minor debug update. 2014-09-15 17:30:37 +02:00
Julien Fontanet
48788986cb Missing file api-errors.js 2014-09-15 16:43:40 +02:00
Julien Fontanet
d400beffb6 Various fixes. 2014-09-15 16:42:43 +02:00
Julien Fontanet
7762135cb1 More debugging logs. 2014-09-15 16:42:30 +02:00
Julien Fontanet
d0d594df69 http-server-plus v0.3.0 2014-09-15 16:01:03 +02:00
Julien Fontanet
ed97f2d786 Code not used due to event-to-promise. 2014-09-15 15:21:57 +02:00
Julien Fontanet
f3a724237f Minor bug fix. 2014-09-15 01:40:27 +02:00
Julien Fontanet
aeb3a308a8 Coding style updates in fiber utils. 2014-09-15 01:26:33 +02:00
Julien Fontanet
62cc97bc44 Rename $promisify() to $coroutine() to better align with Bluebird. 2014-09-14 22:43:59 +02:00
Julien Fontanet
20928c7a7f Typo. 2014-09-14 22:40:51 +02:00
Julien Fontanet
6f4a865604 Proper error classes for API. 2014-09-14 22:40:30 +02:00
Julien Fontanet
e7919416d5 WiP. 2014-09-12 20:56:17 +02:00
Julien Fontanet
cf8a512af4 Add coffeelint config. 2014-09-12 20:55:40 +02:00
Julien Fontanet
3efef7bbbb Use lodash.forEach() instead of own code. 2014-09-12 15:58:27 +02:00
Julien Fontanet
65d8e01529 Fix error when deleting users without tokens (fix #34). 2014-09-12 15:40:10 +02:00
Julien Fontanet
e0dd7a9b4b Minor fixes. 2014-09-12 11:31:53 +02:00
Julien Fontanet
3a32d220dd Missing dep. 2014-09-12 11:29:43 +02:00
Julien Fontanet
5efaf7b23e Underscore.js is no more. 2014-09-12 11:29:36 +02:00
Julien Fontanet
91375a5447 More coding style & lodash. 2014-09-11 18:56:03 +02:00
Julien Fontanet
f6574d346c Coding style updates & use lodash. 2014-09-11 13:48:40 +02:00
Olivier Lambert
b9b29b11d4 add XenStorage motion with automatic parameters 2014-09-03 16:18:55 +02:00
Julien Fontanet
54d062156d Check object type before using them. 2014-09-02 17:53:34 +02:00
Olivier Lambert
4dc24e48d8 Interpool migration 2014-09-02 17:38:40 +02:00
Julien Fontanet
3a24464c90 Better detection of host.power_state. 2014-08-28 11:42:12 +02:00
Olivier Lambert
f2ad9395fc add start method for h host 2014-08-27 19:17:44 +02:00
Julien Fontanet
61539416e5 Fix invalid session in XAPI connection (should fix #20). 2014-08-27 19:10:45 +02:00
Julien Fontanet
ecf7c1f3f3 Update deps. 2014-08-27 12:01:03 +02:00
Julien Fontanet
d18886ed7c Hung XAPI calls timeout after 10 seconds. 2014-08-27 11:58:07 +02:00
Julien Fontanet
07cc529f6e Ignore config files of unknown formats. 2014-08-27 11:57:15 +02:00
Julien Fontanet
01b87bfbfd 3.5.0 2014-08-14 16:30:30 +02:00
Julien Fontanet
b126f0cb79 systemd configuration 2014-08-14 16:26:56 +02:00
Julien Fontanet
10c6901a04 No longer relevant 2014-08-14 16:10:08 +02:00
Julien Fontanet
c26efb111e 3.5.0-alpha2 2014-08-14 16:06:35 +02:00
Julien Fontanet
f07cbe0087 Config file can now be in /etc/xo-server & basic help message. 2014-08-14 16:05:23 +02:00
Julien Fontanet
7d72e196e0 Remove unused deps. 2014-08-12 16:13:28 +02:00
Julien Fontanet
9bc935da96 Update JSHint config. 2014-08-12 16:13:28 +02:00
Julien Fontanet
d2e3b317ef 3.5.0-alpha1 2014-08-12 14:18:31 +02:00
Julien Fontanet
0edd39805b Minor fixes. 2014-08-11 13:22:53 +02:00
Julien Fontanet
15189014d0 npm start 2014-08-11 13:16:47 +02:00
Julien Fontanet
46ab3ed1ea <Host>.power_state 2014-08-11 13:11:35 +02:00
Olivier Lambert
edfbbe8c5a add enable and disable method 2014-08-05 12:41:18 +02:00
Olivier Lambert
9d35295b47 add current_operation to be able to see if the host is halted or just disabled 2014-08-05 12:40:59 +02:00
Julien Fontanet
b59d07fb5f TODO in vm.stop(). 2014-07-28 16:45:16 +02:00
Julien Fontanet
9c0fda2b52 vm.stop() improvements
- The `force` parameter is optional and default to `false`.
- If `force` is `true`, always do a hard shutdown.
- Throw `INVALID_PARAMS` when a clean shutdown failed due to missing PV drivers.
2014-07-28 16:32:36 +02:00
Julien Fontanet
2974a96e96 0.3.2 2014-07-28 15:34:19 +02:00
Julien Fontanet
ab7fd3d019 README update. 2014-07-28 15:32:55 +02:00
Julien Fontanet
54c5659496 0.3.1 2014-07-28 15:09:12 +02:00
Julien Fontanet
8c0811885f Handle -h as an alias for --help. 2014-07-28 15:09:00 +02:00
Julien Fontanet
291570dfd7 Add colors to the help message. 2014-07-28 15:06:15 +02:00
Julien Fontanet
f6b9b4cc19 0.3.0 2014-07-28 14:47:08 +02:00
Julien Fontanet
a06403ab7c Update to latest xo-lib. 2014-07-28 13:37:07 +02:00
Julien Fontanet
e64a95d1d7 Handle boolean params. 2014-07-28 13:35:30 +02:00
Julien Fontanet
6939e49643 Enable async long traces. 2014-07-28 13:35:19 +02:00
Julien Fontanet
bb18586484 Update JSHint config. 2014-07-28 13:35:05 +02:00
Julien Fontanet
09b39a4bf9 0.2.0 2014-07-28 13:33:45 +02:00
Julien Fontanet
1d7d639654 Set rejectUnauthorized only for secure connection. 2014-07-28 13:33:29 +02:00
Julien Fontanet
42ec509574 Fix URL fixing. 2014-07-28 13:30:57 +02:00
Julien Fontanet
dcef864c1c Fix URL if necessary. 2014-07-28 13:21:40 +02:00
Julien Fontanet
e8cb4f90f4 Update JSHint conf. 2014-07-28 13:21:40 +02:00
Julien Fontanet
4e0b2e4f77 Update deps. 2014-07-28 12:42:55 +02:00
Julien Fontanet
9ab1a980a7 Do not hide errors. 2014-07-28 11:24:11 +02:00
Julien Fontanet
a2bcadeb7c Remove now useless code & Update deps. 2014-07-26 23:51:23 +02:00
Julien Fontanet
84a4242e27 0.1.1 2014-07-26 23:48:53 +02:00
Julien Fontanet
6373d667d9 Work around XO-Server incomplete TLS 2014-07-26 23:42:04 +02:00
Julien Fontanet
07d91b8f50 3.5.0-alpha0 2014-07-26 18:02:38 +02:00
Julien Fontanet
5645921a8e Update deps. 2014-07-26 18:01:27 +02:00
Julien Fontanet
7840d601e1 Use xo-lib. 2014-07-26 10:19:32 +02:00
Julien Fontanet
1893061c0d 0.1.0 2014-07-26 10:15:38 +02:00
Julien Fontanet
0289cc3ee5 Initial commit. 2014-07-26 10:15:29 +02:00
Julien Fontanet
9c17ac1c33 Update deps. 2014-07-07 14:08:37 +02:00
Julien Fontanet
a35c9d2d9e 0.2.3 2014-06-09 15:36:44 +02:00
Julien Fontanet
7f739a1371 Update deps. 2014-06-09 15:36:17 +02:00
Olivier Lambert
62df78f329 fix error in doc 2014-06-03 15:11:39 +02:00
Julien Fontanet
a80968aaa7 Minor updates. 2014-05-30 19:45:25 +01:00
Julien Fontanet
2589a15e0a Remove useless file. 2014-05-30 19:45:25 +01:00
Olivier Lambert
950efde3b8 initial import and export stuff in VM object 2014-05-30 18:50:48 +02:00
Julien Fontanet
de8d5e4489 CLI is now installable via npm & testable. 2014-05-30 10:38:37 +01:00
Julien Fontanet
d6eefa5185 Merge branch 'master' into next-release 2014-05-29 17:41:45 +02:00
Julien Fontanet
5ad0cffbb3 Minor updates. 2014-05-29 17:40:58 +02:00
Julien Fontanet
89bd00c65e All API methods must return a value. 2014-05-27 19:53:28 +01:00
Julien Fontanet
be4511d95b 0.2.2 2014-05-27 19:17:53 +01:00
Julien Fontanet
b17e6058d1 Minor fixes. 2014-05-27 19:17:47 +01:00
Julien Fontanet
99c28a184f 0.2.1 2014-05-27 18:55:33 +01:00
Julien Fontanet
7ed9adaf49 Allows connection to incorrect SSL certificates. 2014-05-27 18:55:25 +01:00
Julien Fontanet
c3ef051657 0.2.0 2014-05-26 14:26:55 +02:00
Julien Fontanet
ba149efa4a Merge branch 'dev' 2014-05-26 14:26:41 +02:00
Julien Fontanet
e30a7b3849 README update. 2014-05-26 14:22:08 +02:00
Julien Fontanet
97ad0483ec Minor change. 2014-05-26 14:01:55 +02:00
Julien Fontanet
3981c772a2 --register and --unregister. 2014-05-26 13:57:18 +02:00
Julien Fontanet
e762002560 Remove unused deps. 2014-05-26 13:42:36 +02:00
Julien Fontanet
061d8dc94f Use API introspection. 2014-05-26 13:33:56 +02:00
Julien Fontanet
b7e7a0df94 More introspection. 2014-05-24 18:14:04 +02:00
Julien Fontanet
84e6228f90 Various updates. 2014-05-24 17:09:10 +02:00
Julien Fontanet
e3f02fc4d6 User cannot delete himself (fix vatesfr/xo-web#104). 2014-05-24 15:46:14 +02:00
Julien Fontanet
81bece9dc4 Remove unused API methods. 2014-05-24 15:02:20 +02:00
Julien Fontanet
db4b05e9d2 Various updates. 2014-05-24 10:42:20 +02:00
Julien Fontanet
0b9029c7b5 Use http-server-plus instead of custom implementation. 2014-05-22 18:02:45 +02:00
Julien Fontanet
7fd9a65ce5 Comment. 2014-05-22 12:12:23 +02:00
Julien Fontanet
8cd2d52b3d 3.4.0 2014-05-22 11:43:32 +02:00
Julien Fontanet
d8e8c5504a Merge branch 'next-release' 2014-05-22 11:41:49 +02:00
Julien Fontanet
7535f6af51 Merge branch 'events' into next-release 2014-05-21 20:02:32 +02:00
Julien Fontanet
347effcf70 Minor fixes. 2014-05-21 19:49:58 +02:00
Julien Fontanet
2b2176ba24 Update deps. 2014-05-21 16:49:15 +02:00
Julien Fontanet
a0b2d9384d Events are ok. 2014-05-21 15:25:34 +02:00
Julien Fontanet
58cc047ffa Comments. 2014-05-12 19:58:00 +02:00
Julien Fontanet
cfacd90815 Various updates. 2014-05-12 19:55:49 +02:00
Julien Fontanet
f46dca910b WIP. 2014-05-09 17:27:13 +02:00
Julien Fontanet
d362dfc359 Initial work on events. 2014-05-07 14:05:01 +02:00
Julien Fontanet
4dff1ead06 Various updates. 2014-04-24 15:33:55 +02:00
Julien Fontanet
ec8aa28aea Same thing for the WS server. 2014-04-22 16:42:47 +02:00
Julien Fontanet
e49abd909d WebSocket errors should not crash the server. 2014-04-22 16:39:48 +02:00
Julien Fontanet
ce2c700f1d new Promise() instead of Promise.defer() as suggested in Bluebird's doc. 2014-04-19 17:15:50 +02:00
Julien Fontanet
dcb9f90a8c Typo. 2014-04-19 17:05:36 +02:00
Olivier Lambert
c936d4f5a3 add support for convert vm into template 2014-04-18 13:15:19 +02:00
Olivier Lambert
44f9292bfd add CoW clone capabilities 2014-04-16 18:00:29 +02:00
Olivier Lambert
259fae0134 support now clone/copy 2014-04-16 17:30:50 +02:00
Julien Fontanet
04c28824b2 Remove old tests. 2014-04-16 16:26:26 +02:00
Julien Fontanet
c5bf4d1723 Get parameters description out of the API methods. 2014-04-16 16:17:24 +02:00
Julien Fontanet
b72a7f2c22 Minor fix. 2014-04-15 17:58:16 +02:00
Julien Fontanet
71cef03a4b Minor fix. 2014-04-15 17:55:59 +02:00
Julien Fontanet
13abde0b0f Various updates. 2014-04-15 17:40:35 +02:00
Julien Fontanet
e4850e0a48 TODOs. 2014-04-15 16:53:16 +02:00
Julien Fontanet
1c225ff1ec Remove existing install-repository entry in VM if any. 2014-04-15 16:29:56 +02:00
Julien Fontanet
1b4e80858d Major indentation fix. 2014-04-15 16:15:01 +02:00
Julien Fontanet
4f683edcb9 Dependencies update. 2014-04-15 16:14:48 +02:00
Julien Fontanet
301cc22985 Various updates. 2014-04-14 16:38:29 +02:00
Julien Fontanet
834fe6da45 hashy uses promises out of the box. 2014-04-05 11:02:12 +02:00
Julien Fontanet
35678661d1 Deps updates & Initial API introspection. 2014-04-05 10:54:26 +02:00
Julien Fontanet
29398b9869 Various updates. 2014-04-03 10:19:31 +02:00
Julien Fontanet
1ef6b0b5f9 Merge branch 'next-release' 2014-03-28 17:02:14 +01:00
Julien Fontanet
d1cf246600 3.3.1 2014-03-28 17:01:30 +01:00
Julien Fontanet
8b65a75235 Fixes register in README. 2014-03-28 15:19:53 +01:00
Julien Fontanet
093e09c732 Minor fix. 2014-03-25 18:24:58 +01:00
Julien Fontanet
313f7e8173 Minor fixes and new command: whoami. 2014-03-25 17:18:02 +01:00
Julien Fontanet
d9e615e696 First working version. 2014-03-25 15:34:07 +01:00
Julien Fontanet
b526067eeb Initial commit. 2014-03-24 17:44:06 +01:00
Julien Fontanet
5c25a82a2b Bug fixes (Redis implementation). 2014-03-24 13:51:25 +01:00
Julien Fontanet
2f224fc26e Minor fix. 2014-03-15 12:02:16 +01:00
Julien Fontanet
2969f8da36 Skips a failed test. 2014-03-14 18:28:59 +01:00
Julien Fontanet
8959d12746 Using bluebird instead of q for promises. 2014-03-14 18:25:49 +01:00
Julien Fontanet
6e6574a235 Do not use npm dedupe as it cause problem with xmlbuilder (fix #24). 2014-03-14 11:49:58 +01:00
Julien Fontanet
bf3eea4a41 Updates dependencies. 2014-03-13 17:10:11 +01:00
Julien Fontanet
044594c614 Merge branch 'next-release' 2014-03-07 16:09:26 +01:00
Julien Fontanet
aeba346a4e Bumps version number. 2014-03-07 16:09:09 +01:00
Olivier Lambert
779a3d2d70 handle message deletion 2014-02-27 00:52:24 +01:00
Olivier Lambert
6a8667cc4b add revert action for snapshots 2014-02-26 20:06:23 +01:00
Olivier Lambert
29972fe54e add host action for https://github.com/vatesfr/xo-web/issues/97 2014-02-24 18:45:12 +01:00
Olivier Lambert
cf9e9e4fcf prepare backend for snapshots, as requested in https://github.com/vatesfr/xo-web/issues/95 and https://github.com/vatesfr/xo-web/issues/96 2014-02-24 16:31:16 +01:00
Julien Fontanet
ddd14999d7 Merge branch 'next-release' 2014-02-21 10:14:56 +01:00
Julien Fontanet
cfc9c60794 Bumps version number. 2014-02-21 09:54:41 +01:00
Julien Fontanet
71f206446c Uses npm shrinkwrap to fix dependencies' versions (fix #22). 2014-02-20 15:10:15 +01:00
Julien Fontanet
e368465591 Updates all dependencies. 2014-02-19 18:50:22 +01:00
Julien Fontanet
2f4314257c Badges added to the README to see if dependencies are up to date (fix #21). 2014-02-19 18:43:45 +01:00
Julien Fontanet
204d32b9fd Preparation work to have a promise-based XAPI connection. 2014-02-19 18:42:28 +01:00
Julien Fontanet
a66f522e77 Minor changes. 2014-02-18 18:32:14 +01:00
Julien Fontanet
9016b7be90 Minor nesting bug. 2014-02-18 10:26:48 +01:00
Julien Fontanet
545da61855 Unit tests for fiber utils. 2014-02-18 10:22:58 +01:00
Julien Fontanet
4c22f2525c Some reworks to ease future transition to ES6 generators.
It will also helped to achieve more parallelism.
2014-02-17 21:05:10 +01:00
Julien Fontanet
2e5c4bb5ee Minor fix. 2014-02-17 15:08:04 +01:00
Julien Fontanet
6a85db1d5d Merge branch 'next-release' 2014-02-14 16:26:43 +01:00
Julien Fontanet
2b16b961f4 Bumps version number. 2014-02-14 16:26:11 +01:00
Olivier Lambert
a2531b3073 fix typo on doc 2014-02-14 13:48:57 +01:00
Olivier Lambert
88a2baf19e update doc 2014-02-14 13:44:32 +01:00
Olivier Lambert
f0766f753c add vlan info for PIF's 2014-02-13 13:04:09 +01:00
Julien Fontanet
8d67aed95a Merge branch 'next-release' 2014-02-07 18:34:12 +01:00
Julien Fontanet
678dbd76cb Bumps version number and updates README. 2014-02-07 17:22:18 +01:00
Julien Fontanet
ae9269d1b1 vm.{eject,insert}Cd(). 2014-02-07 15:19:13 +01:00
Julien Fontanet
971c238313 Incorrect update of templates list (fix vatesfr/xo-web#55). 2014-02-07 12:16:18 +01:00
Olivier Lambert
e713befd59 add os version in spec 2014-02-06 23:02:00 +01:00
Julien Fontanet
eb95c75c29 Fix permission checking in vm.start(). 2014-02-06 17:13:51 +01:00
Julien Fontanet
a522e2bcbd Fix force for VM stop/restart. 2014-02-06 16:39:26 +01:00
Julien Fontanet
b1a8902e33 Fix permission checking in vm.{restart,stop}(). 2014-02-06 16:35:01 +01:00
Julien Fontanet
8c706d2393 Fixes for restart/stop. 2014-02-06 16:32:54 +01:00
Julien Fontanet
1b55746213 vm.{start,stop,restart}(). 2014-02-06 16:27:33 +01:00
Julien Fontanet
3f5a7809f0 session.signOut(). 2014-02-06 16:13:52 +01:00
Julien Fontanet
ecfd05f788 vm.delete() ok. 2014-02-06 12:18:52 +01:00
Julien Fontanet
41585f1467 Fix for VM deletion. 2014-02-06 11:51:56 +01:00
Julien Fontanet
3c6a3674a5 Minor change. 2014-02-05 15:31:24 +01:00
Olivier Lambert
e4bc31357f add vdi mod and vbd delete/unplug 2014-02-05 15:17:48 +01:00
Olivier Lambert
a9436f9668 handle sr rescan 2014-02-04 21:05:10 +01:00
Olivier Lambert
f90c236fa4 handle vdi remove 2014-02-04 20:43:51 +01:00
Julien Fontanet
c5a2d6a1eb VM creation seems to work… 2014-02-04 18:50:16 +01:00
Julien Fontanet
9bf41edb88 pool.default_SR restored. 2014-02-04 17:04:56 +01:00
Julien Fontanet
4c5f27301e Initial vm.delete(). 2014-02-04 17:04:39 +01:00
Julien Fontanet
99c9ad69ac Minor fixes. 2014-02-04 17:04:25 +01:00
Julien Fontanet
6866267cf5 Minor fixes. 2014-02-03 17:23:41 +01:00
Julien Fontanet
92307013a7 Installation support in VM creation. 2014-02-03 17:04:56 +01:00
Julien Fontanet
ed81261dc2 Initial support for VM installation. 2014-01-31 12:46:49 +01:00
Julien Fontanet
1409ae026d Better algo to change the VM CPUs number. 2014-01-31 12:22:21 +01:00
Julien Fontanet
566ca24833 VM.memory should never be static_max. 2014-01-31 11:53:25 +01:00
Julien Fontanet
844a10911a Much better algorithm for VM memory change. 2014-01-31 11:49:58 +01:00
Julien Fontanet
015f6d2536 Minor fix. 2014-01-31 10:45:47 +01:00
Julien Fontanet
c1fd149118 Improvement in VM memory change. 2014-01-31 10:43:01 +01:00
Olivier Lambert
887533018c fix missing arg 2014-01-31 10:32:13 +01:00
Julien Fontanet
7dfbb6753a Initial work on VM live migration. 2014-01-31 10:24:31 +01:00
Julien Fontanet
5c2f69c820 pool.poolRef for uniformity. 2014-01-30 20:29:55 +01:00
Julien Fontanet
0abed8f132 Minor fixes. 2014-01-30 20:24:39 +01:00
Julien Fontanet
158d0ea65e Pool basic edition. 2014-01-30 20:24:21 +01:00
Julien Fontanet
cdb31a18f5 Copy past fixes... 2014-01-30 20:19:48 +01:00
Julien Fontanet
17f75bbd77 Host and SR basic edition. 2014-01-30 20:17:55 +01:00
Julien Fontanet
d1b54c4195 VM edition works as good as possible for now :) 2014-01-30 20:07:36 +01:00
Julien Fontanet
a3e18c95f5 Minor changes. 2014-01-30 19:37:31 +01:00
Olivier Lambert
693fd6d6f3 change name of PV_drivers 2014-01-30 16:17:22 +01:00
Julien Fontanet
b3029514c7 VM.set(). 2014-01-30 16:03:34 +01:00
Olivier Lambert
fd6dc6090e add pv_driver status for a vm in spec 2014-01-30 15:47:50 +01:00
Julien Fontanet
a94bc50e25 Updates hosts and VMs with their metrics. 2014-01-30 14:49:24 +01:00
Julien Fontanet
13d5ecb79f Pools have their messages. 2014-01-30 14:20:11 +01:00
Julien Fontanet
de0b365bc7 Properly handle the “EVENTS_LOST” error. 2014-01-30 11:58:02 +01:00
Julien Fontanet
b287406c94 Exports VM.current_operations. 2014-01-30 10:23:02 +01:00
Julien Fontanet
320865c262 Should not crashed when a VM-template becomes a VM. 2014-01-29 19:35:28 +01:00
Julien Fontanet
e550ea2141 Minor fixes. 2014-01-29 18:58:06 +01:00
Julien Fontanet
19e47a2742 Local SRs. 2014-01-29 18:09:15 +01:00
Julien Fontanet
ca64db3e54 Consoles should work again + various API methods deprecated. 2014-01-29 17:30:53 +01:00
Julien Fontanet
ea57b40d8c Minor fixes. 2014-01-29 17:08:43 +01:00
Julien Fontanet
7c4e7eb225 Minor fixes. 2014-01-29 17:00:25 +01:00
Julien Fontanet
028e950c81 Minor code simplification. 2014-01-29 16:58:20 +01:00
Julien Fontanet
d5e118d292 Major fix in MappedCollection. 2014-01-29 16:56:22 +01:00
Julien Fontanet
5b50f3d294 MAC can be specified. 2014-01-28 17:32:18 +01:00
Julien Fontanet
ef5d97194f #CPUs handling in vm.create() 2014-01-28 16:47:07 +01:00
Julien Fontanet
d4f34cbdb6 Minor fix. 2014-01-27 18:21:43 +01:00
Julien Fontanet
0152b7e534 Minor fixes. 2014-01-24 12:36:23 +01:00
Julien Fontanet
ace5c873a3 Improvement in VM creation. 2014-01-24 11:41:56 +01:00
Julien Fontanet
eb7b76bed3 Minor fix in API.token. 2014-01-24 11:35:16 +01:00
Julien Fontanet
d72a9a3907 Templates in spec. 2014-01-23 12:08:54 +01:00
Julien Fontanet
cfeb9f7cd4 Minor fix. 2014-01-22 22:52:08 +01:00
Julien Fontanet
a690982a09 Initial work for VM creation. 2014-01-22 20:04:43 +01:00
Julien Fontanet
2949a830d9 API helpers in their own namespace & getParams(). 2014-01-22 19:11:01 +01:00
Julien Fontanet
a757db7a44 XO::getObject(), XO::getObjects() and XO::getXAPI(). 2014-01-18 17:01:03 +01:00
Julien Fontanet
e73899d083 Finer loops counting in watchers. 2014-01-18 16:58:49 +01:00
Julien Fontanet
05c45e1b6b Merge branch 'spec-refactoring' into next-release 2014-01-16 16:57:50 +01:00
Julien Fontanet
00027434ad Various updates. 2014-01-16 16:45:54 +01:00
Julien Fontanet
60c46d529c Initial merge. 2014-01-16 14:07:31 +01:00
Julien Fontanet
5b91e6aa59 Various updates. 2014-01-15 19:11:26 +01:00
Julien Fontanet
615fb3f387 Various udpates. 2014-01-15 17:36:11 +01:00
Julien Fontanet
24751675c5 Minor updates in VM-template. 2014-01-15 16:34:03 +01:00
Julien Fontanet
0e2e54778d Minor updates. 2014-01-15 16:33:38 +01:00
Julien Fontanet
f336832395 Initial VM-template support. 2014-01-15 15:28:48 +01:00
Julien Fontanet
44826da3ee $promisify should be properly exported (& minor fix). 2014-01-15 15:25:16 +01:00
Julien Fontanet
e492f4fdc9 $waitPromise() replaced by the more generic $wait. 2014-01-15 15:24:19 +01:00
Julien Fontanet
b786d4ac06 Spec updates. 2014-01-15 12:08:02 +01:00
Julien Fontanet
15abc40bd0 New helper: $map. 2014-01-14 19:04:05 +01:00
Julien Fontanet
e5ac1bc629 More tests. 2014-01-14 18:22:01 +01:00
Julien Fontanet
d67a99b8f8 Bug fix. 2014-01-14 18:20:09 +01:00
Julien Fontanet
6816f93ecb Spec2 updates. 2014-01-14 16:37:16 +01:00
Julien Fontanet
30ecab05cf Minor fix. 2014-01-14 16:36:00 +01:00
Julien Fontanet
ff13998205 No more false positives in loop detection. 2014-01-14 16:35:29 +01:00
Julien Fontanet
1e1e2166b9 Missing files. 2014-01-13 20:51:15 +01:00
Julien Fontanet
fcfa5bcb8d Initial tests for spec2. 2014-01-13 18:35:43 +01:00
Julien Fontanet
284599d249 Minor spelling. 2014-01-13 17:19:56 +01:00
Julien Fontanet
caf2ffc167 Loop detection in the helpers. 2014-01-13 17:19:29 +01:00
Julien Fontanet
e73ac0af22 It is now possible to ignore items of missing rules. 2014-01-13 17:17:41 +01:00
Julien Fontanet
53dff59c6a Tests runner rewritten using CoffeeScript for better stacktraces. 2014-01-13 16:28:36 +01:00
Julien Fontanet
1d8c8ea1b0 Minor cleanup. 2014-01-11 19:10:49 +01:00
Julien Fontanet
b18acfac83 Spec2 update. 2014-01-11 19:07:31 +01:00
Julien Fontanet
fb1f9c675b Minor change for the sake of simplification and flexibility. 2014-01-11 19:07:21 +01:00
Julien Fontanet
02cef37128 Test runner. 2014-01-11 19:06:01 +01:00
Julien Fontanet
08a84df7d8 Various updates. 2014-01-11 17:00:35 +01:00
Julien Fontanet
084ba95b6a $sum and $val also supports bind. 2014-01-10 17:47:22 +01:00
Julien Fontanet
37c11bfcb2 Dynamic keys for $set. 2014-01-10 16:49:46 +01:00
Julien Fontanet
5bba2b7bf0 Initial work on the helpers. 2014-01-10 16:06:51 +01:00
Julien Fontanet
9e5c8a650e Minor fix. 2014-01-08 23:07:20 +01:00
Julien Fontanet
44dc8210bc Minor optimizations. 2014-01-08 23:06:35 +01:00
Julien Fontanet
86d40b774e Minor fix. 2014-01-08 23:04:41 +01:00
Julien Fontanet
e8ff2f8229 Minor update. 2014-01-08 19:54:31 +01:00
Julien Fontanet
1ca7faf7c6 Various updates. 2014-01-08 18:33:47 +01:00
Olivier Lambert
eeba0940b6 add methods for VM object 2014-01-08 18:17:21 +01:00
Julien Fontanet
c81f7cebf7 Initial work on the new mapped collection and transformation spec. 2014-01-08 16:15:12 +01:00
Olivier Lambert
4affdd91a7 add 'attached' of a VBD in spec 2014-01-08 15:34:47 +01:00
Julien Fontanet
d8153d1263 Minor fixes. 2014-01-06 14:52:58 +01:00
Julien Fontanet
3f7ec9e0c2 Ability to destroy tasks/messages. 2014-01-06 14:29:12 +01:00
Julien Fontanet
d0ef14ccd8 More API namespaces externalized. 2014-01-06 10:37:06 +01:00
Julien Fontanet
f6f35f3e49 Fix indentation. 2014-01-06 09:52:40 +01:00
Olivier Lambert
ec0302644f fix on tasks duplicated record. TODO: use update instead 2014-01-05 23:04:54 +01:00
Olivier Lambert
0e5f7f8d1b initial support of tasks 2014-01-05 17:33:22 +01:00
Julien Fontanet
3498f3fd2f Add missing dependency. 2014-01-05 14:38:45 +01:00
Julien Fontanet
b68cfc8f72 Expose session identifier for consoles. 2014-01-03 14:12:24 +01:00
Olivier Lambert
af11b7cd26 add templates in spec and also start to implement disk provisionning 2014-01-02 16:24:45 +01:00
Julien Fontanet
6aad4a4a98 New type: VM-snapshot. 2014-01-02 13:10:26 +01:00
Julien Fontanet
d7a4395557 Minor fixes. 2014-01-02 11:42:40 +01:00
Olivier Lambert
4df8b90bfe add message object and link for host, vm and pool 2014-01-02 11:39:03 +01:00
Julien Fontanet
0ded953527 Minor fix. 2014-01-01 13:21:37 +01:00
Julien Fontanet
5a345ce4c9 Create a default user if there is none. 2014-01-01 13:21:18 +01:00
Olivier Lambert
8f8dc390ca add PIF in spec 2013-12-31 16:59:06 +01:00
Olivier Lambert
52fb5641ce add VIF in specs 2013-12-31 16:16:48 +01:00
Julien Fontanet
f47eea03cc Do not try to connect to a server indefinitely. 2013-12-31 16:08:28 +01:00
Julien Fontanet
432864c323 Minor fixes. 2013-12-31 13:26:57 +01:00
Julien Fontanet
4608216e28 Minor fixes. 2013-12-31 00:58:40 +01:00
Julien Fontanet
befdd2e7ad Idem for the server namespace. 2013-12-30 17:45:27 +01:00
Julien Fontanet
13b73acee6 The user namespace of the API resides in its own module.
It has been rewritten in CoffeeScript, a lot of bugs have been fixed
and it is much more commented.
2013-12-30 17:19:38 +01:00
Julien Fontanet
d1800fe86a Minor simplification. 2013-12-30 11:40:31 +01:00
Julien Fontanet
13b7b72865 Minor code simplification. 2013-12-30 08:42:56 +01:00
Julien Fontanet
0894114aac Remove (now unecessary) $waitPromise() calls. 2013-12-29 10:53:22 +01:00
Julien Fontanet
50ae55d74f Minor fix. 2013-12-29 10:11:22 +01:00
Julien Fontanet
9e8ed150a3 Helpful message when the web server cannot start listening. 2013-12-29 10:08:56 +01:00
Julien Fontanet
7e682eac22 Meaningful message when the web server cannot start listening. 2013-12-29 09:48:18 +01:00
Julien Fontanet
172fbb51a4 Remove useless log. 2013-12-29 09:27:50 +01:00
Julien Fontanet
f4bee77131 Dependencies versions fixed. 2013-12-29 09:27:01 +01:00
Julien Fontanet
1dcce05f98 session.signIn*() now returns the signed user. 2013-12-28 18:40:09 +01:00
Julien Fontanet
58239efa84 Various bufixes. 2013-12-28 18:05:37 +01:00
Julien Fontanet
d42121a426 Minor fix. 2013-12-28 17:42:16 +01:00
Julien Fontanet
4a031d70a5 xapi.vm.start() should work. 2013-12-28 17:36:29 +01:00
Julien Fontanet
3a5c512a62 Various fixes. 2013-12-28 17:09:55 +01:00
Julien Fontanet
1de8f9a92a VMs actions work. 2013-12-28 14:59:06 +01:00
Julien Fontanet
6a6dddfef1 xapi.vm.* methods are now generated and (hopefully) working. 2013-12-28 13:34:28 +01:00
Julien Fontanet
8180075d8f Minor fix (thanks CoffeeLint ;)). 2013-12-28 13:33:56 +01:00
Julien Fontanet
466fd49ad0 Try harder to respect the 80 characters rule. 2013-12-28 13:33:35 +01:00
Julien Fontanet
8ae8e99b25 Spelling & other various fixes. 2013-12-28 12:22:23 +01:00
Julien Fontanet
3dc0066e06 The API now use synchrouneous code (fibers) instead of promises. 2013-12-27 18:44:13 +01:00
Julien Fontanet
826add7b43 $waitPromise should handle gracefully non promise. 2013-12-27 14:22:02 +01:00
Julien Fontanet
3bc345d391 Minor fix. 2013-12-27 14:11:27 +01:00
Julien Fontanet
91b0acd4e4 Debugging trace removed. 2013-12-27 12:05:40 +01:00
Julien Fontanet
774b4051bc XO-Server can now drop priviledges. 2013-12-27 12:04:54 +01:00
Julien Fontanet
ad5e68091f Runner script should forward its arguments to XO-Server. 2013-12-27 11:51:32 +01:00
Julien Fontanet
280b3275b4 $XAPI handles EHOSTUNREACH errors. 2013-12-27 11:49:45 +01:00
Julien Fontanet
a3a87f54df Minor fixes. 2013-12-27 10:26:54 +01:00
Julien Fontanet
8ed912913d Minor fixes. 2013-12-27 10:26:54 +01:00
Julien Fontanet
99068ca605 Port can be specified in a server host. 2013-12-23 20:19:19 +01:00
Julien Fontanet
514109fa4e Port can now be specified for a Xen server. 2013-12-23 18:11:05 +01:00
Julien Fontanet
f979092f59 hashy updated & minor fix. 2013-12-23 17:54:38 +01:00
Olivier Lambert
1d9d1ca7dc add console in spec 2013-12-20 12:32:52 +01:00
Olivier Lambert
4df7235b09 start to introduce cpu/vcpu count but there is a bug on vcpu count for each host. global stat seems OK 2013-12-20 01:48:13 +01:00
Olivier Lambert
ee72e5ea91 this one goes out to @julien-f too ;) 2013-12-19 23:43:58 +01:00
Olivier Lambert
6575891546 fix typo, american english is not used in XAPI julien-f ;) 2013-12-19 23:34:19 +01:00
Olivier Lambert
30c7fbddaa add ip address in VM by guest_metrics 2013-12-19 23:12:07 +01:00
Julien Fontanet
e1c97ac393 Ensures numeric fields are Number. 2013-12-19 16:46:25 +01:00
Julien Fontanet
c443422b10 host.controller. 2013-12-19 15:39:07 +01:00
Julien Fontanet
2ef2f9bbc3 Shared SRs. 2013-12-19 15:14:31 +01:00
Julien Fontanet
1c98a05b4f Do not rely on VM metrics for memory when not running. 2013-12-19 15:02:52 +01:00
Julien Fontanet
f637cab5ec Properly handle running VMs. 2013-12-19 14:54:35 +01:00
Olivier Lambert
0e232b4c49 add mem for halted hosts 2013-12-19 14:31:26 +01:00
Julien Fontanet
3d37260d5c Halted VMs are now available from their pool. 2013-12-19 14:05:16 +01:00
Julien Fontanet
ce56f072d4 Items where not removed from arrays in specification. 2013-12-19 12:54:32 +01:00
Julien Fontanet
3fc5aba3bc Do not rely on VM guest metrics for memory. 2013-12-19 12:50:36 +01:00
Julien Fontanet
92f450cda0 VM's CPU number. 2013-12-18 19:20:59 +01:00
Julien Fontanet
76b26a7ee6 CPUs utilization for VMs. 2013-12-18 18:59:41 +01:00
Julien Fontanet
cdc9eff2fb VBDs without VDIs should be ignored. 2013-12-18 18:50:38 +01:00
Julien Fontanet
7fb3b19cb8 Memory is now correctly defined in xo object. 2013-12-18 18:20:26 +01:00
Julien Fontanet
76b9c3c0e4 Trivial fix :/ 2013-12-18 17:57:02 +01:00
Julien Fontanet
109864c3bf VM memory is correctly retrieve. 2013-12-18 17:55:30 +01:00
Julien Fontanet
522fc51c3a Master added to the pool type. 2013-12-18 16:15:16 +01:00
Julien Fontanet
3dd66e40f8 Minor fix (for an edge case) in collection mapper. 2013-12-18 12:43:32 +01:00
Julien Fontanet
54dc3e5a71 Host object updated & minor fix in the collection mapper. 2013-12-18 12:37:46 +01:00
Julien Fontanet
23311c0235 $synchronize works with promises too. 2013-12-17 23:25:33 +01:00
Julien Fontanet
6e75a3829a The web server listens on port 80 by default. 2013-12-17 23:25:00 +01:00
Julien Fontanet
8b3373a7cc New HTTP/HTTPS server configuration, a lot more flexible. 2013-12-17 16:24:36 +01:00
Olivier Lambert
7fc9ca96b2 add snap for vdi 2013-12-14 23:51:51 +01:00
Olivier Lambert
7c3dcf586c fix vbd for sr thanks to julienf 2013-12-14 19:04:09 +01:00
Olivier Lambert
a1ef1353da add vbd vdi pbd 2013-12-14 18:44:49 +01:00
Olivier Lambert
9ce2c55cc4 add vbd and pbd 2013-12-14 17:01:00 +01:00
Julien Fontanet
49fcefbf2d Various cleanings & minor fix (xapi.js). 2013-12-14 15:37:19 +01:00
Julien Fontanet
7eb0c36a8e Minor fix. 2013-12-14 01:02:03 +01:00
Julien Fontanet
95dc2d430c The main file now also uses CoffeeScript and fibers. 2013-12-13 14:17:18 +01:00
Julien Fontanet
a3d04fa810 Some core parts were rewritten using CoffeeScript and fibers. 2013-12-12 17:43:34 +01:00
Julien Fontanet
26aaf5f53c Various fixes. 2013-12-09 18:19:55 +01:00
Julien Fontanet
5208d3d091 Minor fix. 2013-12-09 17:51:29 +01:00
Julien Fontanet
177f7af7d7 Initial work on the new data model. 2013-12-09 17:07:39 +01:00
Julien Fontanet
047f8a7888 Better EditorConfig. 2013-11-27 15:07:32 +01:00
Julien Fontanet
e302b33d3b Various cleanings in the main file + CoffeScript. 2013-11-27 15:01:01 +01:00
Julien Fontanet
0c5c76b5cc Do not use Superstack due to its huge impact on performance and memory. 2013-11-25 15:04:58 +01:00
Julien Fontanet
54a7de62e0 Debug mode using Node-Inspector as been added to the launcher. 2013-11-21 17:05:36 +01:00
Julien Fontanet
5b056f563e Disable Q.longStackSupport as we already use Superstack. 2013-11-21 17:05:00 +01:00
Julien Fontanet
a38972bd2e Avoid promise.fail() AMAP: it unecessary consume memory. 2013-11-21 15:32:51 +01:00
Julien Fontanet
0f3c3920a1 Bug fix. 2013-10-30 17:10:03 +01:00
Julien Fontanet
f23905f5ee Use superstack to have better stacktraces with async code. 2013-10-30 12:21:36 +01:00
Julien Fontanet
e69db958b2 Display an error message when the HTTP(S) server could not start. 2013-10-30 12:21:10 +01:00
Julien Fontanet
ac39e3b98e Add EditorConfig. 2013-10-29 10:58:06 +01:00
Julien Fontanet
c22f642418 Minor updates. 2013-10-21 17:20:02 +02:00
Julien Fontanet
c8a47d7b99 HTTPS support (fix #16). 2013-10-21 16:52:44 +02:00
Julien Fontanet
302d9cb321 Handles object deletions in XAPI events. 2013-10-10 15:25:12 +02:00
Julien Fontanet
95a4dc94a4 Various updates. 2013-10-09 16:40:43 +02:00
Julien Fontanet
3ca027fa69 Various updates. 2013-10-09 15:24:28 +02:00
Julien Fontanet
02ae845bab Magic fix. 2013-10-07 09:07:57 +02:00
Julien Fontanet
0472c22b08 Various updates. 2013-10-04 15:29:22 +02:00
Julien Fontanet
424c6403e1 Events logging for debugging. 2013-10-04 14:41:06 +02:00
Julien Fontanet
e8b1be6568 Various updates. 2013-10-04 13:39:50 +02:00
Julien Fontanet
c759df855d Minor fix. 2013-10-04 12:01:20 +02:00
Julien Fontanet
e105ce8c65 Various updates. 2013-10-04 11:59:30 +02:00
Julien Fontanet
9a813adf0e Various updates. 2013-10-03 17:53:07 +02:00
Julien Fontanet
e703824198 Stats are now generated only when needed and at most every 10s. 2013-10-03 14:23:50 +02:00
Julien Fontanet
9eb3973131 Minor fix. 2013-10-03 13:29:22 +02:00
Julien Fontanet
1f09d9e8b9 Various updates. 2013-10-02 19:02:33 +02:00
Julien Fontanet
10edf58bf9 Various updates. 2013-10-02 18:18:34 +02:00
Julien Fontanet
426dbf4fff Various updates. 2013-10-01 17:52:52 +02:00
Julien Fontanet
e68f1d64a3 Listen on all addresses per default. 2013-09-30 15:36:05 +02:00
Julien Fontanet
3f25d10e6f Fix: take “http.host” config entry into account. 2013-09-13 11:28:07 +02:00
Julien Fontanet
537e3b6f1f Minor fix. 2013-09-13 11:18:55 +02:00
Julien Fontanet
6988a3250b New stats (vatesfr/xo-web#29). 2013-09-13 11:12:21 +02:00
Julien Fontanet
4c902c5da5 Remove legacy files. 2013-09-12 14:53:51 +02:00
Julien Fontanet
f7c793ce8c Minor fix (fixes #12). 2013-09-11 12:59:47 +02:00
Julien Fontanet
ac69349822 Persistent users, tokens & servers using Redis (fixes #9 & #10). 2013-09-11 12:44:45 +02:00
Julien Fontanet
937345f0e0 Minor fix. 2013-09-05 12:45:48 +02:00
Julien Fontanet
34a77d4a11 Configuration file. 2013-09-03 13:40:04 +02:00
Julien Fontanet
e3519f571e Various updates. 2013-08-30 20:23:42 +02:00
Olivier Lambert
dd4a40ccab commented out default test server for better integration with appliance 2013-08-14 16:21:54 +01:00
Julien Fontanet
2d0e8d371a Include VIFs. 2013-08-14 13:10:43 +02:00
Julien Fontanet
a6f391dd68 Merge branch 'nodejs'.
This new version of XO-Server is now based on node.js instead of PHP.
2013-08-13 16:47:09 +02:00
Julien Fontanet
6dff423206 Minor updates. 2013-08-13 16:40:11 +02:00
Julien Fontanet
87b880d869 Do not crash when a server is unavailable (fixes #8). 2013-08-13 12:34:17 +02:00
Olivier Lambert
e53742e554 readme for nodejs version 2013-08-04 20:21:11 +02:00
Olivier Lambert
94b88d8f8a add some actions in backend: clean[reboot/shutdown] and start a VM 2013-08-02 16:02:07 +02:00
Olivier Lambert
0b9f8b8340 add unpause action 2013-08-01 12:36:01 +02:00
Olivier Lambert
e384c8f5a7 remove useless (at the moment) XAPI objects 2013-07-31 23:29:42 +02:00
Julien Fontanet
8ae74ee4fe Various updates. 2013-07-31 18:50:20 +02:00
Julien Fontanet
35a06a4364 Auto-connect to new servers. 2013-07-31 16:11:47 +02:00
Julien Fontanet
f9055952a4 Various updates. 2013-07-30 17:21:27 +02:00
Julien Fontanet
20e675a080 Various updates. 2013-07-30 13:25:51 +02:00
Julien Fontanet
199d107914 Minor fixes. 2013-07-29 12:52:14 +02:00
Julien Fontanet
7812266dea API change: XAPI objects are available through the “xapi” namespace. 2013-07-29 10:21:00 +02:00
Julien Fontanet
53af1f5fdd Expose (temporarily) the session ids. 2013-07-26 15:04:31 +02:00
Julien Fontanet
f619d3f9a7 Various updates. 2013-07-26 13:45:09 +02:00
Julien Fontanet
64e2dc3529 Initial connection with Xen Servers. 2013-07-25 15:08:24 +02:00
Julien Fontanet
cbd0b91d6b Minor fixes in the WebSocket-TCP proxy. 2013-07-24 13:17:12 +02:00
Chris Allard
f4d7ce72c2 Add new functions test 2013-07-24 11:19:07 +02:00
Julien Fontanet
3c52c56315 Various updates.
- Files in “public/http” are now served.
- The WebSocket API is now available at “/api/”.
- A WebSocket to TCP proxy is available at “/websockify”.
2013-07-24 10:48:34 +02:00
Olivier Lambert
c3119d1b29 fix Readme 2013-07-22 10:35:33 +02:00
Julien Fontanet
4b5d13fd19 Test updates. 2013-07-17 15:19:36 +02:00
Chris Allard
0fdceb2281 Test updates. 2013-07-17 10:45:21 +02:00
Julien Fontanet
9b2c56815b Various updates. 2013-07-16 15:36:35 +02:00
Julien Fontanet
c650a92a1d Various updates. 2013-07-16 13:51:44 +02:00
Julien Fontanet
c611cccc06 Various collection refactoring. 2013-07-16 11:48:54 +02:00
Julien Fontanet
4ea335b974 Various fixes. 2013-07-15 18:16:30 +02:00
Julien Fontanet
c140216fc3 Various updates. 2013-07-15 15:24:31 +02:00
Julien Fontanet
d01d89767a Code mutualization. 2013-07-12 14:16:19 +02:00
Julien Fontanet
9adfec28cf API method: server.getAll(). 2013-07-11 17:29:04 +02:00
Julien Fontanet
bcc400c7d7 Various updates. 2013-07-11 16:46:20 +02:00
Julien Fontanet
d80ff58bb8 Permission checking in user.create(). 2013-07-11 15:55:01 +02:00
Chris Allard
93bb0e9097 API method: user.getAll(). 2013-07-11 15:54:10 +02:00
Chris Allard
1c61ec3bd3 API method: user.changePassword(old, new). 2013-07-11 13:16:35 +02:00
Chris Allard
d3ec9a0669 API method: user.delete(id). 2013-07-11 11:41:45 +02:00
Julien Fontanet
00f0fee211 Various updates. 2013-07-11 11:17:08 +02:00
Julien Fontanet
c9cd1ebee2 Various updates. 2013-07-11 10:51:55 +02:00
Julien Fontanet
16667e0d40 Various updates. 2013-07-10 18:11:10 +02:00
Julien Fontanet
2134e3b4d1 Various updates. 2013-07-10 12:25:55 +02:00
Julien Fontanet
a51d7663c6 Various updates. 2013-07-09 10:55:18 +02:00
Julien Fontanet
09d71aff49 Minor simplification. 2013-07-08 18:43:55 +02:00
Julien Fontanet
d3361a3f1d Various updates. 2013-07-08 18:36:53 +02:00
Julien Fontanet
085400bd17 The “STREAM_CLIENT_ASYNC_CONNECT” seems to cause problems (see #7). 2013-07-08 14:29:01 +02:00
Julien Fontanet
479474d10a Various updates. 2013-07-08 12:05:52 +02:00
Julien Fontanet
92fb359108 Missing files. 2013-07-08 10:28:53 +02:00
Julien Fontanet
a4b58b1fd7 Minor updates. 2013-07-07 22:11:36 +02:00
Julien Fontanet
54019d7843 Various updates. 2013-07-06 17:07:38 +02:00
Julien Fontanet
a39a0a9d84 Missing files. 2013-07-05 13:09:48 +02:00
Julien Fontanet
ddf259f8b7 Various updates. 2013-07-05 13:09:20 +02:00
Julien Fontanet
22ce37c0cd Minor updates. 2013-06-28 18:35:08 +02:00
Julien Fontanet
fd05a1a9cf Various updates. 2013-06-25 19:02:54 +02:00
Julien Fontanet
ae091cdb8c Initial commit. 2013-06-15 15:42:55 +02:00
Julien Fontanet
acce572374 Best preferred host handling (vatesfr/xo-web#6). 2013-05-27 16:35:07 +02:00
Julien Fontanet
6cc3241eed XCP name is now deprecated.
The “xcp” entry in the configuration as been renamed “xen” (but compatibility is maintained).

Comments in the “local.php.dist” file as been clarified.
2013-05-23 10:30:08 +02:00
Julien Fontanet
1a7e9730e7 Do not send empty IPs in host_getAll() (see vatesfr/xo-web#9). 2013-05-16 15:01:10 +01:00
Julien Fontanet
8f46aa2242 Treat Dom0 differently than other VMs. 2013-05-16 11:52:52 +01:00
Julien Fontanet
ee1d1f3852 Minor comment update. 2013-05-16 10:30:07 +02:00
Julien Fontanet
5a32a55900 API[host.get]() returns software_version (related to vatesfr/xo-web#2). 2013-04-12 15:03:31 +02:00
Julien Fontanet
4327137cb0 Update dependencies. 2013-04-12 15:02:27 +02:00
Julien Fontanet
332aa1d2ef Clearer error messages in XCP connections. 2013-04-12 14:06:23 +02:00
Julien Fontanet
89596591e9 Typo. 2013-03-30 12:08:18 +01:00
Julien Fontanet
bbe4f8c6ef Minor fix. 2013-03-29 14:29:21 +01:00
Julien Fontanet
3c990f6d07 Various updates. 2013-03-28 22:24:08 +01:00
Julien Fontanet
4d608c5e7a Various updates. 2013-03-28 16:09:18 +01:00
Julien Fontanet
50647fd9b7 Various updates. 2013-03-27 18:02:29 +01:00
Julien Fontanet
5f26cd7342 Various updates. 2013-03-26 19:02:18 +01:00
Julien Fontanet
2c0913637b Various updates. 2013-03-26 16:37:51 +01:00
Julien Fontanet
1065fbc422 Various updates. 2013-03-26 13:57:56 +01:00
Julien Fontanet
ce1f58956a Various updates. 2013-03-25 18:48:10 +01:00
Julien Fontanet
25d00f2fcb Various updates. 2013-03-22 18:33:49 +01:00
Julien Fontanet
27178cfd09 Various updates. 2013-03-22 14:37:25 +01:00
Julien Fontanet
029a9293f0 Use call_user_func() instead of direct variable (only in PHP 5.4). 2013-03-04 18:13:15 +01:00
Julien Fontanet
1203149cb7 Various updates. 2013-03-04 15:57:07 +01:00
Julien Fontanet
0ab5c33ddf Various updates. 2013-03-03 14:46:58 +01:00
Julien Fontanet
1209143de7 Repository reorganization. 2013-03-02 17:40:01 +01:00
Julien Fontanet
bc2806bd05 Installation procedure update. 2013-02-08 15:38:29 +01:00
Julien Fontanet
65614921b5 README update. 2013-02-08 10:35:33 +01:00
Olivier Lambert
9ee3208cff adding README stuff 2013-02-07 19:42:29 +01:00
Julien Fontanet
abb2f50e10 Initial commit. 2013-02-07 18:25:07 +01:00
687 changed files with 64802 additions and 10679 deletions

View File

@@ -11,7 +11,7 @@ root = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespaces = true
trim_trailing_whitespace = true
# CoffeeScript
#
@@ -28,12 +28,12 @@ indent_style = space
# Package.json
#
# This indentation style is the one used by npm.
[/package.json]
[package.json]
indent_size = 2
indent_style = space
# Jade
[*.jade]
# Pug (Jade)
[*.{jade,pug}]
indent_size = 2
indent_style = space
@@ -41,7 +41,7 @@ indent_style = space
#
# Two spaces seems to be the standard most common style, at least in
# Node.js (http://nodeguide.com/style.html#tabs-vs-spaces).
[*.js]
[*.{js,jsx,ts,tsx}]
indent_size = 2
indent_style = space

View File

@@ -2,11 +2,21 @@ module.exports = {
extends: ['standard', 'standard-jsx'],
globals: {
__DEV__: true,
$Dict: true,
$Diff: true,
$Exact: true,
$Keys: true,
$PropertyType: true,
$Shape: true,
},
parser: 'babel-eslint',
rules: {
'comma-dangle': ['error', 'always-multiline'],
indent: 'off',
'no-var': 'error',
'node/no-extraneous-import': 'error',
'node/no-extraneous-require': 'error',
'prefer-const': 'error',
'react/jsx-indent': 'off',
},
}

16
.flowconfig Normal file
View File

@@ -0,0 +1,16 @@
[ignore]
<PROJECT_ROOT>/node_modules/.*
[include]
[libs]
[lints]
[options]
esproposal.decorators=ignore
esproposal.optional_chaining=enable
include_warnings=true
module.use_strict=true
[strict]

28
.gitignore vendored
View File

@@ -1,9 +1,31 @@
/dist/
/coverage/
/node_modules/
/src/common/intl/locales/index.js
/src/common/themes/index.js
/lerna-debug.log
/lerna-debug.log.*
/@xen-orchestra/*/dist/
/@xen-orchestra/*/node_modules/
/packages/*/dist/
/packages/*/node_modules/
/packages/vhd-cli/src/commands/index.js
/packages/xen-api/examples/node_modules/
/packages/xen-api/plot.dat
/packages/xo-server/.xo-server.*
/packages/xo-server/src/api/index.js
/packages/xo-server/src/xapi/mixins/index.js
/packages/xo-server/src/xo-mixins/index.js
/packages/xo-server-auth-ldap/ldap.cache.conf
/packages/xo-web/src/common/intl/locales/index.js
/packages/xo-web/src/common/themes/index.js
npm-debug.log
npm-debug.log.*
pnpm-debug.log
pnpm-debug.log.*
yarn-error.log
yarn-error.log.*

View File

@@ -1,4 +1,5 @@
module.exports = {
semi: false,
singleQuote: true,
trailingComma: 'es5',
}

View File

@@ -1,11 +1,26 @@
language: node_js
node_js:
- '6'
#- '4' # npm 3's flat tree is needed because some packages do not
# declare their deps correctly (e.g. chartist-plugin-tooltip)
cache: yarn
#- stable # disable for now due to an issue of indirect dep upath with Node 9
- 8
- 6
# Use containers.
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
addons:
apt:
packages:
- qemu-utils
- blktap-utils
- vmdk-stream-converter
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
cache:
yarn: true
script:
- yarn run test
- yarn run test-integration

View File

@@ -0,0 +1,63 @@
'use strict'
const PLUGINS_RE = /^(?:@babel\/|babel-)plugin-.+$/
const PRESETS_RE = /^@babel\/preset-.+$/
const NODE_ENV = process.env.NODE_ENV || 'development'
const __PROD__ = NODE_ENV === 'production'
const __TEST__ = NODE_ENV === 'test'
const configs = {
'@babel/plugin-proposal-decorators': {
legacy: true,
},
'@babel/preset-env' (pkg) {
return {
debug: !__TEST__,
loose: true,
shippedProposals: true,
targets: __PROD__
? (() => {
let node = (pkg.engines || {}).node
if (node !== undefined) {
const trimChars = '^=>~'
while (trimChars.includes(node[0])) {
node = node.slice(1)
}
return { node: node }
}
})()
: { browsers: '', node: 'current' },
useBuiltIns: '@babel/polyfill' in (pkg.dependencies || {}) && 'usage',
}
},
}
const getConfig = (key, ...args) => {
const config = configs[key]
return config === undefined
? {}
: typeof config === 'function'
? config(...args)
: config
}
module.exports = function (pkg, plugins, presets) {
plugins === undefined && (plugins = {})
presets === undefined && (presets = {})
Object.keys(pkg.devDependencies || {}).forEach(name => {
if (!(name in presets) && PLUGINS_RE.test(name)) {
plugins[name] = getConfig(name, pkg)
} else if (!(name in presets) && PRESETS_RE.test(name)) {
presets[name] = getConfig(name, pkg)
}
})
return {
comments: !__PROD__,
ignore: __TEST__ ? undefined : [/\.spec\.js$/],
plugins: Object.keys(plugins).map(plugin => [plugin, plugins[plugin]]),
presets: Object.keys(presets).map(preset => [preset, presets[preset]]),
}
}

View File

@@ -0,0 +1,11 @@
{
"private": true,
"name": "@xen-orchestra/babel-config",
"version": "0.0.0",
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/babel-config",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
}
}

View File

@@ -0,0 +1,3 @@
module.exports = require('../../@xen-orchestra/babel-config')(
require('./package.json')
)

View File

@@ -0,0 +1,24 @@
/benchmark/
/benchmarks/
*.bench.js
*.bench.js.map
/examples/
example.js
example.js.map
*.example.js
*.example.js.map
/fixture/
/fixtures/
*.fixture.js
*.fixture.js.map
*.fixtures.js
*.fixtures.js.map
/test/
/tests/
*.spec.js
*.spec.js.map
__snapshots__/

View File

@@ -0,0 +1,145 @@
# @xen-orchestra/cron [![Build Status](https://travis-ci.org/vatesfr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatesfr/xen-orchestra)
> Focused, well maintained, cron parser/scheduler
## Install
Installation of the [npm package](https://npmjs.org/package/@xen-orchestra/cron):
```
> npm install --save @xen-orchestra/cron
```
### Pattern syntax
```
<minute> <hour> <day of month> <month> <day of week>
```
Each entry can be:
- a single value
- a range (`0-23` or `*/2`)
- a list of values/ranges (`1,8-12`)
A wildcard (`*`) can be used as a shortcut for the whole range
(`first-last`).
Step values can be used in conjunctions with ranges. For instance,
`1-7/2` is the same as `1,3,5,7`.
| Field | Allowed values |
|------------------|----------------|
| minute | 0-59 |
| hour | 0-23 |
| day of the month | 1-31 or 3-letter names (`jan`, `feb`, …) |
| month | 0-11 |
| day of week | 0-7 (0 and 7 both mean Sunday) or 3-letter names (`mon`, `tue`, …) |
> Note: the month range is 0-11 to be compatible with
> [cron](https://github.com/kelektiv/node-cron), it does not appear to
> be very standard though.
### API
`createSchedule(pattern: string, zone: string = 'utc'): Schedule`
> Create a new schedule.
- `pattern`: the pattern to use, see [the syntax](#pattern-syntax)
- `zone`: the timezone to use, use `'local'` for the local timezone
```js
import { createSchedule } from '@xen-orchestra/cron'
const schedule = createSchedule('0 0 * * sun', 'America/New_York')
```
`Schedule#createJob(fn: Function): Job`
> Create a new job from this schedule.
- `fn`: function to execute, if it returns a promise, it will be
awaited before scheduling the next run.
```js
const job = schedule.createJob(() => {
console.log(new Date())
})
```
`Schedule#next(n: number): Array<Date>`
> Returns the next dates matching this schedule.
- `n`: number of dates to return
```js
schedule.next(2)
// [ 2018-02-11T05:00:00.000Z, 2018-02-18T05:00:00.000Z ]
```
`Schedule#startJob(fn: Function): () => void`
> Start a new job from this schedule and return a function to stop it.
- `fn`: function to execute, if it returns a promise, it will be
awaited before scheduling the next run.
```js
const stopJob = schedule.startJob(() => {
console.log(new Date())
})
stopJob()
```
`Job#start(): void`
> Start this job.
```js
job.start()
```
`Job#stop(): void`
> Stop this job.
```js
job.stop()
```
## Development
```
# Install dependencies
> yarn
# Run the tests
> yarn test
# Continuously compile
> yarn dev
# Continuously run the tests
> yarn dev-test
# Build for production (automatically called by npm install)
> yarn build
```
## Contributions
Contributions are *very* welcomed, either on the documentation or on
the code.
You may:
- report any [issue](https://github.com/vatesfr/xen-orchestra/issues)
you've encountered;
- fork and create a pull request.
## License
ISC © [Vates SAS](https://vates.fr)

View File

@@ -0,0 +1,59 @@
{
"name": "@xen-orchestra/cron",
"version": "1.0.3",
"license": "ISC",
"description": "Focused, well maintained, cron parser/scheduler",
"keywords": [
"cron",
"cronjob",
"crontab",
"job",
"parser",
"pattern",
"schedule",
"scheduling",
"task"
],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/cron",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"author": {
"name": "Julien Fontanet",
"email": "julien.fontanet@isonoe.net"
},
"preferGlobal": false,
"main": "dist/",
"bin": {},
"files": [
"dist/"
],
"browserslist": [
">2%"
],
"engines": {
"node": ">=6"
},
"dependencies": {
"lodash": "^4.17.4",
"moment-timezone": "^0.5.14"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
"@babel/core": "7.0.0-beta.49",
"@babel/preset-env": "7.0.0-beta.49",
"@babel/preset-flow": "7.0.0-beta.49",
"cross-env": "^5.1.3",
"rimraf": "^2.6.2"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"clean": "rimraf dist/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"prebuild": "yarn run clean",
"predev": "yarn run clean",
"prepublishOnly": "yarn run build"
}
}

View File

@@ -0,0 +1,76 @@
import moment from 'moment-timezone'
import next from './next'
import parse from './parse'
const MAX_DELAY = 2 ** 31 - 1
class Job {
constructor (schedule, fn) {
const wrapper = () => {
const result = fn()
let then
if (result != null && typeof (then = result.then) === 'function') {
then.call(result, scheduleNext, scheduleNext)
} else {
scheduleNext()
}
}
const scheduleNext = () => {
const delay = schedule._nextDelay()
this._timeout =
delay < MAX_DELAY
? setTimeout(wrapper, delay)
: setTimeout(scheduleNext, MAX_DELAY)
}
this._scheduleNext = scheduleNext
this._timeout = undefined
}
start () {
this.stop()
this._scheduleNext()
}
stop () {
clearTimeout(this._timeout)
}
}
class Schedule {
constructor (pattern, zone = 'utc') {
this._schedule = parse(pattern)
this._createDate =
zone.toLowerCase() === 'utc'
? moment.utc
: zone === 'local' ? moment : () => moment.tz(zone)
}
createJob (fn) {
return new Job(this, fn)
}
next (n) {
const dates = new Array(n)
const schedule = this._schedule
let date = this._createDate()
for (let i = 0; i < n; ++i) {
dates[i] = (date = next(schedule, date)).toDate()
}
return dates
}
_nextDelay () {
const now = this._createDate()
return next(this._schedule, now) - now
}
startJob (fn) {
const job = this.createJob(fn)
job.start()
return job.stop.bind(job)
}
}
export const createSchedule = (...args) => new Schedule(...args)

View File

@@ -0,0 +1,89 @@
import moment from 'moment-timezone'
import sortedIndex from 'lodash/sortedIndex'
const NEXT_MAPPING = {
month: { year: 1 },
date: { month: 1 },
day: { week: 1 },
hour: { day: 1 },
minute: { hour: 1 },
}
const getFirst = values => (values !== undefined ? values[0] : 0)
const setFirstAvailable = (date, unit, values) => {
if (values === undefined) {
return
}
const curr = date.get(unit)
const next = values[sortedIndex(values, curr) % values.length]
if (curr === next) {
return
}
const timestamp = +date
date.set(unit, next)
if (timestamp > +date) {
date.add(NEXT_MAPPING[unit])
}
return true
}
// returns the next run, after the passed date
export default (schedule, fromDate) => {
let date = moment(fromDate)
.set({
second: 0,
millisecond: 0,
})
.add({ minute: 1 })
const { minute, hour, dayOfMonth, month, dayOfWeek } = schedule
setFirstAvailable(date, 'minute', minute)
if (setFirstAvailable(date, 'hour', hour)) {
date.set('minute', getFirst(minute))
}
let loop
let i = 0
do {
loop = false
if (setFirstAvailable(date, 'month', month)) {
date.set({
date: 1,
hour: getFirst(hour),
minute: getFirst(minute),
})
}
let newDate = date.clone()
if (dayOfMonth === undefined) {
if (dayOfWeek !== undefined) {
setFirstAvailable(newDate, 'day', dayOfWeek)
}
} else if (dayOfWeek === undefined) {
setFirstAvailable(newDate, 'date', dayOfMonth)
} else {
const dateDay = newDate.clone()
setFirstAvailable(dateDay, 'date', dayOfMonth)
setFirstAvailable(newDate, 'day', dayOfWeek)
newDate = moment.min(dateDay, newDate)
}
if (+date !== +newDate) {
loop = date.month() !== newDate.month()
date = newDate.set({
hour: getFirst(hour),
minute: getFirst(minute),
})
}
} while (loop && ++i < 5)
if (loop) {
throw new Error('no solutions found for this schedule')
}
return date
}

View File

@@ -0,0 +1,48 @@
/* eslint-env jest */
import mapValues from 'lodash/mapValues'
import moment from 'moment-timezone'
import next from './next'
import parse from './parse'
const N = (pattern, fromDate = '2018-04-09T06:25') => {
const iso = next(parse(pattern), moment.utc(fromDate)).toISOString()
return iso.slice(0, iso.lastIndexOf(':'))
}
describe('next()', () => {
mapValues(
{
minutely: ['* * * * *', '2018-04-09T06:26'],
hourly: ['@hourly', '2018-04-09T07:00'],
daily: ['@daily', '2018-04-10T00:00'],
monthly: ['@monthly', '2018-05-01T00:00'],
yearly: ['@yearly', '2019-01-01T00:00'],
weekly: ['@weekly', '2018-04-15T00:00'],
},
([pattern, result], title) =>
it(title, () => {
expect(N(pattern)).toBe(result)
})
)
it('select first between month-day and week-day', () => {
expect(N('* * 10 * wen')).toBe('2018-04-10T00:00')
expect(N('* * 12 * wen')).toBe('2018-04-11T00:00')
})
it('select the last available day of a month', () => {
expect(N('* * 29 feb *')).toBe('2020-02-29T00:00')
})
it('fails when no solutions has been found', () => {
expect(() => N('0 0 30 feb *')).toThrow(
'no solutions found for this schedule'
)
})
it('select the first sunday of the month', () => {
expect(N('* * * * 0', '2018-03-31T00:00')).toBe('2018-04-01T00:00')
})
})

View File

@@ -0,0 +1,193 @@
const compareNumbers = (a, b) => a - b
const createParser = ({ fields: [...fields], presets: { ...presets } }) => {
const m = fields.length
for (let j = 0; j < m; ++j) {
const field = fields[j]
let { aliases } = field
if (aliases !== undefined) {
let symbols = aliases
if (Array.isArray(aliases)) {
aliases = {}
const [start] = field.range
symbols.forEach((alias, i) => {
aliases[alias] = start + i
})
} else {
symbols = Object.keys(aliases)
}
fields[j] = {
...field,
aliases,
aliasesRegExp: new RegExp(symbols.join('|'), 'y'),
}
}
}
let field, i, n, pattern, schedule, values
const isDigit = c => c >= '0' && c <= '9'
const match = c => pattern[i] === c && (++i, true)
const consumeWhitespaces = () => {
let c
while ((c = pattern[i]) === ' ' || c === '\t') {
++i
}
}
const parseInteger = () => {
let c
const digits = []
while (isDigit((c = pattern[i]))) {
++i
digits.push(c)
}
if (digits.length === 0) {
throw new SyntaxError(`${field.name}: missing integer at character ${i}`)
}
return Number.parseInt(digits.join(''), 10)
}
const parseValue = () => {
let value
const { aliasesRegExp } = field
if (aliasesRegExp === undefined || isDigit(pattern[i])) {
value = parseInteger()
const { post } = field
if (post !== undefined) {
value = post(value)
}
} else {
aliasesRegExp.lastIndex = i
const matches = aliasesRegExp.exec(pattern)
if (matches === null) {
throw new SyntaxError(
`${field.name}: missing alias or integer at character ${i}`
)
}
const [alias] = matches
i += alias.length
value = field.aliases[alias]
}
const { range } = field
if (value < range[0] || value > range[1]) {
throw new SyntaxError(
`${field.name}: ${value} is not between ${range[0]} and ${range[1]}`
)
}
return value
}
const parseRange = () => {
let end, start, step
if (match('*')) {
if (!match('/')) {
return
}
;[start, end] = field.range
step = parseInteger()
} else {
start = parseValue()
if (!match('-')) {
values.add(start)
return
}
end = parseValue()
step = match('/') ? parseInteger() : 1
}
for (let i = start; i <= end; i += step) {
values.add(i)
}
}
const parseSequence = () => {
do {
parseRange()
} while (match(','))
}
const parse = p => {
{
const schedule = presets[p]
if (schedule !== undefined) {
return typeof schedule === 'string'
? (presets[p] = parse(schedule))
: schedule
}
}
try {
i = 0
n = p.length
pattern = p
schedule = {}
for (let j = 0; j < m; ++j) {
consumeWhitespaces()
field = fields[j]
values = new Set()
parseSequence()
if (values.size !== 0) {
schedule[field.name] = Array.from(values).sort(compareNumbers)
}
}
consumeWhitespaces()
if (i !== n) {
throw new SyntaxError(
`unexpected character at offset ${i}, expected end`
)
}
return schedule
} finally {
field = pattern = schedule = values = undefined
}
}
return parse
}
export default createParser({
fields: [
{
name: 'minute',
range: [0, 59],
},
{
name: 'hour',
range: [0, 23],
},
{
name: 'dayOfMonth',
range: [1, 31],
},
{
aliases: 'jan feb mar apr may jun jul aug sep oct nov dec'.split(' '),
name: 'month',
range: [0, 11],
},
{
aliases: 'sun mon tue wen thu fri sat'.split(' '),
name: 'dayOfWeek',
post: value => (value === 7 ? 0 : value),
range: [0, 6],
},
],
presets: {
'@annually': '0 0 1 jan *',
'@daily': '0 0 * * *',
'@hourly': '0 * * * *',
'@monthly': '0 0 1 * *',
'@weekly': '0 0 * * sun',
'@yearly': '0 0 1 jan *',
},
})

View File

@@ -0,0 +1,49 @@
/* eslint-env jest */
import parse from './parse'
describe('parse()', () => {
it('works', () => {
expect(parse('0 0-10 */10 jan,2,4-11/3 *')).toEqual({
minute: [0],
hour: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
dayOfMonth: [1, 11, 21, 31],
month: [0, 2, 4, 7, 10],
})
})
it('correctly parse months', () => {
expect(parse('* * * 0,11 *')).toEqual({
month: [0, 11],
})
expect(parse('* * * jan,dec *')).toEqual({
month: [0, 11],
})
})
it('correctly parse days', () => {
expect(parse('* * * * mon,sun')).toEqual({
dayOfWeek: [0, 1],
})
})
it('reports missing integer', () => {
expect(() => parse('*/a')).toThrow('minute: missing integer at character 2')
expect(() => parse('*')).toThrow('hour: missing integer at character 1')
})
it('reports invalid aliases', () => {
expect(() => parse('* * * jan-foo *')).toThrow(
'month: missing alias or integer at character 10'
)
})
it('dayOfWeek: 0 and 7 bind to sunday', () => {
expect(parse('* * * * 0')).toEqual({
dayOfWeek: [0],
})
expect(parse('* * * * 7')).toEqual({
dayOfWeek: [0],
})
})
})

View File

@@ -0,0 +1,3 @@
module.exports = require('../../@xen-orchestra/babel-config')(
require('./package.json')
)

View File

@@ -0,0 +1,54 @@
{
"name": "@xen-orchestra/fs",
"version": "0.1.0",
"license": "AGPL-3.0",
"description": "The File System for Xen Orchestra backups.",
"keywords": [],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/@xen-orchestra/fs",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"preferGlobal": true,
"main": "dist/",
"bin": {},
"files": [
"dist/"
],
"engines": {
"node": ">=6"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.49",
"@marsaud/smb2-promise": "^0.2.1",
"execa": "^0.10.0",
"fs-extra": "^6.0.1",
"get-stream": "^3.0.0",
"lodash": "^4.17.4",
"promise-toolbox": "^0.9.5",
"through2": "^2.0.3",
"tmp": "^0.0.33",
"xo-remote-parser": "^0.3"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
"@babel/core": "7.0.0-beta.49",
"@babel/plugin-proposal-function-bind": "7.0.0-beta.49",
"@babel/plugin-transform-runtime": "^7.0.0-beta.49",
"@babel/preset-env": "7.0.0-beta.49",
"@babel/preset-flow": "7.0.0-beta.49",
"babel-plugin-lodash": "^3.3.2",
"cross-env": "^5.1.3",
"index-modules": "^0.3.0",
"rimraf": "^2.6.2"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"clean": "rimraf dist/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"prebuild": "yarn run clean",
"predev": "yarn run clean",
"prepare": "yarn run build"
}
}

View File

@@ -0,0 +1,307 @@
// @flow
import getStream from 'get-stream'
import { randomBytes } from 'crypto'
import { fromCallback, fromEvent, ignoreErrors } from 'promise-toolbox'
import { type Readable, type Writable } from 'stream'
import { parse } from 'xo-remote-parser'
import { createChecksumStream, validChecksumOfReadStream } from './checksum'
type Data = Buffer | Readable | string
type FileDescriptor = {| fd: mixed, path: string |}
type LaxReadable = Readable & Object
type LaxWritable = Writable & Object
type File = FileDescriptor | string
const checksumFile = file => file + '.checksum'
export default class RemoteHandlerAbstract {
_remote: Object
constructor (remote: any) {
this._remote = { ...remote, ...parse(remote.url) }
if (this._remote.type !== this.type) {
throw new Error('Incorrect remote type')
}
}
get type (): string {
throw new Error('Not implemented')
}
/**
* Asks the handler to sync the state of the effective remote with its' metadata
*/
async sync (): Promise<mixed> {
return this._sync()
}
async _sync (): Promise<mixed> {
throw new Error('Not implemented')
}
/**
* Free the resources possibly dedicated to put the remote at work, when it is no more needed
*/
async forget (): Promise<void> {
await this._forget()
}
async _forget (): Promise<void> {
throw new Error('Not implemented')
}
async test (): Promise<Object> {
const testFileName = `${Date.now()}.test`
const data = await fromCallback(cb => randomBytes(1024 * 1024, cb))
let step = 'write'
try {
await this.outputFile(testFileName, data)
step = 'read'
const read = await this.readFile(testFileName)
if (data.compare(read) !== 0) {
throw new Error('output and input did not match')
}
return {
success: true,
}
} catch (error) {
return {
success: false,
step,
file: testFileName,
error: error.message || String(error),
}
} finally {
ignoreErrors.call(this.unlink(testFileName))
}
}
async outputFile (file: string, data: Data, options?: Object): Promise<void> {
return this._outputFile(file, data, {
flags: 'wx',
...options,
})
}
async _outputFile (file: string, data: Data, options?: Object): Promise<void> {
const stream = await this.createOutputStream(file, options)
const promise = fromEvent(stream, 'finish')
stream.end(data)
await promise
}
async read (
file: File,
buffer: Buffer,
position?: number
): Promise<{| bytesRead: number, buffer: Buffer |}> {
return this._read(file, buffer, position)
}
_read (
file: File,
buffer: Buffer,
position?: number
): Promise<{| bytesRead: number, buffer: Buffer |}> {
throw new Error('Not implemented')
}
async readFile (file: string, options?: Object): Promise<Buffer> {
return this._readFile(file, options)
}
_readFile (file: string, options?: Object): Promise<Buffer> {
return this.createReadStream(file, options).then(getStream.buffer)
}
async rename (
oldPath: string,
newPath: string,
{ checksum = false }: Object = {}
) {
let p = this._rename(oldPath, newPath)
if (checksum) {
p = Promise.all([
p,
this._rename(checksumFile(oldPath), checksumFile(newPath)),
])
}
return p
}
async _rename (oldPath: string, newPath: string) {
throw new Error('Not implemented')
}
async list (
dir: string = '.',
{
filter,
prependDir = false,
}: { filter?: (name: string) => boolean, prependDir?: boolean } = {}
): Promise<string[]> {
let entries = await this._list(dir)
if (filter !== undefined) {
entries = entries.filter(filter)
}
if (prependDir) {
entries.forEach((entry, i) => {
entries[i] = dir + '/' + entry
})
}
return entries
}
async _list (dir: string): Promise<string[]> {
throw new Error('Not implemented')
}
createReadStream (
file: string,
{ checksum = false, ignoreMissingChecksum = false, ...options }: Object = {}
): Promise<LaxReadable> {
const path = typeof file === 'string' ? file : file.path
const streamP = this._createReadStream(file, options).then(stream => {
// detect early errors
let promise = fromEvent(stream, 'readable')
// try to add the length prop if missing and not a range stream
if (
stream.length === undefined &&
options.end === undefined &&
options.start === undefined
) {
promise = Promise.all([
promise,
ignoreErrors.call(
this.getSize(file).then(size => {
stream.length = size
})
),
])
}
return promise.then(() => stream)
})
if (!checksum) {
return streamP
}
// avoid a unhandled rejection warning
ignoreErrors.call(streamP)
return this.readFile(checksumFile(path)).then(
checksum =>
streamP.then(stream => {
const { length } = stream
stream = (validChecksumOfReadStream(
stream,
String(checksum).trim()
): LaxReadable)
stream.length = length
return stream
}),
error => {
if (ignoreMissingChecksum && error && error.code === 'ENOENT') {
return streamP
}
throw error
}
)
}
async _createReadStream (
file: string,
options?: Object
): Promise<LaxReadable> {
throw new Error('Not implemented')
}
async openFile (path: string, flags?: string): Promise<FileDescriptor> {
return { fd: await this._openFile(path, flags), path }
}
async _openFile (path: string, flags?: string): Promise<mixed> {
throw new Error('Not implemented')
}
async closeFile (fd: FileDescriptor): Promise<void> {
await this._closeFile(fd.fd)
}
async _closeFile (fd: mixed): Promise<void> {
throw new Error('Not implemented')
}
async refreshChecksum (path: string): Promise<void> {
const stream = (await this.createReadStream(path)).pipe(
createChecksumStream()
)
stream.resume() // start reading the whole file
await this.outputFile(checksumFile(path), await stream.checksum)
}
async createOutputStream (
file: File,
{ checksum = false, ...options }: Object = {}
): Promise<LaxWritable> {
const path = typeof file === 'string' ? file : file.path
const streamP = this._createOutputStream(file, {
flags: 'wx',
...options,
})
if (!checksum) {
return streamP
}
const checksumStream = createChecksumStream()
const forwardError = error => {
checksumStream.emit('error', error)
}
const stream = await streamP
stream.on('error', forwardError)
checksumStream.pipe(stream)
// $FlowFixMe
checksumStream.checksumWritten = checksumStream.checksum
.then(value => this.outputFile(checksumFile(path), value))
.catch(forwardError)
return checksumStream
}
async _createOutputStream (
file: mixed,
options?: Object
): Promise<LaxWritable> {
throw new Error('Not implemented')
}
async unlink (file: string, { checksum = true }: Object = {}): Promise<void> {
if (checksum) {
ignoreErrors.call(this._unlink(checksumFile(file)))
}
await this._unlink(file)
}
async _unlink (file: mixed): Promise<void> {
throw new Error('Not implemented')
}
async getSize (file: mixed): Promise<number> {
return this._getSize(file)
}
async _getSize (file: mixed): Promise<number> {
throw new Error('Not implemented')
}
}

View File

@@ -0,0 +1,100 @@
// @flow
// $FlowFixMe
import through2 from 'through2'
import { createHash } from 'crypto'
import { defer, fromEvent } from 'promise-toolbox'
import { invert } from 'lodash'
import { type Readable, type Transform } from 'stream'
// Format: $<algorithm>$<salt>$<encrypted>
//
// http://man7.org/linux/man-pages/man3/crypt.3.html#NOTES
const ALGORITHM_TO_ID = {
md5: '1',
sha256: '5',
sha512: '6',
}
const ID_TO_ALGORITHM = invert(ALGORITHM_TO_ID)
// Create a through stream which computes the checksum of all data going
// through.
//
// The `checksum` attribute is a promise which resolves at the end of the stream
// with a string representation of the checksum.
//
// const source = ...
// const checksumStream = source.pipe(createChecksumStream())
// checksumStream.resume() // make the data flow without an output
// console.log(await checksumStream.checksum)
export const createChecksumStream = (
algorithm: string = 'md5'
): Transform & { checksum: Promise<string> } => {
const algorithmId = ALGORITHM_TO_ID[algorithm]
if (!algorithmId) {
throw new Error(`unknown algorithm: ${algorithm}`)
}
const hash = createHash(algorithm)
const { promise, resolve, reject } = defer()
const stream = through2(
(chunk, enc, callback) => {
hash.update(chunk)
callback(null, chunk)
},
callback => {
resolve(`$${algorithmId}$$${hash.digest('hex')}`)
callback()
}
).once('error', reject)
stream.checksum = promise
return stream
}
// Check if the checksum of a readable stream is equals to an expected checksum.
// The given stream is wrapped in a stream which emits an error event
// if the computed checksum is not equals to the expected checksum.
export const validChecksumOfReadStream = (
stream: Readable,
expectedChecksum: string
): Readable & { checksumVerified: Promise<void> } => {
const algorithmId = expectedChecksum.slice(
1,
expectedChecksum.indexOf('$', 1)
)
if (!algorithmId) {
throw new Error(`unknown algorithm: ${algorithmId}`)
}
const hash = createHash(ID_TO_ALGORITHM[algorithmId])
const wrapper: any = stream.pipe(
through2(
{ highWaterMark: 0 },
(chunk, enc, callback) => {
hash.update(chunk)
callback(null, chunk)
},
callback => {
const checksum = `$${algorithmId}$$${hash.digest('hex')}`
callback(
checksum !== expectedChecksum
? new Error(
`Bad checksum (${checksum}), expected: ${expectedChecksum}`
)
: null
)
}
)
)
stream.on('error', error => wrapper.emit('error', error))
wrapper.checksumVerified = fromEvent(wrapper, 'end')
return wrapper
}

View File

@@ -0,0 +1,26 @@
/* eslint-env jest */
import rimraf from 'rimraf'
import tmp from 'tmp'
import { fromCallback as pFromCallback } from 'promise-toolbox'
import { getHandler } from '.'
const initialDir = process.cwd()
beforeEach(async () => {
const dir = await pFromCallback(cb => tmp.dir(cb))
process.chdir(dir)
})
afterEach(async () => {
const tmpDir = process.cwd()
process.chdir(initialDir)
await pFromCallback(cb => rimraf(tmpDir, cb))
})
test("fs test doesn't crash", async () => {
const handler = getHandler({ url: 'file://' + process.cwd() })
const result = await handler.test()
expect(result.success).toBeTruthy()
})

View File

@@ -0,0 +1,26 @@
// @flow
import type RemoteHandler from './abstract'
import RemoteHandlerLocal from './local'
import RemoteHandlerNfs from './nfs'
import RemoteHandlerSmb from './smb'
export type { default as RemoteHandler } from './abstract'
export type Remote = { url: string }
const HANDLERS = {
file: RemoteHandlerLocal,
smb: RemoteHandlerSmb,
nfs: RemoteHandlerNfs,
}
export const getHandler = (remote: Remote): RemoteHandler => {
// FIXME: should be done in xo-remote-parser.
const type = remote.url.split('://')[0]
const Handler = HANDLERS[type]
if (!Handler) {
throw new Error('Unhandled remote type')
}
return new Handler(remote)
}

View File

@@ -0,0 +1,132 @@
import fs from 'fs-extra'
import { dirname, resolve } from 'path'
import { noop, startsWith } from 'lodash'
import RemoteHandlerAbstract from './abstract'
export default class LocalHandler extends RemoteHandlerAbstract {
get type () {
return 'file'
}
_getRealPath () {
return this._remote.path
}
_getFilePath (file) {
const realPath = this._getRealPath()
const parts = [realPath]
if (file) {
parts.push(file)
}
const path = resolve.apply(null, parts)
if (!startsWith(path, realPath)) {
throw new Error('Remote path is unavailable')
}
return path
}
async _sync () {
if (this._remote.enabled) {
try {
const path = this._getRealPath()
await fs.ensureDir(path)
await fs.access(path, fs.R_OK | fs.W_OK)
} catch (exc) {
this._remote.enabled = false
this._remote.error = exc.message
}
}
return this._remote
}
async _forget () {
return noop()
}
async _outputFile (file, data, options) {
const path = this._getFilePath(file)
await fs.ensureDir(dirname(path))
await fs.writeFile(path, data, options)
}
async _read (file, buffer, position) {
const needsClose = typeof file === 'string'
file = needsClose ? await fs.open(this._getFilePath(file), 'r') : file.fd
try {
return await fs.read(
file,
buffer,
0,
buffer.length,
position === undefined ? null : position
)
} finally {
if (needsClose) {
await fs.close(file)
}
}
}
async _readFile (file, options) {
return fs.readFile(this._getFilePath(file), options)
}
async _rename (oldPath, newPath) {
return fs.rename(this._getFilePath(oldPath), this._getFilePath(newPath))
}
async _list (dir = '.') {
return fs.readdir(this._getFilePath(dir))
}
async _createReadStream (file, options) {
if (typeof file === 'string') {
return fs.createReadStream(this._getFilePath(file), options)
} else {
return fs.createReadStream('', {
autoClose: false,
...options,
fd: file.fd,
})
}
}
async _createOutputStream (file, options) {
if (typeof file === 'string') {
const path = this._getFilePath(file)
await fs.ensureDir(dirname(path))
return fs.createWriteStream(path, options)
} else {
return fs.createWriteStream('', {
autoClose: false,
...options,
fd: file.fd,
})
}
}
async _unlink (file) {
return fs.unlink(this._getFilePath(file)).catch(error => {
// do not throw if the file did not exist
if (error == null || error.code !== 'ENOENT') {
throw error
}
})
}
async _getSize (file) {
const stats = await fs.stat(
this._getFilePath(typeof file === 'string' ? file : file.path)
)
return stats.size
}
async _openFile (path, flags) {
return fs.open(this._getFilePath(path), flags)
}
async _closeFile (fd) {
return fs.close(fd)
}
}

View File

@@ -0,0 +1,96 @@
import execa from 'execa'
import fs from 'fs-extra'
import { forEach } from 'lodash'
import LocalHandler from './local'
export default class NfsHandler extends LocalHandler {
get type () {
return 'nfs'
}
_getRealPath () {
return `/run/xo-server/mounts/${this._remote.id}`
}
async _loadRealMounts () {
let stdout
const mounted = {}
try {
stdout = await execa.stdout('findmnt', [
'-P',
'-t',
'nfs,nfs4',
'--output',
'SOURCE,TARGET',
'--noheadings',
])
const regex = /^SOURCE="([^:]*):(.*)" TARGET="(.*)"$/
forEach(stdout.split('\n'), m => {
if (m) {
const match = regex.exec(m)
mounted[match[3]] = {
host: match[1],
share: match[2],
}
}
})
} catch (exc) {
// When no mounts are found, the call pretends to fail...
if (exc.stderr !== '') {
throw exc
}
}
this._realMounts = mounted
return mounted
}
_matchesRealMount () {
return this._getRealPath() in this._realMounts
}
async _mount () {
await fs.ensureDir(this._getRealPath())
return execa('mount', [
'-t',
'nfs',
'-o',
'vers=3',
`${this._remote.host}:${this._remote.path}`,
this._getRealPath(),
])
}
async _sync () {
await this._loadRealMounts()
if (this._matchesRealMount() && !this._remote.enabled) {
try {
await this._umount(this._remote)
} catch (exc) {
this._remote.enabled = true
this._remote.error = exc.message
}
} else if (!this._matchesRealMount() && this._remote.enabled) {
try {
await this._mount()
} catch (exc) {
this._remote.enabled = false
this._remote.error = exc.message
}
}
return this._remote
}
async _forget () {
try {
await this._umount(this._remote)
} catch (_) {
// We have to go on...
}
}
async _umount (remote) {
await execa('umount', ['--force', this._getRealPath()])
}
}

View File

@@ -0,0 +1,217 @@
import Smb2 from '@marsaud/smb2-promise'
import { lastly as pFinally } from 'promise-toolbox'
import RemoteHandlerAbstract from './abstract'
const noop = () => {}
// Normalize the error code for file not found.
const normalizeError = error => {
const { code } = error
return code === 'STATUS_OBJECT_NAME_NOT_FOUND' ||
code === 'STATUS_OBJECT_PATH_NOT_FOUND'
? Object.create(error, {
code: {
configurable: true,
readable: true,
value: 'ENOENT',
writable: true,
},
})
: error
}
export default class SmbHandler extends RemoteHandlerAbstract {
constructor (remote) {
super(remote)
this._forget = noop
}
get type () {
return 'smb'
}
_getClient (remote) {
return new Smb2({
share: `\\\\${remote.host}`,
domain: remote.domain,
username: remote.username,
password: remote.password,
autoCloseTimeout: 0,
})
}
_getFilePath (file) {
if (file === '.') {
file = undefined
}
let path = this._remote.path !== '' ? this._remote.path : ''
// Ensure remote path is a directory.
if (path !== '' && path[path.length - 1] !== '\\') {
path += '\\'
}
if (file) {
path += file.replace(/\//g, '\\')
}
return path
}
_dirname (file) {
const parts = file.split('\\')
parts.pop()
return parts.join('\\')
}
async _sync () {
if (this._remote.enabled) {
try {
// Check access (smb2 does not expose connect in public so far...)
await this.list()
} catch (error) {
this._remote.enabled = false
this._remote.error = error.message
}
}
return this._remote
}
async _outputFile (file, data, options = {}) {
const client = this._getClient(this._remote)
const path = this._getFilePath(file)
const dir = this._dirname(path)
if (dir) {
await client.ensureDir(dir)
}
return client.writeFile(path, data, options)::pFinally(() => {
client.close()
})
}
async _readFile (file, options = {}) {
const client = this._getClient(this._remote)
let content
try {
content = await client
.readFile(this._getFilePath(file), options)
::pFinally(() => {
client.close()
})
} catch (error) {
throw normalizeError(error)
}
return content
}
async _rename (oldPath, newPath) {
const client = this._getClient(this._remote)
try {
await client
.rename(this._getFilePath(oldPath), this._getFilePath(newPath))
::pFinally(() => {
client.close()
})
} catch (error) {
throw normalizeError(error)
}
}
async _list (dir = '.') {
const client = this._getClient(this._remote)
let list
try {
list = await client.readdir(this._getFilePath(dir))::pFinally(() => {
client.close()
})
} catch (error) {
throw normalizeError(error)
}
return list
}
async _createReadStream (file, options = {}) {
if (typeof file !== 'string') {
file = file.path
}
const client = this._getClient(this._remote)
let stream
try {
// FIXME ensure that options are properly handled by @marsaud/smb2
stream = await client.createReadStream(this._getFilePath(file), options)
stream.on('end', () => client.close())
} catch (error) {
throw normalizeError(error)
}
return stream
}
async _createOutputStream (file, options = {}) {
if (typeof file !== 'string') {
file = file.path
}
const client = this._getClient(this._remote)
const path = this._getFilePath(file)
const dir = this._dirname(path)
let stream
try {
if (dir) {
await client.ensureDir(dir)
}
stream = await client.createWriteStream(path, options) // FIXME ensure that options are properly handled by @marsaud/smb2
} catch (err) {
client.close()
throw err
}
stream.on('finish', () => client.close())
return stream
}
async _unlink (file) {
const client = this._getClient(this._remote)
try {
await client.unlink(this._getFilePath(file))::pFinally(() => {
client.close()
})
} catch (error) {
throw normalizeError(error)
}
}
async _getSize (file) {
const client = await this._getClient(this._remote)
let size
try {
size = await client
.getSize(this._getFilePath(typeof file === 'string' ? file : file.path))
::pFinally(() => {
client.close()
})
} catch (error) {
throw normalizeError(error)
}
return size
}
// this is a fake
async _openFile (path) {
return this._getFilePath(path)
}
async _closeFile (fd) {}
}

File diff suppressed because it is too large Load Diff

46
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at julien.fontanet@vates.fr. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -6,18 +6,17 @@ Here you can:
- propose an enhancement
- ask a question
The template below is only a proposition for your ticket, feel free to
change it as appropriate :)
Please, respect this template as much as possible, it helps us sort
the issues :)
-->
### Context
- **XO version**: XO appliance / `stable` branch / `next-release` branch
If from the sources:
- **Component**: xo-web / xo-server / *unknown*
- **Node/npm version**: *just execute `npm version`*
- **XO origin**: the sources / XO Appliance
- **Versions**:
- Node: **FILL HERE**
- xo-web: **FILL HERE**
- xo-server: **FILL HERE**
### Expected behavior

19
PULL_REQUEST_TEMPLATE.md Normal file
View File

@@ -0,0 +1,19 @@
### Check list
> Check items when done or if not relevant
- [ ] PR reference the relevant issue (e.g. `Fixes #007`)
- [ ] if UI changes, a screenshot has been added to the PR
- [ ] CHANGELOG updated
- [ ] documentation updated
### Process
1. create a PR as soon as possible
1. mark it as `WiP:` (Work in Progress) if not ready to be merged
1. when you want a review, add a reviewer
1. if necessary, update your PR, and readd a reviewer
### List of packages to release
> No need to mention xo-server and xo-web.

View File

@@ -1,91 +1,11 @@
# Xen Orchestra Web [![Chat with us](https://storage.crisp.im/plugins/images/936925df-f37b-4ba8-bab0-70cd2edcb0be/badge.svg)](https://go.crisp.im/chat/embed/?website_id=-JzqzzwddSV7bKGtEyAQ) [![Build Status](https://travis-ci.org/vatesfr/xo-web.png?branch=master)](https://travis-ci.org/vatesfr/xo-web)
# Xen Orchestra [![Chat with us](https://storage.crisp.im/plugins/images/936925df-f37b-4ba8-bab0-70cd2edcb0be/badge.svg)](https://go.crisp.im/chat/embed/?website_id=-JzqzzwddSV7bKGtEyAQ) [![Build Status](https://travis-ci.org/vatesfr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatesfr/xen-orchestra)
![](http://i.imgur.com/tRffA5y.png)
XO-Web is part of [Xen Orchestra](https://github.com/vatesfr/xo), a web interface for XenServer or XAPI enabled hosts.
It is a web client for [XO-Server](https://github.com/vatesfr/xo-server).
___
## Installation
XOA or manual install procedure is [available here](https://xen-orchestra.com/docs/installation.html)
## Compilation
Production build:
```
$ npm run build
```
Development build:
```
$ npm run dev
```
### Environment
#### `NODE_ENV`
Set to *production* it disables many checks which result in increased
performance.
#### `XOA_PLAN`
- 1: Free
- 2: Starter
- 3: Enterprise
- 4: Premium
- 5: Sources
```js
if (process.env.XOA_PLAN < 5) {
console.log('included only in XOA')
}
if (process.env.XOA_PLAN > 3) {
console.log('included only in Premium and Sources')
}
```
## How to report a bug?
If you are certain the bug is exclusively related to XO-Web, you may use the [bugtracker of this repository](https://github.com/vatesfr/xo-web/issues).
Otherwise, please consider using the [bugtracker of the general repository](https://github.com/vatesfr/xo/issues).
## Process for new release
```bash
# Switch to the stable branch.
git checkout stable
# Fetches latest changes.
git pull --ff-only
# Merge changes of the next-release branch.
git merge next-release
# Increment the version (patch, minor or major).
npm version minor
# Go back to the next-release branch.
git checkout next-release
# Fetches the last changes (the merge and version bump) from stable to
# next-release.
git merge --ff-only stable
# Push the changes on git.
git push --follow-tags origin stable next-release
# Publish this release to npm.
npm publish
```
## License
AGPL3 © [Vates SAS](http://vates.fr)

5
babel.config.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = {
// Necessary for jest to be able to find the `.babelrc.js` closest to the file
// instead of only the one in this directory.
babelrcRoots: true,
}

View File

@@ -0,0 +1,6 @@
declare module 'limit-concurrency-decorator' {
declare function limitConcurrencyDecorator(
concurrency: number
): <T: Function>(T) => T
declare export default typeof limitConcurrencyDecorator
}

33
flow-typed/lodash.js vendored Normal file
View File

@@ -0,0 +1,33 @@
declare module 'lodash' {
declare export function countBy<K, V>(
object: { [K]: V },
iteratee: K | ((V, K) => string)
): { [string]: number }
declare export function forEach<K, V>(
object: { [K]: V },
iteratee: (V, K) => void
): void
declare export function groupBy<K, V>(
object: { [K]: V },
iteratee: K | ((V, K) => string)
): { [string]: V[] }
declare export function invert<K, V>(object: { [K]: V }): { [V]: K }
declare export function isEmpty(mixed): boolean
declare export function keyBy<T>(array: T[], iteratee: string): boolean
declare export function last<T>(array?: T[]): T | void
declare export function map<T1, T2>(
collection: T1[],
iteratee: (T1) => T2
): T2[]
declare export function mapValues<K, V1, V2>(
object: { [K]: V1 },
iteratee: (V1, K) => V2
): { [K]: V2 }
declare export function noop(...args: mixed[]): void
declare export function some<T>(
collection: T[],
iteratee: (T, number) => boolean
): boolean
declare export function sum(values: number[]): number
declare export function values<K, V>(object: { [K]: V }): V[]
}

17
flow-typed/promise-toolbox.js vendored Normal file
View File

@@ -0,0 +1,17 @@
declare module 'promise-toolbox' {
declare export class CancelToken {
static source(): { cancel: (message: any) => void, token: CancelToken };
}
declare export function cancelable(Function): Function
declare export function defer<T>(): {|
promise: Promise<T>,
reject: T => void,
resolve: T => void,
|}
declare export function fromCallback<T>(
(cb: (error: any, value: T) => void) => void
): Promise<T>
declare export function fromEvent(emitter: mixed, string): Promise<mixed>
declare export function ignoreErrors(): Promise<void>
declare export function timeout<T>(delay: number): Promise<T>
}

2
flow-typed/xo.js vendored Normal file
View File

@@ -0,0 +1,2 @@
// eslint-disable-next-line no-undef
declare type $Dict<T, K = string> = { [K]: T }

View File

@@ -1,219 +1,62 @@
{
"private": false,
"name": "xo-web",
"version": "5.15.0",
"license": "AGPL-3.0",
"description": "Web interface client for Xen-Orchestra",
"keywords": [
"xen",
"orchestra",
"xen-orchestra",
"web"
],
"homepage": "https://github.com/vatesfr/xo-web",
"bugs": "https://github.com/vatesfr/xo-web/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xo-web"
},
"author": {
"name": "Julien Fontanet",
"email": "julien.fontanet@vates.fr"
},
"preferGlobal": false,
"main": "dist/",
"bin": {},
"files": [
"dist/"
],
"engines": {
"node": ">=4",
"npm": ">=3"
},
"devDependencies": {
"@nraynaud/novnc": "0.6.1",
"ansi_up": "^2.0.2",
"asap": "^2.0.6",
"babel-eslint": "^8.0.3",
"babel-plugin-dev": "^1.0.0",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-react-constant-elements": "^6.5.0",
"babel-plugin-transform-react-inline-elements": "^6.6.5",
"babel-plugin-transform-react-jsx-self": "^6.11.0",
"babel-plugin-transform-react-jsx-source": "^6.9.0",
"babel-plugin-transform-runtime": "^6.6.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-0": "^6.5.0",
"babel-register": "^6.26.0",
"babel-runtime": "^6.26.0",
"babelify": "^8.0.0",
"benchmark": "^2.1.0",
"bootstrap": "4.0.0-alpha.5",
"browserify": "^14.5.0",
"bundle-collapser": "^1.3.0",
"chartist": "^0.10.1",
"chartist-plugin-legend": "^0.6.1",
"chartist-plugin-tooltip": "0.0.11",
"classnames": "^2.2.3",
"complex-matcher": "^0.1.1",
"cookies-js": "^1.2.2",
"d3": "^4.12.0",
"dependency-check": "^2.9.2",
"enzyme": "^3.1.1",
"enzyme-adapter-react-15": "^1.0.5",
"enzyme-to-json": "^3.3.0",
"eslint": "^4.13.1",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard-jsx": "^4.0.2",
"@babel/core": "^7.0.0-beta.49",
"@babel/register": "^7.0.0-beta.49",
"babel-core": "^7.0.0-0",
"babel-eslint": "^8.1.2",
"babel-jest": "^23.0.1",
"benchmark": "^2.1.4",
"eslint": "^4.14.0",
"eslint-config-standard": "^11.0.0-beta.0",
"eslint-config-standard-jsx": "^5.0.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-node": "^6.0.0",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-react": "^7.4.0",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-standard": "^3.0.1",
"event-to-promise": "^0.8.0",
"font-awesome": "^4.7.0",
"font-mfizz": "^2.4.1",
"get-stream": "^3.0.0",
"globby": "^7.1.1",
"gulp": "github:gulpjs/gulp#4.0",
"gulp-autoprefixer": "^4.0.0",
"gulp-csso": "^3.0.0",
"gulp-embedlr": "^0.5.2",
"gulp-plumber": "^1.1.0",
"gulp-pug": "^3.1.0",
"gulp-refresh": "^1.1.0",
"gulp-sass": "^3.0.0",
"gulp-sourcemaps": "^2.2.3",
"gulp-uglify": "^3.0.0",
"gulp-watch": "^4.3.5",
"human-format": "^0.9.2",
"exec-promise": "^0.7.0",
"flow-bin": "^0.73.0",
"globby": "^8.0.0",
"husky": "^0.14.3",
"immutable": "^3.8.2",
"index-modules": "^0.3.0",
"is-ip": "^2.0.0",
"jest": "^22.0.0",
"jsonrpc-websocket-client": "^0.2.0",
"kindof": "^2.0.0",
"later": "^1.2.0",
"lint-staged": "^6.0.0",
"lodash": "^4.6.1",
"loose-envify": "^1.1.0",
"make-error": "^1.2.1",
"marked": "^0.3.7",
"modular-css": "^7.2.0",
"moment": "^2.20.0",
"moment-timezone": "^0.5.14",
"notifyjs": "^3.0.0",
"prettier": "^1.9.2",
"jest": "^23.0.1",
"lodash": "^4.17.4",
"prettier": "^1.10.2",
"promise-toolbox": "^0.9.5",
"prop-types": "^15.6.0",
"random-password": "^0.1.2",
"react": "^15.4.1",
"react-addons-shallow-compare": "^15.6.2",
"react-addons-test-utils": "^15.6.2",
"react-bootstrap-4": "^0.29.1",
"react-chartist": "^0.13.0",
"react-copy-to-clipboard": "^5.0.1",
"react-dnd": "^2.5.4",
"react-dnd-html5-backend": "^2.5.4",
"react-document-title": "^2.0.2",
"react-dom": "^15.4.1",
"react-dropzone": "^4.2.3",
"react-intl": "^2.4.0",
"react-key-handler": "^1.0.1",
"react-notify": "^3.0.0",
"react-overlays": "^0.8.3",
"react-redux": "^5.0.6",
"react-router": "^3.0.0",
"react-select": "^1.1.0",
"react-shortcuts": "^2.0.0",
"react-sparklines": "1.6.0",
"react-test-renderer": "^15.6.2",
"react-virtualized": "^8.0.8",
"readable-stream": "^2.3.3",
"redux": "^3.7.2",
"redux-devtools": "^3.4.1",
"redux-devtools-dock-monitor": "^1.1.0",
"redux-devtools-log-monitor": "^1.4.0",
"redux-thunk": "^2.0.1",
"reselect": "^2.5.4",
"semver": "^5.4.1",
"styled-components": "^2.3.0",
"tar-stream": "^1.5.5",
"uglify-es": "^3.2.2",
"uncontrollable-input": "^0.0.1",
"url-parse": "^1.2.0",
"vinyl": "^2.1.0",
"watchify": "^3.7.0",
"whatwg-fetch": "^2.0.3",
"xml2js": "^0.4.19",
"xo-acl-resolver": "^0.2.3",
"xo-common": "^0.1.1",
"xo-lib": "^0.8.0",
"xo-remote-parser": "^0.3"
"sorted-object": "^2.0.1"
},
"scripts": {
"benchmarks": "./tools/run-benchmarks.js 'src/**/*.bench.js'",
"build": "npm run build-indexes && NODE_ENV=production gulp build",
"build-indexes": "index-modules --auto src",
"dev": "npm run build-indexes && NODE_ENV=development gulp build",
"dev-test": "jest --watch",
"lint-staged-stash": "touch .lint-staged && git stash save --include-untracked --keep-index && true",
"lint-staged-unstash": "git stash pop && rm -f .lint-staged && true",
"posttest": "eslint --ignore-path .gitignore src/",
"precommit": "lint-staged",
"prepublishOnly": "npm run build",
"test": "jest"
},
"browserify": {
"transform": [
"babelify",
"loose-envify"
]
},
"babel": {
"env": {
"development": {
"plugins": [
"transform-react-jsx-self",
"transform-react-jsx-source"
]
},
"production": {
"plugins": [
"transform-react-constant-elements",
"transform-react-inline-elements"
]
}
},
"plugins": [
"dev",
"lodash",
"transform-decorators-legacy",
"transform-runtime"
],
"presets": [
"es2015",
"react",
"stage-0"
]
"engines": {
"yarn": "^1.7.0"
},
"jest": {
"setupTestFrameworkScriptFile": "./setup-tests.js",
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
"collectCoverage": true,
"projects": [
"<rootDir>"
],
"testEnvironment": "node",
"testPathIgnorePatterns": [
"/dist/",
"/xo-web/"
],
"testRegex": "\\.spec\\.js$",
"transform": {
"\\.jsx?$": "babel-jest"
}
},
"lint-staged": {
"*.js": [
"lint-staged-stash",
"prettier --write",
"eslint --fix",
"jest --findRelatedTests --passWithNoTests",
"git add",
"lint-staged-unstash"
]
}
"private": true,
"scripts": {
"build": "scripts/run-script --parallel build",
"clean": "scripts/run-script --parallel clean",
"dev": "scripts/run-script --parallel dev",
"dev-test": "jest --bail --watch \"^(?!.*\\.integ\\.spec\\.js$)\"",
"posttest": "scripts/run-script test",
"precommit": "scripts/lint-staged",
"prepare": "scripts/run-script prepare",
"pretest": "eslint --ignore-path .gitignore .",
"test": "jest \"^(?!.*\\.integ\\.spec\\.js$)\"",
"test-integration": "jest \".integ\\.spec\\.js$\""
},
"workspaces": [
"@xen-orchestra/*",
"packages/*"
]
}

View File

@@ -0,0 +1,3 @@
module.exports = require('../../@xen-orchestra/babel-config')(
require('./package.json')
)

View File

@@ -0,0 +1,24 @@
/benchmark/
/benchmarks/
*.bench.js
*.bench.js.map
/examples/
example.js
example.js.map
*.example.js
*.example.js.map
/fixture/
/fixtures/
*.fixture.js
*.fixture.js.map
*.fixtures.js
*.fixtures.js.map
/test/
/tests/
*.spec.js
*.spec.js.map
__snapshots__/

View File

@@ -0,0 +1,66 @@
# complex-matcher [![Build Status](https://travis-ci.org/vatesfr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatesfr/xen-orchestra)
> ${pkg.description}
## Install
Installation of the [npm package](https://npmjs.org/package/complex-matcher):
```
> npm install --save complex-matcher
```
## Usage
```js
import * as CM from 'complex-matcher'
const characters = [
{ name: 'Catwoman', costumeColor: 'black' },
{ name: 'Superman', costumeColor: 'blue', hasCape: true },
{ name: 'Wonder Woman', costumeColor: 'blue' },
]
const predicate = CM.parse('costumeColor:blue hasCape?').createPredicate()
characters.filter(predicate)
// [
// { name: 'Superman', costumeColor: 'blue', hasCape: true },
// ]
new CM.String('foo').createPredicate()
```
## Development
```
# Install dependencies
> yarn
# Run the tests
> yarn test
# Continuously compile
> yarn dev
# Continuously run the tests
> yarn dev-test
# Build for production (automatically called by npm install)
> yarn build
```
## Contributions
Contributions are *very* welcomed, either on the documentation or on
the code.
You may:
- report any [issue](https://github.com/vatesfr/xen-orchestra/issues)
you've encountered;
- fork and create a pull request.
## License
ISC © [Vates SAS](https://vates.fr)

View File

@@ -0,0 +1,48 @@
{
"name": "complex-matcher",
"version": "0.3.0",
"license": "ISC",
"description": "",
"keywords": [],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/packages/complex-matcher",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"author": {
"name": "Julien Fontanet",
"email": "julien.fontanet@isonoe.net"
},
"preferGlobal": false,
"main": "dist/",
"bin": {},
"files": [
"dist/"
],
"browserslist": [
">2%"
],
"engines": {
"node": ">=4"
},
"dependencies": {
"lodash": "^4.17.4"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
"@babel/core": "7.0.0-beta.49",
"@babel/preset-env": "7.0.0-beta.49",
"babel-plugin-lodash": "^3.3.2",
"cross-env": "^5.1.1",
"rimraf": "^2.6.2"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"clean": "rimraf dist/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"prebuild": "yarn run clean",
"predev": "yarn run prebuild",
"prepublishOnly": "yarn run build"
}
}

View File

@@ -0,0 +1,12 @@
import { parse } from './'
import { ast, pattern } from './index.fixtures'
export default ({ benchmark }) => {
benchmark('parse', () => {
parse(pattern)
})
benchmark('toString', () => {
ast.toString()
})
}

View File

@@ -0,0 +1,15 @@
import * as CM from './'
export const pattern =
'foo !"\\\\ \\"" name:|(wonderwoman batman) hasCape? age:32'
export const ast = new CM.And([
new CM.String('foo'),
new CM.Not(new CM.String('\\ "')),
new CM.Property(
'name',
new CM.Or([new CM.String('wonderwoman'), new CM.String('batman')])
),
new CM.TruthyProperty('hasCape'),
new CM.Property('age', new CM.Number(32)),
])

View File

@@ -0,0 +1,531 @@
import { isPlainObject, some } from 'lodash'
// ===================================================================
const RAW_STRING_CHARS = (() => {
const chars = { __proto__: null }
const add = (a, b = a) => {
let i = a.charCodeAt(0)
const j = b.charCodeAt(0)
while (i <= j) {
chars[String.fromCharCode(i++)] = true
}
}
add('$')
add('-')
add('.')
add('0', '9')
add('_')
add('A', 'Z')
add('a', 'z')
return chars
})()
const isRawString = string => {
const { length } = string
for (let i = 0; i < length; ++i) {
if (!(string[i] in RAW_STRING_CHARS)) {
return false
}
}
return true
}
// -------------------------------------------------------------------
class Node {
createPredicate () {
return value => this.match(value)
}
}
export class Null extends Node {
match () {
return true
}
toString () {
return ''
}
}
const formatTerms = terms => terms.map(term => term.toString(true)).join(' ')
export class And extends Node {
constructor (children) {
super()
if (children.length === 1) {
return children[0]
}
this.children = children
}
match (value) {
return this.children.every(child => child.match(value))
}
toString (isNested) {
const terms = formatTerms(this.children)
return isNested ? `(${terms})` : terms
}
}
export class Comparison extends Node {
constructor (operator, value) {
super()
this._comparator = Comparison.comparators[operator]
this._operator = operator
this._value = value
}
match (value) {
return typeof value === 'number' && this._comparator(value, this._value)
}
toString () {
return this._operator + String(this._value)
}
}
Comparison.comparators = {
'>': (a, b) => a > b,
'>=': (a, b) => a >= b,
'<': (a, b) => a < b,
'<=': (a, b) => a <= b,
}
export class Or extends Node {
constructor (children) {
super()
if (children.length === 1) {
return children[0]
}
this.children = children
}
match (value) {
return this.children.some(child => child.match(value))
}
toString () {
return `|(${formatTerms(this.children)})`
}
}
export class Not extends Node {
constructor (child) {
super()
this.child = child
}
match (value) {
return !this.child.match(value)
}
toString () {
return '!' + this.child.toString(true)
}
}
export class NumberNode extends Node {
constructor (value) {
super()
this.value = value
// should not be enumerable for the tests
Object.defineProperty(this, 'match', {
value: this.match.bind(this),
})
}
match (value) {
return (
value === this.value ||
(value !== null && typeof value === 'object' && some(value, this.match))
)
}
toString () {
return String(this.value)
}
}
export { NumberNode as Number }
export class Property extends Node {
constructor (name, child) {
super()
this.name = name
this.child = child
}
match (value) {
return value != null && this.child.match(value[this.name])
}
toString () {
return `${formatString(this.name)}:${this.child.toString(true)}`
}
}
const escapeChar = char => '\\' + char
const formatString = value =>
Number.isNaN(+value)
? isRawString(value) ? value : `"${value.replace(/\\|"/g, escapeChar)}"`
: `"${value}"`
export class StringNode extends Node {
constructor (value) {
super()
this.lcValue = value.toLowerCase()
this.value = value
// should not be enumerable for the tests
Object.defineProperty(this, 'match', {
value: this.match.bind(this),
})
}
match (value) {
if (typeof value === 'string') {
return value.toLowerCase().indexOf(this.lcValue) !== -1
}
if (Array.isArray(value) || isPlainObject(value)) {
return some(value, this.match)
}
return false
}
toString () {
return formatString(this.value)
}
}
export { StringNode as String }
export class TruthyProperty extends Node {
constructor (name) {
super()
this.name = name
}
match (value) {
return value != null && !!value[this.name]
}
toString () {
return formatString(this.name) + '?'
}
}
// -------------------------------------------------------------------
// https://gist.github.com/yelouafi/556e5159e869952335e01f6b473c4ec1
class Failure {
constructor (pos, expected) {
this.expected = expected
this.pos = pos
}
get value () {
throw new Error(
`parse error: expected ${this.expected} at position ${this.pos}`
)
}
}
class Success {
constructor (pos, value) {
this.pos = pos
this.value = value
}
}
// -------------------------------------------------------------------
class P {
static alt (...parsers) {
const { length } = parsers
return new P((input, pos, end) => {
for (let i = 0; i < length; ++i) {
const result = parsers[i]._parse(input, pos, end)
if (result instanceof Success) {
return result
}
}
return new Failure(pos, 'alt')
})
}
static grammar (rules) {
const grammar = {}
Object.keys(rules).forEach(k => {
const rule = rules[k]
grammar[k] = rule instanceof P ? rule : P.lazy(rule, grammar)
})
return grammar
}
static lazy (parserCreator, arg) {
const parser = new P((input, pos, end) =>
(parser._parse = parserCreator(arg)._parse)(input, pos, end)
)
return parser
}
static regex (regex) {
regex = new RegExp(regex.source, 'y')
return new P((input, pos) => {
regex.lastIndex = pos
const matches = regex.exec(input)
return matches !== null
? new Success(regex.lastIndex, matches[0])
: new Failure(pos, regex)
})
}
static seq (...parsers) {
const { length } = parsers
return new P((input, pos, end) => {
const values = new Array(length)
for (let i = 0; i < length; ++i) {
const result = parsers[i]._parse(input, pos, end)
if (result instanceof Failure) {
return result
}
pos = result.pos
values[i] = result.value
}
return new Success(pos, values)
})
}
static text (text) {
const { length } = text
return new P(
(input, pos) =>
input.startsWith(text, pos)
? new Success(pos + length, text)
: new Failure(pos, `'${text}'`)
)
}
constructor (parse) {
this._parse = parse
}
map (fn) {
return new P((input, pos, end) => {
const result = this._parse(input, pos, end)
if (result instanceof Success) {
result.value = fn(result.value)
}
return result
})
}
parse (input, pos = 0, end = input.length) {
return this._parse(input, pos, end).value
}
repeat (min = 0, max = Infinity) {
return new P((input, pos, end) => {
const value = []
let result
let i = 0
while (i < min) {
++i
result = this._parse(input, pos, end)
if (result instanceof Failure) {
return result
}
value.push(result.value)
pos = result.pos
}
while (
i < max &&
(result = this._parse(input, pos, end)) instanceof Success
) {
++i
value.push(result.value)
pos = result.pos
}
return new Success(pos, value)
})
}
skip (otherParser) {
return new P((input, pos, end) => {
const result = this._parse(input, pos, end)
if (result instanceof Failure) {
return result
}
const otherResult = otherParser._parse(input, result.pos, end)
if (otherResult instanceof Failure) {
return otherResult
}
result.pos = otherResult.pos
return result
})
}
}
P.eof = new P(
(input, pos, end) =>
pos < end ? new Failure(pos, 'end of input') : new Success(pos)
)
// -------------------------------------------------------------------
const parser = P.grammar({
default: r =>
P.seq(r.ws, r.term.repeat(), P.eof).map(
([, terms]) => (terms.length === 0 ? new Null() : new And(terms))
),
quotedString: new P((input, pos, end) => {
if (input[pos] !== '"') {
return new Failure(pos, '"')
}
++pos
const value = []
let char
while (pos < end && (char = input[pos++]) !== '"') {
if (char === '\\') {
char = input[pos++]
}
value.push(char)
}
return new Success(pos, value.join(''))
}),
rawString: new P((input, pos, end) => {
let value = ''
let c
while (pos < end && RAW_STRING_CHARS[(c = input[pos])]) {
++pos
value += c
}
return value.length === 0
? new Failure(pos, 'a raw string')
: new Success(pos, value)
}),
string: r => P.alt(r.quotedString, r.rawString),
term: r =>
P.alt(
P.seq(P.text('('), r.ws, r.term.repeat(1), P.text(')')).map(
_ => new And(_[2])
),
P.seq(
P.text('|'),
r.ws,
P.text('('),
r.ws,
r.term.repeat(1),
P.text(')')
).map(_ => new Or(_[4])),
P.seq(P.text('!'), r.ws, r.term).map(_ => new Not(_[2])),
P.seq(P.regex(/[<>]=?/), r.rawString).map(([op, val]) => {
val = +val
if (Number.isNaN(val)) {
throw new TypeError('value must be a number')
}
return new Comparison(op, val)
}),
P.seq(r.string, r.ws, P.text(':'), r.ws, r.term).map(
_ => new Property(_[0], _[4])
),
P.seq(r.string, P.text('?')).map(_ => new TruthyProperty(_[0])),
P.alt(
r.quotedString.map(_ => new StringNode(_)),
r.rawString.map(str => {
const asNum = +str
return Number.isNaN(asNum)
? new StringNode(str)
: new NumberNode(asNum)
})
)
).skip(r.ws),
ws: P.regex(/\s*/),
}).default
export const parse = parser.parse.bind(parser)
// -------------------------------------------------------------------
const _getPropertyClauseStrings = ({ child }) => {
if (child instanceof Or) {
const strings = []
child.children.forEach(child => {
if (child instanceof StringNode) {
strings.push(child.value)
}
})
return strings
}
if (child instanceof StringNode) {
return [child.value]
}
return []
}
// Find possible values for property clauses in a and clause.
export const getPropertyClausesStrings = node => {
if (!node) {
return {}
}
if (node instanceof Property) {
return {
[node.name]: _getPropertyClauseStrings(node),
}
}
if (node instanceof And) {
const strings = {}
node.children.forEach(node => {
if (node instanceof Property) {
const { name } = node
const values = strings[name]
if (values) {
values.push.apply(values, _getPropertyClauseStrings(node))
} else {
strings[name] = _getPropertyClauseStrings(node)
}
}
})
return strings
}
return {}
}
// -------------------------------------------------------------------
export const setPropertyClause = (node, name, child) => {
const property =
child &&
new Property(
name,
typeof child === 'string' ? new StringNode(child) : child
)
if (node === undefined) {
return property
}
const children = (node instanceof And ? node.children : [node]).filter(
child => !(child instanceof Property && child.name === name)
)
if (property !== undefined) {
children.push(property)
}
return new And(children)
}

View File

@@ -0,0 +1,86 @@
/* eslint-env jest */
import { ast, pattern } from './index.fixtures'
import {
getPropertyClausesStrings,
Null,
NumberNode,
parse,
setPropertyClause,
} from './'
it('getPropertyClausesStrings', () => {
const tmp = getPropertyClausesStrings(parse('foo bar:baz baz:|(foo bar)'))
expect(tmp).toEqual({
bar: ['baz'],
baz: ['foo', 'bar'],
})
})
describe('parse', () => {
it('analyses a string and returns a node/tree', () => {
expect(parse(pattern)).toEqual(ast)
})
it('supports an empty string', () => {
expect(parse('')).toEqual(new Null())
})
it('differentiate between numbers and numbers in strings', () => {
let node
node = parse('32')
expect(node.match(32)).toBe(true)
expect(node.match('32')).toBe(false)
expect(node.toString()).toBe('32')
node = parse('"32"')
expect(node.match(32)).toBe(false)
expect(node.match('32')).toBe(true)
expect(node.toString()).toBe('"32"')
})
})
describe('Number', () => {
it('match a number recursively', () => {
expect(new NumberNode(3).match([{ foo: 3 }])).toBe(true)
})
})
describe('setPropertyClause', () => {
it('creates a node if none passed', () => {
expect(setPropertyClause(undefined, 'foo', 'bar').toString()).toBe(
'foo:bar'
)
})
it('adds a property clause if there was none', () => {
expect(setPropertyClause(parse('baz'), 'foo', 'bar').toString()).toBe(
'baz foo:bar'
)
})
it('replaces the property clause if there was one', () => {
expect(
setPropertyClause(parse('plip foo:baz plop'), 'foo', 'bar').toString()
).toBe('plip plop foo:bar')
expect(
setPropertyClause(parse('foo:|(baz plop)'), 'foo', 'bar').toString()
).toBe('foo:bar')
})
it('removes the property clause if no chid is passed', () => {
expect(
setPropertyClause(parse('foo bar:baz qux'), 'bar', undefined).toString()
).toBe('foo qux')
expect(
setPropertyClause(parse('foo bar:baz qux'), 'baz', undefined).toString()
).toBe('foo bar:baz qux')
})
})
it('toString', () => {
expect(pattern).toBe(ast.toString())
})

View File

@@ -0,0 +1,3 @@
module.exports = require('../../@xen-orchestra/babel-config')(
require('./package.json')
)

View File

@@ -0,0 +1,24 @@
/benchmark/
/benchmarks/
*.bench.js
*.bench.js.map
/examples/
example.js
example.js.map
*.example.js
*.example.js.map
/fixture/
/fixtures/
*.fixture.js
*.fixture.js.map
*.fixtures.js
*.fixtures.js.map
/test/
/tests/
*.spec.js
*.spec.js.map
__snapshots__/

View File

@@ -0,0 +1,66 @@
# value-matcher [![Build Status](https://travis-ci.org/vatefr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatefr/xen-orchestra)
> ${pkg.description}
## Install
Installation of the [npm package](https://npmjs.org/package/value-matcher):
```
> npm install --save value-matcher
```
## Usage
```js
import { createPredicate } from 'value-matcher'
[
{ user: 'sam', age: 65, active: false },
{ user: 'barney', age: 36, active: true },
{ user: 'fred', age: 40, active: false },
].filter(createPredicate({
__or: [
{ user: 'sam' },
{ active: true },
],
}))
// [
// { user: 'sam', age: 65, active: false },
// { user: 'barney', age: 36, active: true },
// ]
```
## Development
```
# Install dependencies
> yarn
# Run the tests
> yarn test
# Continuously compile
> yarn dev
# Continuously run the tests
> yarn dev-test
# Build for production (automatically called by npm install)
> yarn build
```
## Contributions
Contributions are *very* welcomed, either on the documentation or on
the code.
You may:
- report any [issue](https://github.com/vatesfr/xen-orchestra/issues)
you've encountered;
- fork and create a pull request.
## License
ISC © [Vates SAS](https://vates.fr)

View File

@@ -0,0 +1,47 @@
{
"name": "value-matcher",
"version": "0.2.0",
"license": "ISC",
"description": "",
"keywords": [],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/packages/value-matcher",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"author": {
"name": "Julien Fontanet",
"email": "julien.fontanet@isonoe.net"
},
"preferGlobal": false,
"main": "dist/",
"bin": {},
"files": [
"dist/"
],
"browserslist": [
">2%"
],
"engines": {
"node": ">=4"
},
"dependencies": {},
"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
"@babel/core": "7.0.0-beta.49",
"@babel/preset-env": "7.0.0-beta.49",
"@babel/preset-flow": "7.0.0-beta.49",
"cross-env": "^5.1.3",
"rimraf": "^2.6.2"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"clean": "rimraf dist/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"prebuild": "yarn run clean",
"predev": "yarn run prebuild",
"prepare": "yarn run build",
"prepublishOnly": "yarn run build"
}
}

View File

@@ -0,0 +1,81 @@
// @flow
/* eslint-disable no-use-before-define */
export type Pattern =
| AndPattern
| OrPattern
| NotPattern
| ObjectPattern
| ArrayPattern
| ValuePattern
/* eslint-enable no-use-before-define */
// all patterns must match
type AndPattern = {| __and: Array<Pattern> |}
// one of the pattern must match
type OrPattern = {| __or: Array<Pattern> |}
// the pattern must not match
type NotPattern = {| __not: Pattern |}
// value is an object with properties matching the patterns
type ObjectPattern = { [string]: Pattern }
// value is an array and each patterns must match a different item
type ArrayPattern = Array<Pattern>
// value equals the pattern
type ValuePattern = boolean | number | string
const match = (pattern: Pattern, value: any) => {
if (Array.isArray(pattern)) {
return (
Array.isArray(value) &&
pattern.every((subpattern, i) =>
// FIXME: subpatterns should match different subvalues
value.some(subvalue => match(subpattern, subvalue))
)
)
}
if (pattern !== null && typeof pattern === 'object') {
const keys = Object.keys(pattern)
const { length } = keys
if (length === 1) {
const [key] = keys
if (key === '__and') {
const andPattern: AndPattern = (pattern: any)
return andPattern.__and.every(subpattern => match(subpattern, value))
}
if (key === '__or') {
const orPattern: OrPattern = (pattern: any)
return orPattern.__or.some(subpattern => match(subpattern, value))
}
if (key === '__not') {
const notPattern: NotPattern = (pattern: any)
return !match(notPattern.__not, value)
}
}
if (value === null || typeof value !== 'object') {
return false
}
const objectPattern: ObjectPattern = (pattern: any)
for (let i = 0; i < length; ++i) {
const key = keys[i]
const subvalue = value[key]
if (subvalue === undefined || !match(objectPattern[key], subvalue)) {
return false
}
}
return true
}
return pattern === value
}
export const createPredicate = (pattern: Pattern) => (value: any) =>
match(pattern, value)

View File

@@ -0,0 +1,3 @@
module.exports = require('../../@xen-orchestra/babel-config')(
require('./package.json')
)

View File

@@ -0,0 +1,24 @@
/benchmark/
/benchmarks/
*.bench.js
*.bench.js.map
/examples/
example.js
example.js.map
*.example.js
*.example.js.map
/fixture/
/fixtures/
*.fixture.js
*.fixture.js.map
*.fixtures.js
*.fixtures.js.map
/test/
/tests/
*.spec.js
*.spec.js.map
__snapshots__/

View File

@@ -0,0 +1,51 @@
# vhd-cli [![Build Status](https://travis-ci.org/vatesfr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatesfr/xen-orchestra)
> ${pkg.description}
## Install
Installation of the [npm package](https://npmjs.org/package/vhd-cli):
```
> npm install --global vhd-cli
```
## Usage
```
> vhd-cli <VHD file>
```
## Development
```
# Install dependencies
> npm install
# Run the tests
> npm test
# Continuously compile
> npm run dev
# Continuously run the tests
> npm run dev-test
# Build for production (automatically called by npm install)
> npm run build
```
## Contributions
Contributions are *very* welcomed, either on the documentation or on
the code.
You may:
- report any [issue](https://github.com/vatesfr/xen-orchestra/issues)
you've encountered;
- fork and create a pull request.
## License
ISC © [Vates SAS](https://vates.fr)

View File

@@ -0,0 +1,54 @@
{
"name": "vhd-cli",
"version": "0.0.1",
"license": "ISC",
"description": "",
"keywords": [],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/packages/vhd-cli",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"author": {
"name": "Julien Fontanet",
"email": "julien.fontanet@isonoe.net"
},
"preferGlobal": false,
"main": "dist/",
"bin": {
"vhd-cli": "dist/index.js"
},
"files": [
"dist/"
],
"engines": {
"node": ">=6"
},
"dependencies": {
"@xen-orchestra/fs": "^0.1.0",
"exec-promise": "^0.7.0",
"struct-fu": "^1.2.0",
"vhd-lib": "^0.2.0"
},
"devDependencies": {
"@babel/cli": "^7.0.0-beta.49",
"@babel/core": "^7.0.0-beta.49",
"@babel/plugin-transform-runtime": "^7.0.0-beta.49",
"@babel/preset-env": "^7.0.0-beta.49",
"babel-plugin-lodash": "^3.3.2",
"cross-env": "^5.1.3",
"execa": "^0.10.0",
"index-modules": "^0.3.0",
"promise-toolbox": "^0.9.5",
"rimraf": "^2.6.1",
"tmp": "^0.0.33"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"prebuild": "rimraf dist/ && index-modules --cjs-lazy src/commands",
"predev": "yarn run prebuild",
"prepare": "yarn run build"
}
}

View File

@@ -0,0 +1,23 @@
const { createWriteStream } = require('fs')
const { PassThrough } = require('stream')
const createOutputStream = path => {
if (path !== undefined && path !== '-') {
return createWriteStream(path)
}
// introduce a through stream because stdout is not a normal stream!
const stream = new PassThrough()
stream.pipe(process.stdout)
return stream
}
export const writeStream = (input, path) => {
const output = createOutputStream(path)
return new Promise((resolve, reject) =>
input
.on('error', reject)
.pipe(output.on('error', reject).on('finish', resolve))
)
}

View File

@@ -0,0 +1,15 @@
import Vhd from 'vhd-lib'
import { getHandler } from '@xen-orchestra/fs'
import { resolve } from 'path'
export default async args => {
const handler = getHandler({ url: 'file:///' })
for (const vhd of args) {
try {
await new Vhd(handler, resolve(vhd)).readHeaderAndFooter()
console.log('ok:', vhd)
} catch (error) {
console.error('nok:', vhd, error)
}
}
}

View File

@@ -0,0 +1,12 @@
import Vhd from 'vhd-lib'
import { getHandler } from '@xen-orchestra/fs'
import { resolve } from 'path'
export default async args => {
const vhd = new Vhd(getHandler({ url: 'file:///' }), resolve(args[0]))
await vhd.readHeaderAndFooter()
console.log(vhd.header)
console.log(vhd.footer)
}

View File

@@ -0,0 +1,16 @@
import { createContentStream } from 'vhd-lib'
import { getHandler } from '@xen-orchestra/fs'
import { resolve } from 'path'
import { writeStream } from '../_utils'
export default async args => {
if (args.length < 2 || args.some(_ => _ === '-h' || _ === '--help')) {
return `Usage: ${this.command} <input VHD> [<output raw>]`
}
await writeStream(
createContentStream(getHandler({ url: 'file:///' }), resolve(args[0])),
args[1]
)
}

View File

@@ -0,0 +1,21 @@
import path from 'path'
import { createSyntheticStream } from 'vhd-lib'
import { createWriteStream } from 'fs'
import { getHandler } from '@xen-orchestra/fs'
export default async function main (args) {
if (args.length < 2 || args.some(_ => _ === '-h' || _ === '--help')) {
return `Usage: ${this.command} <input VHD> <output VHD>`
}
const handler = getHandler({ url: 'file:///' })
return new Promise((resolve, reject) => {
createSyntheticStream(handler, path.resolve(args[0]))
.on('error', reject)
.pipe(
createWriteStream(args[1])
.on('error', reject)
.on('finish', resolve)
)
})
}

44
packages/vhd-cli/src/index.js Executable file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/env node
import execPromise from 'exec-promise'
import commands from './commands'
function runCommand (commands, [command, ...args]) {
if (command === undefined || command === '-h' || command === '--help') {
command = 'help'
}
const fn = commands[command]
if (fn === undefined) {
if (command === 'help') {
return `Usage:
${Object.keys(commands)
.filter(command => command !== 'help')
.map(command => ` ${this.command} ${command}`)
.join('\n\n')}`
}
throw `invalid command ${command}` // eslint-disable-line no-throw-literal
}
return fn.call(
{
__proto__: this,
command: `${this.command} ${command}`,
},
args
)
}
execPromise(
runCommand.bind(
{
command: 'vhd-cli',
runCommand,
},
commands
)
)

View File

@@ -0,0 +1,28 @@
/* eslint-env jest */
import execa from 'execa'
import rimraf from 'rimraf'
import tmp from 'tmp'
import { fromCallback as pFromCallback } from 'promise-toolbox'
import command from './commands/info'
const initialDir = process.cwd()
jest.setTimeout(10000)
beforeEach(async () => {
const dir = await pFromCallback(cb => tmp.dir(cb))
process.chdir(dir)
})
afterEach(async () => {
const tmpDir = process.cwd()
process.chdir(initialDir)
await pFromCallback(cb => rimraf(tmpDir, cb))
})
test('can run the command', async () => {
await execa('qemu-img', ['create', '-fvpc', 'empty.vhd', '1G'])
await command(['empty.vhd'])
})

View File

@@ -0,0 +1,3 @@
module.exports = require('../../@xen-orchestra/babel-config')(
require('./package.json')
)

View File

@@ -0,0 +1,56 @@
{
"name": "vhd-lib",
"version": "0.2.0",
"license": "AGPL-3.0",
"description": "Primitives for VHD file handling",
"keywords": [],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/packages/vhd-lib",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"preferGlobal": true,
"main": "dist/",
"bin": {},
"files": [
"dist/"
],
"engines": {
"node": ">=6"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.49",
"async-iterator-to-stream": "^1.0.2",
"from2": "^2.3.0",
"fs-extra": "^6.0.1",
"limit-concurrency-decorator": "^0.4.0",
"promise-toolbox": "^0.9.5",
"struct-fu": "^1.2.0",
"uuid": "^3.0.1"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.49",
"@babel/core": "7.0.0-beta.49",
"@babel/plugin-transform-runtime": "^7.0.0-beta.49",
"@babel/preset-env": "7.0.0-beta.49",
"@babel/preset-flow": "7.0.0-beta.49",
"@xen-orchestra/fs": "^0.1.0",
"babel-plugin-lodash": "^3.3.2",
"cross-env": "^5.1.3",
"execa": "^0.10.0",
"fs-promise": "^2.0.0",
"get-stream": "^3.0.0",
"index-modules": "^0.3.0",
"rimraf": "^2.6.2",
"tmp": "^0.0.33"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"clean": "rimraf dist/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"prebuild": "yarn run clean",
"predev": "yarn run clean",
"prepare": "yarn run build"
}
}

View File

@@ -0,0 +1,7 @@
const MASK = 0x80
export const set = (map, bit) => {
map[bit >> 3] |= MASK >> (bit & 7)
}
export const test = (map, bit) => ((map[bit >> 3] << (bit & 7)) & MASK) !== 0

View File

@@ -0,0 +1,37 @@
import { SECTOR_SIZE } from './_constants'
export default function computeGeometryForSize (size) {
const totalSectors = Math.ceil(size / 512)
let sectorsPerTrackCylinder
let heads
let cylinderTimesHeads
if (totalSectors > 65535 * 16 * 255) {
throw Error('disk is too big')
}
// straight copypasta from the file spec appendix on CHS Calculation
if (totalSectors >= 65535 * 16 * 63) {
sectorsPerTrackCylinder = 255
heads = 16
cylinderTimesHeads = totalSectors / sectorsPerTrackCylinder
} else {
sectorsPerTrackCylinder = 17
cylinderTimesHeads = totalSectors / sectorsPerTrackCylinder
heads = Math.floor((cylinderTimesHeads + 1023) / 1024)
if (heads < 4) {
heads = 4
}
if (cylinderTimesHeads >= heads * 1024 || heads > 16) {
sectorsPerTrackCylinder = 31
heads = 16
cylinderTimesHeads = totalSectors / sectorsPerTrackCylinder
}
if (cylinderTimesHeads >= heads * 1024) {
sectorsPerTrackCylinder = 63
heads = 16
cylinderTimesHeads = totalSectors / sectorsPerTrackCylinder
}
}
const cylinders = Math.ceil(cylinderTimesHeads / heads)
const actualSize = cylinders * heads * sectorsPerTrackCylinder * SECTOR_SIZE
return { cylinders, heads, sectorsPerTrackCylinder, actualSize }
}

View File

@@ -0,0 +1,42 @@
import from2 from 'from2'
const constantStream = (data, n = 1) => {
if (!Buffer.isBuffer(data)) {
data = Buffer.from(data)
}
const { length } = data
if (!length) {
throw new Error('data should not be empty')
}
n *= length
let currentLength = length
return from2((size, next) => {
if (n <= 0) {
return next(null, null)
}
if (n < size) {
size = n
}
if (size < currentLength) {
const m = Math.floor(size / length) * length || length
n -= m
return next(null, data.slice(0, m))
}
// if more than twice the data length is requested, repeat the data
if (size > currentLength * 2) {
currentLength = Math.floor(size / length) * length
data = Buffer.alloc(currentLength, data)
}
n -= currentLength
return next(null, data)
})
}
export { constantStream as default }

View File

@@ -0,0 +1,30 @@
export const BLOCK_UNUSED = 0xffffffff
// This lib has been extracted from the Xen Orchestra project.
export const CREATOR_APPLICATION = 'xo '
// Sizes in bytes.
export const FOOTER_SIZE = 512
export const HEADER_SIZE = 1024
export const SECTOR_SIZE = 512
export const DEFAULT_BLOCK_SIZE = 0x00200000 // from the spec
export const FOOTER_COOKIE = 'conectix'
export const HEADER_COOKIE = 'cxsparse'
export const DISK_TYPE_FIXED = 2
export const DISK_TYPE_DYNAMIC = 3
export const DISK_TYPE_DIFFERENCING = 4
export const PARENT_LOCATOR_ENTRIES = 8
export const PLATFORM_NONE = 0
export const PLATFORM_WI2R = 0x57693272
export const PLATFORM_WI2K = 0x5769326b
export const PLATFORM_W2RU = 0x57327275
export const PLATFORM_W2KU = 0x57326b75
export const PLATFORM_MAC = 0x4d616320
export const PLATFORM_MACX = 0x4d616358
export const FILE_FORMAT_VERSION = 1 << 16
export const HEADER_VERSION = 1 << 16

View File

@@ -0,0 +1,56 @@
import { v4 as generateUuid } from 'uuid'
import { checksumStruct, fuFooter, fuHeader } from './_structs'
import {
CREATOR_APPLICATION,
DEFAULT_BLOCK_SIZE as VHD_BLOCK_SIZE_BYTES,
DISK_TYPE_FIXED,
FILE_FORMAT_VERSION,
FOOTER_COOKIE,
FOOTER_SIZE,
HEADER_COOKIE,
HEADER_SIZE,
HEADER_VERSION,
PLATFORM_WI2K,
} from './_constants'
export function createFooter (
size,
timestamp,
geometry,
dataOffset,
diskType = DISK_TYPE_FIXED
) {
const footer = fuFooter.pack({
cookie: FOOTER_COOKIE,
features: 2,
fileFormatVersion: FILE_FORMAT_VERSION,
dataOffset,
timestamp,
creatorApplication: CREATOR_APPLICATION,
creatorHostOs: PLATFORM_WI2K, // it looks like everybody is using Wi2k
originalSize: size,
currentSize: size,
diskGeometry: geometry,
diskType,
uuid: generateUuid(null, Buffer.allocUnsafe(16)),
})
checksumStruct(footer, fuFooter)
return footer
}
export function createHeader (
maxTableEntries,
tableOffset = HEADER_SIZE + FOOTER_SIZE,
blockSize = VHD_BLOCK_SIZE_BYTES
) {
const header = fuHeader.pack({
cookie: HEADER_COOKIE,
tableOffset,
headerVersion: HEADER_VERSION,
maxTableEntries,
blockSize,
})
checksumStruct(header, fuHeader)
return header
}

View File

@@ -0,0 +1,121 @@
import assert from 'assert'
import fu from 'struct-fu'
import { FOOTER_SIZE, HEADER_SIZE, PARENT_LOCATOR_ENTRIES } from './_constants'
const SIZE_OF_32_BITS = Math.pow(2, 32)
const uint64 = fu.derive(
fu.uint32(2),
number => [Math.floor(number / SIZE_OF_32_BITS), number % SIZE_OF_32_BITS],
_ => _[0] * SIZE_OF_32_BITS + _[1]
)
const uint64Undefinable = fu.derive(
fu.uint32(2),
number =>
number === undefined
? [0xffffffff, 0xffffffff]
: [Math.floor(number / SIZE_OF_32_BITS), number % SIZE_OF_32_BITS],
_ =>
_[0] === 0xffffffff && _[1] === 0xffffffff
? undefined
: _[0] * SIZE_OF_32_BITS + _[1]
)
export const fuFooter = fu.struct([
fu.char('cookie', 8), // 0
fu.uint32('features'), // 8
fu.uint32('fileFormatVersion'), // 12
uint64Undefinable('dataOffset'), // offset of the header
fu.uint32('timestamp'), // 24
fu.char('creatorApplication', 4), // 28
fu.uint32('creatorVersion'), // 32
fu.uint32('creatorHostOs'), // 36
uint64('originalSize'),
uint64('currentSize'),
fu.struct('diskGeometry', [
fu.uint16('cylinders'), // 56
fu.uint8('heads'), // 58
fu.uint8('sectorsPerTrackCylinder'), // 59
]),
fu.uint32('diskType'), // 60 Disk type, must be equal to HARD_DISK_TYPE_DYNAMIC/HARD_DISK_TYPE_DIFFERENCING.
fu.uint32('checksum'), // 64
fu.byte('uuid', 16), // 68
fu.char('saved'), // 84
fu.char('hidden'), // 85 TODO: should probably be merged in reserved
fu.char('reserved', 426), // 86
])
assert.strictEqual(fuFooter.size, FOOTER_SIZE)
export const fuHeader = fu.struct([
fu.char('cookie', 8),
uint64Undefinable('dataOffset'),
uint64('tableOffset'),
fu.uint32('headerVersion'),
fu.uint32('maxTableEntries'), // Max entries in the Block Allocation Table.
fu.uint32('blockSize'), // Block size in bytes. Default (2097152 => 2MB)
fu.uint32('checksum'),
fu.byte('parentUuid', 16),
fu.uint32('parentTimestamp'),
fu.uint32('reserved1'),
fu.char16be('parentUnicodeName', 512),
fu.struct(
'parentLocatorEntry',
[
fu.uint32('platformCode'),
fu.uint32('platformDataSpace'),
fu.uint32('platformDataLength'),
fu.uint32('reserved'),
uint64('platformDataOffset'), // Absolute byte offset of the locator data.
],
PARENT_LOCATOR_ENTRIES
),
fu.char('reserved2', 256),
])
assert.strictEqual(fuHeader.size, HEADER_SIZE)
export const packField = (field, value, buf) => {
const { offset } = field
field.pack(
value,
buf,
typeof offset !== 'object' ? { bytes: offset, bits: 0 } : offset
)
}
export const unpackField = (field, buf) => {
const { offset } = field
return field.unpack(
buf,
typeof offset !== 'object' ? { bytes: offset, bits: 0 } : offset
)
}
// Returns the checksum of a raw struct.
// The raw struct (footer or header) is altered with the new sum.
export function checksumStruct (buf, struct) {
const checksumField = struct.fields.checksum
let sum = 0
// Do not use the stored checksum to compute the new checksum.
const checksumOffset = checksumField.offset
for (let i = 0, n = checksumOffset; i < n; ++i) {
sum += buf[i]
}
for (
let i = checksumOffset + checksumField.size, n = struct.size;
i < n;
++i
) {
sum += buf[i]
}
sum = ~sum >>> 0
// Write new sum.
packField(checksumField, sum, buf)
return sum
}

View File

@@ -0,0 +1,37 @@
import { dirname, relative } from 'path'
import Vhd from './vhd'
import { DISK_TYPE_DIFFERENCING } from './_constants'
export default async function chain (
parentHandler,
parentPath,
childHandler,
childPath,
force = false
) {
const parentVhd = new Vhd(parentHandler, parentPath)
const childVhd = new Vhd(childHandler, childPath)
await childVhd.readHeaderAndFooter()
const { header, footer } = childVhd
if (footer.diskType !== DISK_TYPE_DIFFERENCING) {
if (!force) {
throw new Error('cannot chain disk of type ' + footer.diskType)
}
footer.diskType = DISK_TYPE_DIFFERENCING
}
await Promise.all([
childVhd.readBlockAllocationTable(),
parentVhd.readHeaderAndFooter(),
])
const parentName = relative(dirname(childPath), parentPath)
header.parentUuid = parentVhd.footer.uuid
header.parentUnicodeName = parentName
await childVhd.setUniqueParentLocator(parentName)
await childVhd.writeHeader()
await childVhd.writeFooter()
}

View File

@@ -0,0 +1,31 @@
import asyncIteratorToStream from 'async-iterator-to-stream'
import Vhd from './vhd'
export default asyncIteratorToStream(async function * (handler, path) {
const fd = await handler.openFile(path, 'r')
try {
const vhd = new Vhd(handler, fd)
await vhd.readHeaderAndFooter()
await vhd.readBlockAllocationTable()
const {
footer: { currentSize },
header: { blockSize },
} = vhd
const nFullBlocks = Math.floor(currentSize / blockSize)
const nLeftoverBytes = currentSize % blockSize
const emptyBlock = Buffer.alloc(blockSize)
for (let i = 0; i < nFullBlocks; ++i) {
yield vhd.containsBlock(i) ? (await vhd._readBlock(i)).data : emptyBlock
}
if (nLeftoverBytes !== 0) {
yield (vhd.containsBlock(nFullBlocks)
? (await vhd._readBlock(nFullBlocks)).data
: emptyBlock
).slice(0, nLeftoverBytes)
}
} finally {
await handler.closeFile(fd)
}
})

View File

@@ -0,0 +1,42 @@
import asyncIteratorToStream from 'async-iterator-to-stream'
import computeGeometryForSize from './_computeGeometryForSize'
import { createFooter } from './_createFooterHeader'
export default asyncIteratorToStream(async function * (size, blockParser) {
const geometry = computeGeometryForSize(size)
const actualSize = geometry.actualSize
const footer = createFooter(
actualSize,
Math.floor(Date.now() / 1000),
geometry
)
let position = 0
function * filePadding (paddingLength) {
if (paddingLength > 0) {
const chunkSize = 1024 * 1024 // 1Mo
for (
let paddingPosition = 0;
paddingPosition + chunkSize < paddingLength;
paddingPosition += chunkSize
) {
yield Buffer.alloc(chunkSize)
}
yield Buffer.alloc(paddingLength % chunkSize)
}
}
let next
while ((next = await blockParser.next()) !== null) {
const paddingLength = next.offsetBytes - position
if (paddingLength < 0) {
throw new Error('Received out of order blocks')
}
yield * filePadding(paddingLength)
yield next.data
position = next.offsetBytes + next.data.length
}
yield * filePadding(actualSize - position)
yield footer
})

View File

@@ -0,0 +1,128 @@
import assert from 'assert'
import asyncIteratorToStream from 'async-iterator-to-stream'
import computeGeometryForSize from './_computeGeometryForSize'
import { createFooter, createHeader } from './_createFooterHeader'
import {
BLOCK_UNUSED,
DEFAULT_BLOCK_SIZE as VHD_BLOCK_SIZE_BYTES,
DISK_TYPE_DYNAMIC,
FOOTER_SIZE,
HEADER_SIZE,
SECTOR_SIZE,
} from './_constants'
import { set as setBitmap } from './_bitmap'
const VHD_BLOCK_SIZE_SECTORS = VHD_BLOCK_SIZE_BYTES / SECTOR_SIZE
/**
* @returns {Array} an array of occupation bitmap, each bit mapping an input block size of bytes
*/
function createBAT (
firstBlockPosition,
blockAddressList,
ratio,
bat,
bitmapSize
) {
let currentVhdPositionSector = firstBlockPosition / SECTOR_SIZE
blockAddressList.forEach(blockPosition => {
assert.strictEqual(blockPosition % SECTOR_SIZE, 0)
const vhdTableIndex = Math.floor(blockPosition / VHD_BLOCK_SIZE_BYTES)
if (bat.readUInt32BE(vhdTableIndex * 4) === BLOCK_UNUSED) {
bat.writeUInt32BE(currentVhdPositionSector, vhdTableIndex * 4)
currentVhdPositionSector +=
(bitmapSize + VHD_BLOCK_SIZE_BYTES) / SECTOR_SIZE
}
})
}
export default asyncIteratorToStream(async function * (
diskSize,
incomingBlockSize,
blockAddressList,
blockIterator
) {
const ratio = VHD_BLOCK_SIZE_BYTES / incomingBlockSize
if (ratio % 1 !== 0) {
throw new Error(
`Can't import file, grain size (${incomingBlockSize}) is not a divider of VHD block size ${VHD_BLOCK_SIZE_BYTES}`
)
}
if (ratio > 53) {
throw new Error(
`Can't import file, grain size / block size ratio is > 53 (${ratio})`
)
}
const maxTableEntries = Math.ceil(diskSize / VHD_BLOCK_SIZE_BYTES) + 1
const tablePhysicalSizeBytes =
Math.ceil(maxTableEntries * 4 / SECTOR_SIZE) * SECTOR_SIZE
const batPosition = FOOTER_SIZE + HEADER_SIZE
const firstBlockPosition = batPosition + tablePhysicalSizeBytes
const geometry = computeGeometryForSize(diskSize)
const actualSize = geometry.actualSize
const footer = createFooter(
actualSize,
Math.floor(Date.now() / 1000),
geometry,
FOOTER_SIZE,
DISK_TYPE_DYNAMIC
)
const header = createHeader(
maxTableEntries,
batPosition,
VHD_BLOCK_SIZE_BYTES
)
const bitmapSize =
Math.ceil(VHD_BLOCK_SIZE_SECTORS / 8 / SECTOR_SIZE) * SECTOR_SIZE
const bat = Buffer.alloc(tablePhysicalSizeBytes, 0xff)
createBAT(firstBlockPosition, blockAddressList, ratio, bat, bitmapSize)
let position = 0
function * yieldAndTrack (buffer, expectedPosition) {
if (expectedPosition !== undefined) {
assert.strictEqual(position, expectedPosition)
}
if (buffer.length > 0) {
yield buffer
position += buffer.length
}
}
async function * generateFileContent (blockIterator, bitmapSize, ratio) {
let currentBlock = -1
let currentVhdBlockIndex = -1
let currentBlockWithBitmap = Buffer.alloc(0)
for await (const next of blockIterator) {
currentBlock++
assert.strictEqual(blockAddressList[currentBlock], next.offsetBytes)
const batIndex = Math.floor(next.offsetBytes / VHD_BLOCK_SIZE_BYTES)
if (batIndex !== currentVhdBlockIndex) {
if (currentVhdBlockIndex >= 0) {
yield * yieldAndTrack(
currentBlockWithBitmap,
bat.readUInt32BE(currentVhdBlockIndex * 4) * SECTOR_SIZE
)
}
currentBlockWithBitmap = Buffer.alloc(bitmapSize + VHD_BLOCK_SIZE_BYTES)
currentVhdBlockIndex = batIndex
}
const blockOffset =
(next.offsetBytes / SECTOR_SIZE) % VHD_BLOCK_SIZE_SECTORS
for (let bitPos = 0; bitPos < VHD_BLOCK_SIZE_SECTORS / ratio; bitPos++) {
setBitmap(currentBlockWithBitmap, blockOffset + bitPos)
}
next.data.copy(
currentBlockWithBitmap,
bitmapSize + next.offsetBytes % VHD_BLOCK_SIZE_BYTES
)
}
yield * yieldAndTrack(currentBlockWithBitmap)
}
yield * yieldAndTrack(footer, 0)
yield * yieldAndTrack(header, FOOTER_SIZE)
yield * yieldAndTrack(bat, FOOTER_SIZE + HEADER_SIZE)
yield * generateFileContent(blockIterator, bitmapSize, ratio)
yield * yieldAndTrack(footer)
})

View File

@@ -0,0 +1,153 @@
import asyncIteratorToStream from 'async-iterator-to-stream'
import { dirname, resolve } from 'path'
import Vhd from './vhd'
import {
BLOCK_UNUSED,
DISK_TYPE_DYNAMIC,
FOOTER_SIZE,
HEADER_SIZE,
SECTOR_SIZE,
} from './_constants'
import { fuFooter, fuHeader, checksumStruct } from './_structs'
import { test as mapTestBit } from './_bitmap'
const resolveRelativeFromFile = (file, path) =>
resolve('/', dirname(file), path).slice(1)
export default asyncIteratorToStream(function * (handler, path) {
const fds = []
try {
const vhds = []
while (true) {
const fd = yield handler.openFile(path, 'r')
fds.push(fd)
const vhd = new Vhd(handler, fd)
vhds.push(vhd)
yield vhd.readHeaderAndFooter()
yield vhd.readBlockAllocationTable()
if (vhd.footer.diskType === DISK_TYPE_DYNAMIC) {
break
}
path = resolveRelativeFromFile(path, vhd.header.parentUnicodeName)
}
const nVhds = vhds.length
// this the VHD we want to synthetize
const vhd = vhds[0]
// this is the root VHD
const rootVhd = vhds[nVhds - 1]
// data of our synthetic VHD
// TODO: set parentLocatorEntry-s in header
let header = {
...vhd.header,
tableOffset: FOOTER_SIZE + HEADER_SIZE,
parentTimestamp: rootVhd.header.parentTimestamp,
parentUnicodeName: rootVhd.header.parentUnicodeName,
parentUuid: rootVhd.header.parentUuid,
}
const bat = Buffer.allocUnsafe(vhd.batSize)
let footer = {
...vhd.footer,
dataOffset: FOOTER_SIZE,
diskType: rootVhd.footer.diskType,
}
const sectorsPerBlockData = vhd.sectorsPerBlock
const sectorsPerBlock = sectorsPerBlockData + vhd.bitmapSize / SECTOR_SIZE
const nBlocks = Math.ceil(footer.currentSize / header.blockSize)
const blocksOwner = new Array(nBlocks)
for (
let iBlock = 0,
blockOffset = Math.ceil(
(header.tableOffset + bat.length) / SECTOR_SIZE
);
iBlock < nBlocks;
++iBlock
) {
let blockSector = BLOCK_UNUSED
for (let i = 0; i < nVhds; ++i) {
if (vhds[i].containsBlock(iBlock)) {
blocksOwner[iBlock] = i
blockSector = blockOffset
blockOffset += sectorsPerBlock
break
}
}
bat.writeUInt32BE(blockSector, iBlock * 4)
}
footer = fuFooter.pack(footer)
checksumStruct(footer, fuFooter)
yield footer
header = fuHeader.pack(header)
checksumStruct(header, fuHeader)
yield header
yield bat
// TODO: for generic usage the bitmap needs to be properly computed for each block
const bitmap = Buffer.alloc(vhd.bitmapSize, 0xff)
for (let iBlock = 0; iBlock < nBlocks; ++iBlock) {
const owner = blocksOwner[iBlock]
if (owner === undefined) {
continue
}
yield bitmap
const blocksByVhd = new Map()
const emitBlockSectors = function * (iVhd, i, n) {
const vhd = vhds[iVhd]
const isRootVhd = vhd === rootVhd
if (!vhd.containsBlock(iBlock)) {
if (isRootVhd) {
yield Buffer.alloc((n - i) * SECTOR_SIZE)
} else {
yield * emitBlockSectors(iVhd + 1, i, n)
}
return
}
let block = blocksByVhd.get(vhd)
if (block === undefined) {
block = yield vhd._readBlock(iBlock)
blocksByVhd.set(vhd, block)
}
const { bitmap, data } = block
if (isRootVhd) {
yield data.slice(i * SECTOR_SIZE, n * SECTOR_SIZE)
return
}
while (i < n) {
const hasData = mapTestBit(bitmap, i)
const start = i
do {
++i
} while (i < n && mapTestBit(bitmap, i) === hasData)
if (hasData) {
yield data.slice(start * SECTOR_SIZE, i * SECTOR_SIZE)
} else {
yield * emitBlockSectors(iVhd + 1, start, i)
}
}
}
yield * emitBlockSectors(owner, 0, sectorsPerBlockData)
}
yield footer
} finally {
for (let i = 0, n = fds.length; i < n; ++i) {
handler.closeFile(fds[i]).catch(error => {
console.warn('createReadStream, closeFd', i, error)
})
}
}
})

View File

@@ -0,0 +1,9 @@
export { default } from './vhd'
export { default as chainVhd } from './chain'
export { default as createContentStream } from './createContentStream'
export { default as createReadableRawStream } from './createReadableRawStream'
export {
default as createReadableSparseStream,
} from './createReadableSparseStream'
export { default as createSyntheticStream } from './createSyntheticStream'
export { default as mergeVhd } from './merge'

View File

@@ -0,0 +1,283 @@
/* eslint-env jest */
import execa from 'execa'
import fs from 'fs-extra'
import getStream from 'get-stream'
import rimraf from 'rimraf'
import tmp from 'tmp'
import { getHandler } from '@xen-orchestra/fs'
import { randomBytes } from 'crypto'
import { fromEvent, fromCallback as pFromCallback } from 'promise-toolbox'
import chainVhd from './chain'
import createReadStream from './createSyntheticStream'
import Vhd from './vhd'
import vhdMerge from './merge'
import { SECTOR_SIZE } from './_constants'
const initialDir = process.cwd()
jest.setTimeout(60000)
beforeEach(async () => {
const dir = await pFromCallback(cb => tmp.dir(cb))
process.chdir(dir)
})
afterEach(async () => {
const tmpDir = process.cwd()
process.chdir(initialDir)
await pFromCallback(cb => rimraf(tmpDir, cb))
})
async function createRandomFile (name, sizeMb) {
await execa('bash', [
'-c',
`< /dev/urandom tr -dc "\\t\\n [:alnum:]" | head -c ${sizeMb}M >${name}`,
])
}
async function checkFile (vhdName) {
await execa('vhd-util', ['check', '-p', '-b', '-t', '-n', vhdName])
}
async function recoverRawContent (vhdName, rawName, originalSize) {
await checkFile(vhdName)
await execa('qemu-img', ['convert', '-fvpc', '-Oraw', vhdName, rawName])
if (originalSize !== undefined) {
await execa('truncate', ['-s', originalSize, rawName])
}
}
async function convertFromRawToVhd (rawName, vhdName) {
await execa('qemu-img', ['convert', '-f', 'raw', '-Ovpc', rawName, vhdName])
}
test('blocks can be moved', async () => {
const initalSize = 4
await createRandomFile('randomfile', initalSize)
await convertFromRawToVhd('randomfile', 'randomfile.vhd')
const handler = getHandler({ url: 'file://' + process.cwd() })
const originalSize = await handler.getSize('randomfile')
const newVhd = new Vhd(handler, 'randomfile.vhd')
await newVhd.readHeaderAndFooter()
await newVhd.readBlockAllocationTable()
await newVhd._freeFirstBlockSpace(8000000)
await recoverRawContent('randomfile.vhd', 'recovered', originalSize)
expect(await fs.readFile('recovered')).toEqual(
await fs.readFile('randomfile')
)
})
test('the BAT MSB is not used for sign', async () => {
const randomBuffer = await pFromCallback(cb => randomBytes(SECTOR_SIZE, cb))
await execa('qemu-img', ['create', '-fvpc', 'empty.vhd', '1.8T'])
const handler = getHandler({ url: 'file://' + process.cwd() })
const vhd = new Vhd(handler, 'empty.vhd')
await vhd.readHeaderAndFooter()
await vhd.readBlockAllocationTable()
// we want the bit 31 to be on, to prove it's not been used for sign
const hugeWritePositionSectors = Math.pow(2, 31) + 200
await vhd.writeData(hugeWritePositionSectors, randomBuffer)
await checkFile('empty.vhd')
// here we are moving the first sector very far in the VHD to prove the BAT doesn't use signed int32
const hugePositionBytes = hugeWritePositionSectors * SECTOR_SIZE
await vhd._freeFirstBlockSpace(hugePositionBytes)
// we recover the data manually for speed reasons.
// fs.write() with offset is way faster than qemu-img when there is a 1.5To
// hole before the block of data
const recoveredFile = await fs.open('recovered', 'w')
try {
const vhd2 = new Vhd(handler, 'empty.vhd')
await vhd2.readHeaderAndFooter()
await vhd2.readBlockAllocationTable()
for (let i = 0; i < vhd.header.maxTableEntries; i++) {
const entry = vhd._getBatEntry(i)
if (entry !== 0xffffffff) {
const block = (await vhd2._readBlock(i)).data
await fs.write(
recoveredFile,
block,
0,
block.length,
vhd2.header.blockSize * i
)
}
}
} finally {
fs.close(recoveredFile)
}
const recovered = await getStream.buffer(
await fs.createReadStream('recovered', {
start: hugePositionBytes,
end: hugePositionBytes + randomBuffer.length - 1,
})
)
expect(recovered).toEqual(randomBuffer)
})
test('writeData on empty file', async () => {
const mbOfRandom = 3
await createRandomFile('randomfile', mbOfRandom)
await execa('qemu-img', ['create', '-fvpc', 'empty.vhd', mbOfRandom + 'M'])
const randomData = await fs.readFile('randomfile')
const handler = getHandler({ url: 'file://' + process.cwd() })
const originalSize = await handler.getSize('randomfile')
const newVhd = new Vhd(handler, 'empty.vhd')
await newVhd.readHeaderAndFooter()
await newVhd.readBlockAllocationTable()
await newVhd.writeData(0, randomData)
await recoverRawContent('empty.vhd', 'recovered', originalSize)
expect(await fs.readFile('recovered')).toEqual(randomData)
})
test('writeData in 2 non-overlaping operations', async () => {
const mbOfRandom = 3
await createRandomFile('randomfile', mbOfRandom)
await execa('qemu-img', ['create', '-fvpc', 'empty.vhd', mbOfRandom + 'M'])
const randomData = await fs.readFile('randomfile')
const handler = getHandler({ url: 'file://' + process.cwd() })
const originalSize = await handler.getSize('randomfile')
const newVhd = new Vhd(handler, 'empty.vhd')
await newVhd.readHeaderAndFooter()
await newVhd.readBlockAllocationTable()
const splitPointSectors = 2
await newVhd.writeData(0, randomData.slice(0, splitPointSectors * 512))
await newVhd.writeData(
splitPointSectors,
randomData.slice(splitPointSectors * 512)
)
await recoverRawContent('empty.vhd', 'recovered', originalSize)
expect(await fs.readFile('recovered')).toEqual(randomData)
})
test('writeData in 2 overlaping operations', async () => {
const mbOfRandom = 3
await createRandomFile('randomfile', mbOfRandom)
await execa('qemu-img', ['create', '-fvpc', 'empty.vhd', mbOfRandom + 'M'])
const randomData = await fs.readFile('randomfile')
const handler = getHandler({ url: 'file://' + process.cwd() })
const originalSize = await handler.getSize('randomfile')
const newVhd = new Vhd(handler, 'empty.vhd')
await newVhd.readHeaderAndFooter()
await newVhd.readBlockAllocationTable()
const endFirstWrite = 3
const startSecondWrite = 2
await newVhd.writeData(0, randomData.slice(0, endFirstWrite * 512))
await newVhd.writeData(
startSecondWrite,
randomData.slice(startSecondWrite * 512)
)
await recoverRawContent('empty.vhd', 'recovered', originalSize)
expect(await fs.readFile('recovered')).toEqual(randomData)
})
test('BAT can be extended and blocks moved', async () => {
const initalSize = 4
await createRandomFile('randomfile', initalSize)
await convertFromRawToVhd('randomfile', 'randomfile.vhd')
const handler = getHandler({ url: 'file://' + process.cwd() })
const originalSize = await handler.getSize('randomfile')
const newVhd = new Vhd(handler, 'randomfile.vhd')
await newVhd.readHeaderAndFooter()
await newVhd.readBlockAllocationTable()
await newVhd.ensureBatSize(2000)
await recoverRawContent('randomfile.vhd', 'recovered', originalSize)
expect(await fs.readFile('recovered')).toEqual(
await fs.readFile('randomfile')
)
})
test('coalesce works with empty parent files', async () => {
const mbOfRandom = 2
await createRandomFile('randomfile', mbOfRandom)
await convertFromRawToVhd('randomfile', 'randomfile.vhd')
await execa('qemu-img', [
'create',
'-fvpc',
'empty.vhd',
mbOfRandom + 1 + 'M',
])
await checkFile('randomfile.vhd')
await checkFile('empty.vhd')
const handler = getHandler({ url: 'file://' + process.cwd() })
const originalSize = await handler._getSize('randomfile')
await chainVhd(handler, 'empty.vhd', handler, 'randomfile.vhd', true)
await checkFile('randomfile.vhd')
await checkFile('empty.vhd')
await vhdMerge(handler, 'empty.vhd', handler, 'randomfile.vhd')
await recoverRawContent('empty.vhd', 'recovered', originalSize)
expect(await fs.readFile('recovered')).toEqual(
await fs.readFile('randomfile')
)
})
test('coalesce works in normal cases', async () => {
const mbOfRandom = 5
await createRandomFile('randomfile', mbOfRandom)
await createRandomFile('small_randomfile', Math.ceil(mbOfRandom / 2))
await execa('qemu-img', [
'create',
'-fvpc',
'parent.vhd',
mbOfRandom + 1 + 'M',
])
await convertFromRawToVhd('randomfile', 'child1.vhd')
const handler = getHandler({ url: 'file://' + process.cwd() })
await execa('vhd-util', ['snapshot', '-n', 'child2.vhd', '-p', 'child1.vhd'])
const vhd = new Vhd(handler, 'child2.vhd')
await vhd.readHeaderAndFooter()
await vhd.readBlockAllocationTable()
vhd.footer.creatorApplication = 'xoa'
await vhd.writeFooter()
const originalSize = await handler._getSize('randomfile')
await chainVhd(handler, 'parent.vhd', handler, 'child1.vhd', true)
await execa('vhd-util', ['check', '-t', '-n', 'child1.vhd'])
await chainVhd(handler, 'child1.vhd', handler, 'child2.vhd', true)
await execa('vhd-util', ['check', '-t', '-n', 'child2.vhd'])
const smallRandom = await fs.readFile('small_randomfile')
const newVhd = new Vhd(handler, 'child2.vhd')
await newVhd.readHeaderAndFooter()
await newVhd.readBlockAllocationTable()
await newVhd.writeData(5, smallRandom)
await checkFile('child2.vhd')
await checkFile('child1.vhd')
await checkFile('parent.vhd')
await vhdMerge(handler, 'parent.vhd', handler, 'child1.vhd')
await checkFile('parent.vhd')
await chainVhd(handler, 'parent.vhd', handler, 'child2.vhd', true)
await checkFile('child2.vhd')
await vhdMerge(handler, 'parent.vhd', handler, 'child2.vhd')
await checkFile('parent.vhd')
await recoverRawContent(
'parent.vhd',
'recovered_from_coalescing',
originalSize
)
await execa('cp', ['randomfile', 'randomfile2'])
const fd = await fs.open('randomfile2', 'r+')
try {
await fs.write(fd, smallRandom, 0, smallRandom.length, 5 * SECTOR_SIZE)
} finally {
await fs.close(fd)
}
expect(await fs.readFile('recovered_from_coalescing')).toEqual(
await fs.readFile('randomfile2')
)
})
test('createSyntheticStream passes vhd-util check', async () => {
const initalSize = 4
await createRandomFile('randomfile', initalSize)
await convertFromRawToVhd('randomfile', 'randomfile.vhd')
const handler = getHandler({ url: 'file://' + process.cwd() })
const stream = createReadStream(handler, 'randomfile.vhd')
await fromEvent(
stream.pipe(await fs.createWriteStream('recovered.vhd')),
'finish'
)
await checkFile('recovered.vhd')
await execa('qemu-img', ['compare', 'recovered.vhd', 'randomfile'])
})

View File

@@ -0,0 +1,77 @@
// TODO: remove once completely merged in vhd.js
import assert from 'assert'
import concurrency from 'limit-concurrency-decorator'
import Vhd from './vhd'
import { DISK_TYPE_DIFFERENCING, DISK_TYPE_DYNAMIC } from './_constants'
// Merge vhd child into vhd parent.
export default concurrency(2)(async function merge (
parentHandler,
parentPath,
childHandler,
childPath
) {
const parentFd = await parentHandler.openFile(parentPath, 'r+')
try {
const parentVhd = new Vhd(parentHandler, parentFd)
const childFd = await childHandler.openFile(childPath, 'r')
try {
const childVhd = new Vhd(childHandler, childFd)
// Reading footer and header.
await Promise.all([
parentVhd.readHeaderAndFooter(),
childVhd.readHeaderAndFooter(),
])
assert(childVhd.header.blockSize === parentVhd.header.blockSize)
const parentDiskType = parentVhd.footer.diskType
assert(
parentDiskType === DISK_TYPE_DIFFERENCING ||
parentDiskType === DISK_TYPE_DYNAMIC
)
assert.strictEqual(childVhd.footer.diskType, DISK_TYPE_DIFFERENCING)
// Read allocation table of child/parent.
await Promise.all([
parentVhd.readBlockAllocationTable(),
childVhd.readBlockAllocationTable(),
])
await parentVhd.ensureBatSize(childVhd.header.maxTableEntries)
let mergedDataSize = 0
for (
let blockId = 0;
blockId < childVhd.header.maxTableEntries;
blockId++
) {
if (childVhd.containsBlock(blockId)) {
mergedDataSize += await parentVhd.coalesceBlock(childVhd, blockId)
}
}
const cFooter = childVhd.footer
const pFooter = parentVhd.footer
pFooter.currentSize = cFooter.currentSize
pFooter.diskGeometry = { ...cFooter.diskGeometry }
pFooter.originalSize = cFooter.originalSize
pFooter.timestamp = cFooter.timestamp
pFooter.uuid = cFooter.uuid
// necessary to update values and to recreate the footer after block
// creation
await parentVhd.writeFooter()
return mergedDataSize
} finally {
await childHandler.closeFile(childFd)
}
} finally {
await parentHandler.closeFile(parentFd)
}
})

View File

@@ -0,0 +1,134 @@
/* eslint-env jest */
import execa from 'execa'
import rimraf from 'rimraf'
import tmp from 'tmp'
import { createWriteStream, readFile } from 'fs-promise'
import { fromCallback as pFromCallback, fromEvent } from 'promise-toolbox'
import { createFooter } from './_createFooterHeader'
import createReadableRawVHDStream from './createReadableRawStream'
import createReadableSparseVHDStream from './createReadableSparseStream'
const initialDir = process.cwd()
beforeEach(async () => {
const dir = await pFromCallback(cb => tmp.dir(cb))
process.chdir(dir)
})
afterEach(async () => {
const tmpDir = process.cwd()
process.chdir(initialDir)
await pFromCallback(cb => rimraf(tmpDir, cb))
})
test('createFooter() does not crash', () => {
createFooter(104448, Math.floor(Date.now() / 1000), {
cylinders: 3,
heads: 4,
sectorsPerTrack: 17,
})
})
test('ReadableRawVHDStream does not crash', async () => {
const data = [
{
offsetBytes: 100,
data: Buffer.from('azerzaerazeraze', 'ascii'),
},
{
offsetBytes: 700,
data: Buffer.from('gdfslkdfguer', 'ascii'),
},
]
let index = 0
const mockParser = {
next: () => {
if (index < data.length) {
const result = data[index]
index++
return result
} else {
return null
}
},
}
const fileSize = 1000
const stream = createReadableRawVHDStream(fileSize, mockParser)
const pipe = stream.pipe(createWriteStream('output.vhd'))
await fromEvent(pipe, 'finish')
await execa('vhd-util', ['check', '-t', '-i', '-n', 'output.vhd'])
})
test('ReadableRawVHDStream detects when blocks are out of order', async () => {
const data = [
{
offsetBytes: 700,
data: Buffer.from('azerzaerazeraze', 'ascii'),
},
{
offsetBytes: 100,
data: Buffer.from('gdfslkdfguer', 'ascii'),
},
]
let index = 0
const mockParser = {
next: () => {
if (index < data.length) {
const result = data[index]
index++
return result
} else {
return null
}
},
}
return expect(
new Promise((resolve, reject) => {
const stream = createReadableRawVHDStream(100000, mockParser)
stream.on('error', reject)
const pipe = stream.pipe(createWriteStream('outputStream'))
pipe.on('finish', resolve)
pipe.on('error', reject)
})
).rejects.toThrow('Received out of order blocks')
})
test('ReadableSparseVHDStream can handle a sparse file', async () => {
const blockSize = Math.pow(2, 16)
const blocks = [
{
offsetBytes: blockSize * 3,
data: Buffer.alloc(blockSize, 'azerzaerazeraze', 'ascii'),
},
{
offsetBytes: blockSize * 100,
data: Buffer.alloc(blockSize, 'gdfslkdfguer', 'ascii'),
},
]
const fileSize = blockSize * 110
const stream = createReadableSparseVHDStream(
fileSize,
blockSize,
blocks.map(b => b.offsetBytes),
blocks
)
const pipe = stream.pipe(createWriteStream('output.vhd'))
await fromEvent(pipe, 'finish')
await execa('vhd-util', ['check', '-t', '-i', '-n', 'output.vhd'])
await execa('qemu-img', [
'convert',
'-f',
'vpc',
'-O',
'raw',
'output.vhd',
'out1.raw',
])
const out1 = await readFile('out1.raw')
const expected = Buffer.alloc(fileSize)
blocks.forEach(b => {
b.data.copy(expected, b.offsetBytes)
})
await expect(out1.slice(0, expected.length)).toEqual(expected)
})

624
packages/vhd-lib/src/vhd.js Normal file
View File

@@ -0,0 +1,624 @@
import assert from 'assert'
import { fromEvent } from 'promise-toolbox'
import constantStream from './_constant-stream'
import { fuFooter, fuHeader, checksumStruct, unpackField } from './_structs'
import { set as mapSetBit, test as mapTestBit } from './_bitmap'
import {
BLOCK_UNUSED,
DISK_TYPE_DIFFERENCING,
DISK_TYPE_DYNAMIC,
FILE_FORMAT_VERSION,
FOOTER_COOKIE,
FOOTER_SIZE,
HEADER_COOKIE,
HEADER_SIZE,
HEADER_VERSION,
PARENT_LOCATOR_ENTRIES,
PLATFORM_NONE,
PLATFORM_W2KU,
SECTOR_SIZE,
} from './_constants'
const VHD_UTIL_DEBUG = 0
const debug = VHD_UTIL_DEBUG
? str => console.log(`[vhd-merge]${str}`)
: () => null
// ===================================================================
//
// Spec:
// https://www.microsoft.com/en-us/download/details.aspx?id=23850
//
// C implementation:
// https://github.com/rubiojr/vhd-util-convert
//
// ===================================================================
const computeBatSize = entries =>
sectorsToBytes(sectorsRoundUpNoZero(entries * 4))
// Sectors conversions.
const sectorsRoundUpNoZero = bytes => Math.ceil(bytes / SECTOR_SIZE) || 1
const sectorsToBytes = sectors => sectors * SECTOR_SIZE
const assertChecksum = (name, buf, struct) => {
const actual = unpackField(struct.fields.checksum, buf)
const expected = checksumStruct(buf, struct)
if (actual !== expected) {
throw new Error(`invalid ${name} checksum ${actual}, expected ${expected}`)
}
}
// unused block as buffer containing a uint32BE
const BUF_BLOCK_UNUSED = Buffer.allocUnsafe(4)
BUF_BLOCK_UNUSED.writeUInt32BE(BLOCK_UNUSED, 0)
// ===================================================================
// Format:
//
// 1. Footer (512)
// 2. Header (1024)
// 3. Unordered entries
// - BAT (batSize @ header.tableOffset)
// - Blocks (@ blockOffset(i))
// - bitmap (blockBitmapSize)
// - data (header.blockSize)
// - Parent locators (parentLocatorSize(i) @ parentLocatorOffset(i))
// 4. Footer (512 @ vhdSize - 512)
//
// Variables:
//
// - batSize = min(1, ceil(header.maxTableEntries * 4 / sectorSize)) * sectorSize
// - blockBitmapSize = ceil(header.blockSize / sectorSize / 8 / sectorSize) * sectorSize
// - blockOffset(i) = bat[i] * sectorSize
// - nBlocks = ceil(footer.currentSize / header.blockSize)
// - parentLocatorOffset(i) = header.parentLocatorEntry[i].platformDataOffset
// - parentLocatorSize(i) = header.parentLocatorEntry[i].platformDataSpace * sectorSize
// - sectorSize = 512
export default class Vhd {
get batSize () {
return computeBatSize(this.header.maxTableEntries)
}
constructor (handler, path) {
this._handler = handler
this._path = path
}
// =================================================================
// Read functions.
// =================================================================
async _read (start, n) {
const { bytesRead, buffer } = await this._handler.read(
this._path,
Buffer.alloc(n),
start
)
assert.equal(bytesRead, n)
return buffer
}
containsBlock (id) {
return this._getBatEntry(id) !== BLOCK_UNUSED
}
// Returns the first address after metadata. (In bytes)
getEndOfHeaders () {
const { header } = this
let end = FOOTER_SIZE + HEADER_SIZE
// Max(end, block allocation table end)
end = Math.max(end, header.tableOffset + this.batSize)
for (let i = 0; i < PARENT_LOCATOR_ENTRIES; i++) {
const entry = header.parentLocatorEntry[i]
if (entry.platformCode !== PLATFORM_NONE) {
end = Math.max(
end,
entry.platformDataOffset + sectorsToBytes(entry.platformDataSpace)
)
}
}
debug(`End of headers: ${end}.`)
return end
}
// Returns the first sector after data.
getEndOfData () {
let end = Math.ceil(this.getEndOfHeaders() / SECTOR_SIZE)
const fullBlockSize = this.sectorsOfBitmap + this.sectorsPerBlock
const { maxTableEntries } = this.header
for (let i = 0; i < maxTableEntries; i++) {
const blockAddr = this._getBatEntry(i)
if (blockAddr !== BLOCK_UNUSED) {
end = Math.max(end, blockAddr + fullBlockSize)
}
}
debug(`End of data: ${end}.`)
return sectorsToBytes(end)
}
// TODO: extract the checks into reusable functions:
// - better human reporting
// - auto repair if possible
async readHeaderAndFooter (checkSecondFooter = true) {
const buf = await this._read(0, FOOTER_SIZE + HEADER_SIZE)
const bufFooter = buf.slice(0, FOOTER_SIZE)
const bufHeader = buf.slice(FOOTER_SIZE)
assertChecksum('footer', bufFooter, fuFooter)
assertChecksum('header', bufHeader, fuHeader)
if (checkSecondFooter) {
const size = await this._handler.getSize(this._path)
assert(
bufFooter.equals(await this._read(size - FOOTER_SIZE, FOOTER_SIZE)),
'footer1 !== footer2'
)
}
const footer = (this.footer = fuFooter.unpack(bufFooter))
assert.strictEqual(footer.cookie, FOOTER_COOKIE, 'footer cookie')
assert.strictEqual(footer.dataOffset, FOOTER_SIZE)
assert.strictEqual(footer.fileFormatVersion, FILE_FORMAT_VERSION)
assert(footer.originalSize <= footer.currentSize)
assert(
footer.diskType === DISK_TYPE_DIFFERENCING ||
footer.diskType === DISK_TYPE_DYNAMIC
)
const header = (this.header = fuHeader.unpack(bufHeader))
assert.strictEqual(header.cookie, HEADER_COOKIE)
assert.strictEqual(header.dataOffset, undefined)
assert.strictEqual(header.headerVersion, HEADER_VERSION)
assert(header.maxTableEntries >= footer.currentSize / header.blockSize)
assert(Number.isInteger(Math.log2(header.blockSize / SECTOR_SIZE)))
// Compute the number of sectors in one block.
// Default: One block contains 4096 sectors of 512 bytes.
const sectorsPerBlock = (this.sectorsPerBlock =
header.blockSize / SECTOR_SIZE)
// Compute bitmap size in sectors.
// Default: 1.
const sectorsOfBitmap = (this.sectorsOfBitmap = sectorsRoundUpNoZero(
sectorsPerBlock >> 3
))
// Full block size => data block size + bitmap size.
this.fullBlockSize = sectorsToBytes(sectorsPerBlock + sectorsOfBitmap)
// In bytes.
// Default: 512.
this.bitmapSize = sectorsToBytes(sectorsOfBitmap)
}
// Returns a buffer that contains the block allocation table of a vhd file.
async readBlockAllocationTable () {
const { header } = this
this.blockTable = await this._read(
header.tableOffset,
header.maxTableEntries * 4
)
}
// return the first sector (bitmap) of a block
_getBatEntry (block) {
return this.blockTable.readUInt32BE(block * 4)
}
_readBlock (blockId, onlyBitmap = false) {
const blockAddr = this._getBatEntry(blockId)
if (blockAddr === BLOCK_UNUSED) {
throw new Error(`no such block ${blockId}`)
}
return this._read(
sectorsToBytes(blockAddr),
onlyBitmap ? this.bitmapSize : this.fullBlockSize
).then(
buf =>
onlyBitmap
? { id: blockId, bitmap: buf }
: {
id: blockId,
bitmap: buf.slice(0, this.bitmapSize),
data: buf.slice(this.bitmapSize),
buffer: buf,
}
)
}
// get the identifiers and first sectors of the first and last block
// in the file
//
_getFirstAndLastBlocks () {
const n = this.header.maxTableEntries
const bat = this.blockTable
let i = 0
let j = 0
let first, firstSector, last, lastSector
// get first allocated block for initialization
while ((firstSector = bat.readUInt32BE(j)) === BLOCK_UNUSED) {
i += 1
j += 4
if (i === n) {
const error = new Error('no allocated block found')
error.noBlock = true
throw error
}
}
lastSector = firstSector
first = last = i
while (i < n) {
const sector = bat.readUInt32BE(j)
if (sector !== BLOCK_UNUSED) {
if (sector < firstSector) {
first = i
firstSector = sector
} else if (sector > lastSector) {
last = i
lastSector = sector
}
}
i += 1
j += 4
}
return { first, firstSector, last, lastSector }
}
// =================================================================
// Write functions.
// =================================================================
// Write a buffer/stream at a given position in a vhd file.
async _write (data, offset) {
debug(
`_write offset=${offset} size=${
Buffer.isBuffer(data) ? data.length : '???'
}`
)
// TODO: could probably be merged in remote handlers.
const stream = await this._handler.createOutputStream(this._path, {
flags: 'r+',
start: offset,
})
return Buffer.isBuffer(data)
? new Promise((resolve, reject) => {
stream.on('error', reject)
stream.end(data, resolve)
})
: fromEvent(data.pipe(stream), 'finish')
}
async _freeFirstBlockSpace (spaceNeededBytes) {
try {
const { first, firstSector, lastSector } = this._getFirstAndLastBlocks()
const tableOffset = this.header.tableOffset
const { batSize } = this
const newMinSector = Math.ceil(
(tableOffset + batSize + spaceNeededBytes) / SECTOR_SIZE
)
if (
tableOffset + batSize + spaceNeededBytes >=
sectorsToBytes(firstSector)
) {
const { fullBlockSize } = this
const newFirstSector = Math.max(
lastSector + fullBlockSize / SECTOR_SIZE,
newMinSector
)
debug(
`freeFirstBlockSpace: move first block ${firstSector} -> ${newFirstSector}`
)
// copy the first block at the end
const block = await this._read(
sectorsToBytes(firstSector),
fullBlockSize
)
await this._write(block, sectorsToBytes(newFirstSector))
await this._setBatEntry(first, newFirstSector)
await this.writeFooter(true)
spaceNeededBytes -= this.fullBlockSize
if (spaceNeededBytes > 0) {
return this._freeFirstBlockSpace(spaceNeededBytes)
}
}
} catch (e) {
if (!e.noBlock) {
throw e
}
}
}
async ensureBatSize (entries) {
const { header } = this
const prevMaxTableEntries = header.maxTableEntries
if (prevMaxTableEntries >= entries) {
return
}
const newBatSize = computeBatSize(entries)
await this._freeFirstBlockSpace(newBatSize - this.batSize)
const maxTableEntries = (header.maxTableEntries = entries)
const prevBat = this.blockTable
const bat = (this.blockTable = Buffer.allocUnsafe(newBatSize))
prevBat.copy(bat)
bat.fill(BUF_BLOCK_UNUSED, prevMaxTableEntries * 4)
debug(
`ensureBatSize: extend BAT ${prevMaxTableEntries} -> ${maxTableEntries}`
)
await this._write(
constantStream(BUF_BLOCK_UNUSED, maxTableEntries - prevMaxTableEntries),
header.tableOffset + prevBat.length
)
await this.writeHeader()
}
// set the first sector (bitmap) of a block
_setBatEntry (block, blockSector) {
const i = block * 4
const { blockTable } = this
blockTable.writeUInt32BE(blockSector, i)
return this._write(blockTable.slice(i, i + 4), this.header.tableOffset + i)
}
// Make a new empty block at vhd end.
// Update block allocation table in context and in file.
async createBlock (blockId) {
const blockAddr = Math.ceil(this.getEndOfData() / SECTOR_SIZE)
debug(`create block ${blockId} at ${blockAddr}`)
await Promise.all([
// Write an empty block and addr in vhd file.
this._write(
constantStream([0], this.fullBlockSize),
sectorsToBytes(blockAddr)
),
this._setBatEntry(blockId, blockAddr),
])
return blockAddr
}
// Write a bitmap at a block address.
async writeBlockBitmap (blockAddr, bitmap) {
const { bitmapSize } = this
if (bitmap.length !== bitmapSize) {
throw new Error(`Bitmap length is not correct ! ${bitmap.length}`)
}
const offset = sectorsToBytes(blockAddr)
debug(
`Write bitmap at: ${offset}. (size=${bitmapSize}, data=${bitmap.toString(
'hex'
)})`
)
await this._write(bitmap, sectorsToBytes(blockAddr))
}
async writeEntireBlock (block) {
let blockAddr = this._getBatEntry(block.id)
if (blockAddr === BLOCK_UNUSED) {
blockAddr = await this.createBlock(block.id)
}
await this._write(block.buffer, sectorsToBytes(blockAddr))
}
async writeBlockSectors (block, beginSectorId, endSectorId, parentBitmap) {
let blockAddr = this._getBatEntry(block.id)
if (blockAddr === BLOCK_UNUSED) {
blockAddr = await this.createBlock(block.id)
parentBitmap = Buffer.alloc(this.bitmapSize, 0)
} else if (parentBitmap === undefined) {
parentBitmap = (await this._readBlock(block.id, true)).bitmap
}
const offset = blockAddr + this.sectorsOfBitmap + beginSectorId
debug(
`writeBlockSectors at ${offset} block=${
block.id
}, sectors=${beginSectorId}...${endSectorId}`
)
for (let i = beginSectorId; i < endSectorId; ++i) {
mapSetBit(parentBitmap, i)
}
await this.writeBlockBitmap(blockAddr, parentBitmap)
await this._write(
block.data.slice(
sectorsToBytes(beginSectorId),
sectorsToBytes(endSectorId)
),
sectorsToBytes(offset)
)
}
async coalesceBlock (child, blockId) {
const block = await child._readBlock(blockId)
const { bitmap, data } = block
debug(`coalesceBlock block=${blockId}`)
// For each sector of block data...
const { sectorsPerBlock } = child
let parentBitmap = null
for (let i = 0; i < sectorsPerBlock; i++) {
// If no changes on one sector, skip.
if (!mapTestBit(bitmap, i)) {
continue
}
let endSector = i + 1
// Count changed sectors.
while (endSector < sectorsPerBlock && mapTestBit(bitmap, endSector)) {
++endSector
}
// Write n sectors into parent.
debug(`coalesceBlock: write sectors=${i}...${endSector}`)
const isFullBlock = i === 0 && endSector === sectorsPerBlock
if (isFullBlock) {
await this.writeEntireBlock(block)
} else {
if (parentBitmap === null) {
parentBitmap = (await this._readBlock(blockId, true)).bitmap
}
await this.writeBlockSectors(block, i, endSector, parentBitmap)
}
i = endSector
}
// Return the merged data size
return data.length
}
// Write a context footer. (At the end and beginning of a vhd file.)
async writeFooter (onlyEndFooter = false) {
const { footer } = this
const rawFooter = fuFooter.pack(footer)
const eof = await this._handler.getSize(this._path)
// sometimes the file is longer than anticipated, we still need to put the footer at the end
const offset = Math.max(this.getEndOfData(), eof - rawFooter.length)
footer.checksum = checksumStruct(rawFooter, fuFooter)
debug(
`Write footer at: ${offset} (checksum=${
footer.checksum
}). (data=${rawFooter.toString('hex')})`
)
if (!onlyEndFooter) {
await this._write(rawFooter, 0)
}
await this._write(rawFooter, offset)
}
writeHeader () {
const { header } = this
const rawHeader = fuHeader.pack(header)
header.checksum = checksumStruct(rawHeader, fuHeader)
const offset = FOOTER_SIZE
debug(
`Write header at: ${offset} (checksum=${
header.checksum
}). (data=${rawHeader.toString('hex')})`
)
return this._write(rawHeader, offset)
}
async writeData (offsetSectors, buffer) {
const bufferSizeSectors = Math.ceil(buffer.length / SECTOR_SIZE)
const startBlock = Math.floor(offsetSectors / this.sectorsPerBlock)
const endBufferSectors = offsetSectors + bufferSizeSectors
const lastBlock = Math.ceil(endBufferSectors / this.sectorsPerBlock) - 1
await this.ensureBatSize(lastBlock)
const blockSizeBytes = this.sectorsPerBlock * SECTOR_SIZE
const coversWholeBlock = (offsetInBlockSectors, endInBlockSectors) =>
offsetInBlockSectors === 0 && endInBlockSectors === this.sectorsPerBlock
for (
let currentBlock = startBlock;
currentBlock <= lastBlock;
currentBlock++
) {
const offsetInBlockSectors = Math.max(
0,
offsetSectors - currentBlock * this.sectorsPerBlock
)
const endInBlockSectors = Math.min(
endBufferSectors - currentBlock * this.sectorsPerBlock,
this.sectorsPerBlock
)
const startInBuffer = Math.max(
0,
(currentBlock * this.sectorsPerBlock - offsetSectors) * SECTOR_SIZE
)
const endInBuffer = Math.min(
((currentBlock + 1) * this.sectorsPerBlock - offsetSectors) *
SECTOR_SIZE,
buffer.length
)
let inputBuffer
if (coversWholeBlock(offsetInBlockSectors, endInBlockSectors)) {
inputBuffer = buffer.slice(startInBuffer, endInBuffer)
} else {
inputBuffer = Buffer.alloc(blockSizeBytes, 0)
buffer.copy(
inputBuffer,
offsetInBlockSectors * SECTOR_SIZE,
startInBuffer,
endInBuffer
)
}
await this.writeBlockSectors(
{ id: currentBlock, data: inputBuffer },
offsetInBlockSectors,
endInBlockSectors
)
}
await this.writeFooter()
}
async ensureSpaceForParentLocators (neededSectors) {
const firstLocatorOffset = FOOTER_SIZE + HEADER_SIZE
const currentSpace =
Math.floor(this.header.tableOffset / SECTOR_SIZE) -
firstLocatorOffset / SECTOR_SIZE
if (currentSpace < neededSectors) {
const deltaSectors = neededSectors - currentSpace
await this._freeFirstBlockSpace(sectorsToBytes(deltaSectors))
this.header.tableOffset += sectorsToBytes(deltaSectors)
await this._write(this.blockTable, this.header.tableOffset)
}
return firstLocatorOffset
}
async setUniqueParentLocator (fileNameString) {
const { header } = this
header.parentLocatorEntry[0].platformCode = PLATFORM_W2KU
const encodedFilename = Buffer.from(fileNameString, 'utf16le')
const dataSpaceSectors = Math.ceil(encodedFilename.length / SECTOR_SIZE)
const position = await this.ensureSpaceForParentLocators(dataSpaceSectors)
await this._write(encodedFilename, position)
header.parentLocatorEntry[0].platformDataSpace =
dataSpaceSectors * SECTOR_SIZE
header.parentLocatorEntry[0].platformDataLength = encodedFilename.length
header.parentLocatorEntry[0].platformDataOffset = position
for (let i = 1; i < 8; i++) {
header.parentLocatorEntry[i].platformCode = PLATFORM_NONE
header.parentLocatorEntry[i].platformDataSpace = 0
header.parentLocatorEntry[i].platformDataLength = 0
header.parentLocatorEntry[i].platformDataOffset = 0
}
}
}

View File

@@ -0,0 +1,24 @@
/benchmark/
/benchmarks/
*.bench.js
*.bench.js.map
/examples/
example.js
example.js.map
*.example.js
*.example.js.map
/fixture/
/fixtures/
*.fixture.js
*.fixture.js.map
*.fixtures.js
*.fixtures.js.map
/test/
/tests/
*.spec.js
*.spec.js.map
__snapshots__/

130
packages/xen-api/README.md Normal file
View File

@@ -0,0 +1,130 @@
# xen-api [![Build Status](https://travis-ci.org/vatesfr/xen-orchestra.png?branch=master)](https://travis-ci.org/vatesfr/xen-orchestra)
> Connector to the Xen API
Tested with:
- XenServer 7.3
- XenServer 7.2
- XenServer 7.1
- XenServer 7
- XenServer 6.5
- XenServer 6.2
- XenServer 5.6
## Install
Installation of the [npm package](https://npmjs.org/package/xen-api):
```
> npm install --save xen-api
```
## Usage
### Library
```javascript
const { createClient } = require('xen-api')
const xapi = createClient({
url: 'https://xen1.company.net',
allowUnauthorized: false,
auth: {
user: 'root',
password: 'important secret password'
},
readOnly: false
})
```
Options:
- `url`: address of a host in the pool we are trying to connect to
- `allowUnauthorized`: whether to accept self-signed certificates
- `auth`: credentials used to sign in (can also be specified in the URL)
- `readOnly = false`: if true, no methods with side-effects can be called
```js
// Force connection.
xapi.connect().catch(error => {
console.error(error)
})
// Watch objects.
xapi.objects.on('add', objects => {
console.log('new objects:', objects)
})
```
> Note: all objects are frozen and cannot be altered!
Custom fields on objects (hidden ie. non enumerable):
- `$type`: the type of the object (`VM`, `task`, …);
- `$ref`: the (opaque) reference of the object;
- `$id`: the identifier of this object (its UUID if any, otherwise its reference);
- `$pool`: the pool object this object belongs to.
Furthermore, any field containing a reference (or references if an
array) can be resolved by prepending the field name with a `$`:
```javascript
console.log(xapi.pool.$master.$resident_VMs[0].name_label)
// vm1
```
### CLI
A CLI is provided to help exploration and discovery of the XAPI.
```
> xen-api https://xen1.company.net root
Password: ******
root@xen1.company.net> xapi.status
'connected'
root@xen1.company.net> xapi.pool.master
'OpaqueRef:ec7c5147-8aee-990f-c70b-0de916a8e993'
root@xen1.company.net> xapi.pool.$master.name_label
'xen1'
```
To ease searches, `find()` and `findAll()` functions are available:
```
root@xen1.company.net> findAll({ $type: 'vm' }).length
183
```
## Development
```
# Install dependencies
> npm install
# Run the tests
> npm test
# Continuously compile
> npm run dev
# Continuously run the tests
> npm run dev-test
# Build for production (automatically called by npm install)
> npm run build
```
## Contributions
Contributions are *very* welcomed, either on the documentation or on
the code.
You may:
- report any [issue](https://github.com/xen-api/issues)
you've encountered;
- fork and create a pull request.
## License
ISC © [Julien Fontanet](https://github.com/julien-f)

View File

@@ -0,0 +1,53 @@
#!/usr/bin/env node
process.env.DEBUG = '*'
const defer = require('golike-defer').default
const pump = require('pump')
const { CancelToken, fromCallback } = require('promise-toolbox')
const { createClient } = require('../')
const { createOutputStream, resolveRef } = require('./utils')
defer(async ($defer, args) => {
let raw = false
if (args[0] === '--raw') {
raw = true
args.shift()
}
if (args.length < 2) {
return console.log('Usage: export-vdi [--raw] <XS URL> <VDI identifier> [<VHD file>]')
}
const xapi = createClient({
allowUnauthorized: true,
url: args[0],
watchEvents: false
})
await xapi.connect()
$defer(() => xapi.disconnect())
const { cancel, token } = CancelToken.source()
process.on('SIGINT', cancel)
// https://xapi-project.github.io/xen-api/snapshots.html#downloading-a-disk-or-snapshot
const exportStream = await xapi.getResource(token, '/export_raw_vdi/', {
query: {
format: raw ? 'raw' : 'vhd',
vdi: await resolveRef(xapi, 'VDI', args[1])
}
})
console.warn('Export task:', exportStream.headers['task-id'])
await fromCallback(cb => pump(
exportStream,
createOutputStream(args[2]),
cb
))
})(process.argv.slice(2)).catch(
console.error.bind(console, 'error')
)

View File

@@ -0,0 +1,47 @@
#!/usr/bin/env node
process.env.DEBUG = '*'
const defer = require('golike-defer').default
const pump = require('pump')
const { CancelToken, fromCallback } = require('promise-toolbox')
const { createClient } = require('../')
const { createOutputStream, resolveRef } = require('./utils')
defer(async ($defer, args) => {
if (args.length < 2) {
return console.log('Usage: export-vm <XS URL> <VM identifier> [<XVA file>]')
}
const xapi = createClient({
allowUnauthorized: true,
url: args[0],
watchEvents: false
})
await xapi.connect()
$defer(() => xapi.disconnect())
const { cancel, token } = CancelToken.source()
process.on('SIGINT', cancel)
// https://xapi-project.github.io/xen-api/importexport.html
const exportStream = await xapi.getResource(token, '/export/', {
query: {
ref: await resolveRef(xapi, 'VM', args[1]),
use_compression: 'true'
}
})
console.warn('Export task:', exportStream.headers['task-id'])
await fromCallback(cb => pump(
exportStream,
createOutputStream(args[2]),
cb
))
})(process.argv.slice(2)).catch(
console.error.bind(console, 'error')
)

View File

@@ -0,0 +1,44 @@
#!/usr/bin/env node
process.env.DEBUG = '*'
const defer = require('golike-defer').default
const { CancelToken } = require('promise-toolbox')
const { createClient } = require('../')
const { createInputStream, resolveRef } = require('./utils')
defer(async ($defer, args) => {
let raw = false
if (args[0] === '--raw') {
raw = true
args.shift()
}
if (args.length < 2) {
return console.log('Usage: import-vdi [--raw] <XS URL> <VDI identifier> [<VHD file>]')
}
const xapi = createClient({
allowUnauthorized: true,
url: args[0],
watchEvents: false
})
await xapi.connect()
$defer(() => xapi.disconnect())
const { cancel, token } = CancelToken.source()
process.on('SIGINT', cancel)
// https://xapi-project.github.io/xen-api/snapshots.html#uploading-a-disk-or-snapshot
await xapi.putResource(token, createInputStream(args[2]), '/import_raw_vdi/', {
query: {
format: raw ? 'raw' : 'vhd',
vdi: await resolveRef(xapi, 'VDI', args[1])
}
})
})(process.argv.slice(2)).catch(
console.error.bind(console, 'error')
)

View File

@@ -0,0 +1,35 @@
#!/usr/bin/env node
process.env.DEBUG = '*'
const defer = require('golike-defer').default
const { CancelToken } = require('promise-toolbox')
const { createClient } = require('../')
const { createInputStream, resolveRef } = require('./utils')
defer(async ($defer, args) => {
if (args.length < 1) {
return console.log('Usage: import-vm <XS URL> [<XVA file>] [<SR identifier>]')
}
const xapi = createClient({
allowUnauthorized: true,
url: args[0],
watchEvents: false
})
await xapi.connect()
$defer(() => xapi.disconnect())
const { cancel, token } = CancelToken.source()
process.on('SIGINT', cancel)
// https://xapi-project.github.io/xen-api/importexport.html
await xapi.putResource(token, createInputStream(args[1]), '/import/', {
query: args[2] && { sr_id: await resolveRef(xapi, 'SR', args[2]) }
})
})(process.argv.slice(2)).catch(
console.error.bind(console, 'error')
)

View File

@@ -0,0 +1,57 @@
#!/usr/bin/env node
require('source-map-support').install()
const { forEach, size } = require('lodash')
const { createClient } = require('../')
// ===================================================================
if (process.argv.length < 3) {
return console.log('Usage: log-events <XS URL>')
}
// ===================================================================
// Creation
const xapi = createClient({
allowUnauthorized: true,
url: process.argv[2]
})
// ===================================================================
// Method call
xapi.connect().then(() => {
xapi.call('VM.get_all_records')
.then(function (vms) {
console.log('%s VMs fetched', size(vms))
})
.catch(function (error) {
console.error(error)
})
})
// ===================================================================
// Objects
const objects = xapi.objects
objects.on('add', objects => {
forEach(objects, object => {
console.log('+ %s: %s', object.$type, object.$id)
})
})
objects.on('update', objects => {
forEach(objects, object => {
console.log('± %s: %s', object.$type, object.$id)
})
})
objects.on('remove', objects => {
forEach(objects, (value, id) => {
console.log('- %s', id)
})
})

View File

@@ -0,0 +1,6 @@
{
"dependencies": {
"golike-defer": "^0.4.1",
"pump": "^3.0.0"
}
}

View File

@@ -0,0 +1,43 @@
const { createReadStream, createWriteStream, statSync } = require('fs')
const { PassThrough } = require('stream')
const { isOpaqueRef } = require('../')
exports.createInputStream = path => {
if (path === undefined || path === '-') {
return process.stdin
}
const { size } = statSync(path)
const stream = createReadStream(path)
stream.length = size
return stream
}
exports.createOutputStream = path => {
if (path !== undefined && path !== '-') {
return createWriteStream(path)
}
// introduce a through stream because stdout is not a normal stream!
const stream = new PassThrough()
stream.pipe(process.stdout)
return stream
}
exports.resolveRef = (xapi, type, refOrUuidOrNameLabel) =>
isOpaqueRef(refOrUuidOrNameLabel)
? refOrUuidOrNameLabel
: xapi.call(`${type}.get_by_uuid`, refOrUuidOrNameLabel).catch(() =>
xapi
.call(`${type}.get_by_name_label`, refOrUuidOrNameLabel)
.then(refs => {
if (refs.length === 1) {
return refs[0]
}
throw new Error(
`no single match for ${type} with name label ${refOrUuidOrNameLabel}`
)
})
)

View File

@@ -0,0 +1,30 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
end-of-stream@^1.1.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43"
dependencies:
once "^1.4.0"
golike-defer@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/golike-defer/-/golike-defer-0.4.1.tgz#7a1cd435d61e461305805d980b133a0f3db4e1cc"
once@^1.3.1, once@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"

View File

@@ -0,0 +1,4 @@
set yrange [ 0 : ]
set grid
plot for [i=2:4] "plot.dat" using 1:i with lines

View File

@@ -0,0 +1,89 @@
{
"name": "xen-api",
"version": "0.16.11",
"license": "ISC",
"description": "Connector to the Xen API",
"keywords": [
"xen",
"api",
"xen-api",
"xenapi",
"xapi"
],
"homepage": "https://github.com/vatesfr/xen-orchestra/tree/master/packages/xen-api",
"bugs": "https://github.com/vatesfr/xen-orchestra/issues",
"repository": {
"type": "git",
"url": "https://github.com/vatesfr/xen-orchestra.git"
},
"author": {
"name": "Julien Fontanet",
"email": "julien.fontanet@vates.fr"
},
"preferGlobal": false,
"main": "dist/",
"bin": {
"xen-api": "dist/cli.js"
},
"files": [
"dist/"
],
"engines": {
"node": ">=4"
},
"dependencies": {
"babel-polyfill": "^6.23.0",
"blocked": "^1.2.1",
"debug": "^3.1.0",
"event-to-promise": "^0.8.0",
"exec-promise": "^0.7.0",
"http-request-plus": "^0.5.0",
"iterable-backoff": "^0.0.0",
"json-rpc-protocol": "^0.11.2",
"kindof": "^2.0.0",
"lodash": "^4.17.4",
"make-error": "^1.3.0",
"minimist": "^1.2.0",
"ms": "^2.1.1",
"promise-toolbox": "^0.9.5",
"pw": "0.0.4",
"xmlrpc": "^1.3.2",
"xo-collection": "^0.4.1"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-plugin-lodash": "^3.3.2",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-function-bind": "^6.22.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.1.3",
"rimraf": "^2.6.1"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel --source-maps --out-dir=dist/ src/",
"dev": "cross-env NODE_ENV=development babel --watch --source-maps --out-dir=dist/ src/",
"plot": "gnuplot -p memory-test.gnu",
"prebuild": "rimraf dist/",
"predev": "yarn run prebuild",
"prepublishOnly": "yarn run build"
},
"babel": {
"plugins": [
"lodash",
"transform-decorators-legacy",
"transform-function-bind"
],
"presets": [
[
"env",
{
"targets": {
"node": 4
}
}
],
"stage-3"
]
}
}

106
packages/xen-api/src/cli.js Executable file
View File

@@ -0,0 +1,106 @@
#!/usr/bin/env node
import 'babel-polyfill'
import blocked from 'blocked'
import createDebug from 'debug'
import eventToPromise from 'event-to-promise'
import execPromise from 'exec-promise'
import minimist from 'minimist'
import pw from 'pw'
import { asCallback, fromCallback } from 'promise-toolbox'
import { filter, find, isArray } from 'lodash'
import { start as createRepl } from 'repl'
import { createClient } from './'
// ===================================================================
function askPassword (prompt = 'Password: ') {
if (prompt) {
process.stdout.write(prompt)
}
return new Promise(resolve => {
pw(resolve)
})
}
// ===================================================================
const usage = 'Usage: xen-api <url> [<user> [<password>]]'
const main = async args => {
const opts = minimist(args, {
boolean: ['allow-unauthorized', 'help', 'read-only', 'verbose'],
alias: {
'allow-unauthorized': 'au',
debounce: 'd',
help: 'h',
'read-only': 'ro',
verbose: 'v',
},
})
if (opts.help) {
return usage
}
if (opts.verbose) {
// Does not work perfectly.
//
// https://github.com/visionmedia/debug/pull/156
createDebug.enable('xen-api,xen-api:*')
}
let auth
if (opts._.length > 1) {
const [, user, password = await askPassword()] = opts._
auth = { user, password }
}
{
const debug = createDebug('xen-api:perf')
blocked(ms => {
debug('blocked for %sms', ms | 0)
})
}
const xapi = createClient({
url: opts._[0],
allowUnauthorized: opts.au,
auth,
debounce: opts.debounce != null ? +opts.debounce : null,
readOnly: opts.ro,
})
await xapi.connect()
const repl = createRepl({
prompt: `${xapi._humanId}> `,
})
repl.context.xapi = xapi
repl.context.find = predicate => find(xapi.objects.all, predicate)
repl.context.findAll = predicate => filter(xapi.objects.all, predicate)
// Make the REPL waits for promise completion.
repl.eval = (evaluate => (cmd, context, filename, cb) => {
;fromCallback(cb => {
evaluate.call(repl, cmd, context, filename, cb)
})
.then(value => (isArray(value) ? Promise.all(value) : value))
::asCallback(cb)
})(repl.eval)
await eventToPromise(repl, 'exit')
try {
await xapi.disconnect()
} catch (error) {}
}
export default main
if (!module.parent) {
execPromise(main)
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env node
import { delay as pDelay } from 'promise-toolbox'
import { createClient } from './'
const xapi = (() => {
const [, , url, user, password] = process.argv
return createClient({
auth: { user, password },
url,
watchEvents: false,
})
})()
xapi
.connect()
// Get the pool record's ref.
.then(() => xapi.call('pool.get_all'))
// Injects lots of events.
.then(([poolRef]) => {
const loop = () =>
xapi
.call('event.inject', 'pool', poolRef)
::pDelay(10) // A small delay is required to avoid overloading the Xen API.
.then(loop)
return loop()
})

View File

@@ -0,0 +1,22 @@
#!/usr/bin/env node
import { createClient } from './'
let i = 0
setInterval(() => {
const usage = process.memoryUsage()
console.log(
'%s %s %s %s',
i++,
Math.round(usage.rss / 1e6),
Math.round(usage.heapTotal / 1e6),
Math.round(usage.heapUsed / 1e6)
)
}, 1e2)
const [, , url, user, password] = process.argv
createClient({
auth: { user, password },
readOnly: true,
url,
}).connect()

View File

@@ -0,0 +1,3 @@
import makeError from 'make-error'
export const UnsupportedTransport = makeError('UnsupportedTransport')

View File

@@ -0,0 +1,36 @@
import jsonRpc from './json-rpc'
import xmlRpc from './xml-rpc'
import xmlRpcJson from './xml-rpc-json'
import { UnsupportedTransport } from './_utils'
const factories = [jsonRpc, xmlRpcJson, xmlRpc]
const { length } = factories
export default opts => {
let i = 0
let call
function create () {
const current = factories[i++](opts)
if (i < length) {
const currentI = i
call = (method, args) =>
current(method, args).catch(error => {
if (error instanceof UnsupportedTransport) {
if (currentI === i) {
// not changed yet
create()
}
return call(method, args)
}
throw error
})
} else {
call = current
}
}
create()
return (method, args) => call(method, args)
}

View File

@@ -0,0 +1,43 @@
import httpRequestPlus from 'http-request-plus'
import { format, parse } from 'json-rpc-protocol'
import { UnsupportedTransport } from './_utils'
export default ({ allowUnauthorized, url }) => {
return (method, args) =>
httpRequestPlus
.post(url, {
rejectUnauthorized: !allowUnauthorized,
body: format.request(0, method, args),
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
path: '/jsonrpc',
})
.readAll('utf8')
.then(
text => {
let response
try {
response = parse(text)
} catch (error) {
throw new UnsupportedTransport()
}
if (response.type === 'response') {
return response.result
}
throw response.error
},
error => {
if (error.response !== undefined) {
// HTTP error
throw new UnsupportedTransport()
}
throw error
}
)
}

View File

@@ -0,0 +1,87 @@
import { createClient, createSecureClient } from 'xmlrpc'
import { promisify } from 'promise-toolbox'
import { UnsupportedTransport } from './_utils'
const logError = error => {
if (error.res) {
console.error(
'XML-RPC Error: %s (response status %s)',
error.message,
error.res.statusCode
)
console.error('%s', error.body)
}
throw error
}
const SPECIAL_CHARS = {
'\r': '\\r',
'\t': '\\t',
}
const SPECIAL_CHARS_RE = new RegExp(Object.keys(SPECIAL_CHARS).join('|'), 'g')
const parseResult = result => {
const status = result.Status
// Return the plain result if it does not have a valid XAPI
// format.
if (status === undefined) {
return result
}
if (status !== 'Success') {
throw result.ErrorDescription
}
const value = result.Value
// XAPI returns an empty string (invalid JSON) for an empty
// result.
if (value === '') {
return ''
}
try {
return JSON.parse(value)
} catch (error) {
// XAPI JSON sometimes contains invalid characters.
if (!(error instanceof SyntaxError)) {
throw error
}
}
let replaced = false
const fixedValue = value.replace(SPECIAL_CHARS_RE, match => {
replaced = true
return SPECIAL_CHARS[match]
})
if (replaced) {
try {
return JSON.parse(fixedValue)
} catch (error) {
if (!(error instanceof SyntaxError)) {
throw error
}
}
}
throw new UnsupportedTransport()
}
export default ({
allowUnauthorized,
url: { hostname, path, port, protocol },
}) => {
const client = (protocol === 'https:' ? createSecureClient : createClient)({
host: hostname,
path: '/json',
port,
rejectUnauthorized: !allowUnauthorized,
})
const call = promisify(client.methodCall, client)
return (method, args) => call(method, args).then(parseResult, logError)
}

View File

@@ -0,0 +1,45 @@
import { createClient, createSecureClient } from 'xmlrpc'
import { promisify } from 'promise-toolbox'
const logError = error => {
if (error.res) {
console.error(
'XML-RPC Error: %s (response status %s)',
error.message,
error.res.statusCode
)
console.error('%s', error.body)
}
throw error
}
const parseResult = result => {
const status = result.Status
// Return the plain result if it does not have a valid XAPI
// format.
if (status === undefined) {
return result
}
if (status !== 'Success') {
throw result.ErrorDescription
}
return result.Value
}
export default ({
allowUnauthorized,
url: { hostname, path, port, protocol },
}) => {
const client = (protocol === 'https:' ? createSecureClient : createClient)({
host: hostname,
port,
rejectUnauthorized: !allowUnauthorized,
})
const call = promisify(client.methodCall, client)
return (method, args) => call(method, args).then(parseResult, logError)
}

Some files were not shown because too many files have changed in this diff Show More