Commit Graph
100 Commits
Author SHA1 Message Date
Julien Fontanet cc4ab94428 chore: reformat with Prettier 2018-12-11 10:45:00 +01:00
Julien Fontanet cc26e378e5 chore(fs/{createOutputStream,outputFile}): move dir logic in abstract 2018-12-07 17:12:12 +01:00
Julien Fontanet 28579258b3 feat(docs/sources): add git checkout before pull
Related to #3764.
2018-12-07 14:54:26 +01:00
Julien Fontanet 70b9b67f67 chore(fs/test): add TEST_DATA_LEN constant 2018-12-07 11:14:02 +01:00
Julien Fontanet 224b053eb1 chore(fs/test): test read() 2018-12-07 11:12:00 +01:00
Julien Fontanet 39bce978bc chore(fs/test): testWithFileDescriptor helper 2018-12-07 10:57:14 +01:00
Julien Fontanet 9435bd5493 chore(fs#openFile): flags are not optional 2018-12-07 10:45:56 +01:00
Julien Fontanet 99dc64e8bb fix: occured → occurred (2) 2018-12-06 18:53:35 +01:00
Julien Fontanet e47525b60b chore(fs/test): test list prependDir option 2018-12-06 18:53:09 +01:00
Julien Fontanet 10d4782ee2 feat(fs/mk{dir,tree}): new methods to create dirs (#3763) 2018-12-06 18:50:39 +01:00
Julien Fontanet 11cff2c065 feat(fs): prefix get/set → addPrefix method (#3766)
This method returns a new object which will transparently prefix all paths.

It is better than previous API because:

- the same handler can be reused and will not be invalidated when changing the prefix
- Abstract and implementations can call high-level methods without worrying about doubling the prefix
2018-12-06 17:22:37 +01:00
Julien Fontanet 11f742b020 fix: occured → occurred 2018-12-06 17:18:08 +01:00
Julien Fontanet 2353552e11 chore(fs/abstract): use path.posix
All paths in this lib are Posix paths and should be treated as such, even on Windows.
2018-12-06 13:59:51 +01:00
Julien Fontanet 7089ee778a fix(xo-server/migrateLegacyBackupJob): dont migrate when ids contain : 2018-12-05 17:49:07 +01:00
Julien Fontanet 629931782e feat(fs/{rmdir,unlink}): dont throw on missing entries 2018-12-05 17:20:51 +01:00
Julien Fontanet 1b48c626f4 fix(fs/smb): create{Read,Output}Stream and getSize with opened files 2018-12-05 16:31:38 +01:00
Julien Fontanet ba35f51459 chore(fs/test): test createOutputStream 2018-12-05 16:31:38 +01:00
Julien Fontanet ee5f3fc68d chore(fs/test): test createReadStream and getSize on opened files 2018-12-05 16:31:39 +01:00
Julien Fontanet 7be671f0f7 chore(fs/test): ensure test dir exists 2018-12-05 16:26:38 +01:00
Julien Fontanet 48c3748c28 feat(fs/abstract#rmdir): implement timeout 2018-12-05 15:37:21 +01:00
Julien Fontanet 3814a261d6 fix(fs/abstract#kResolve): edge case with / path 2018-12-05 15:35:24 +01:00
Julien Fontanet 81b82ce06b fix(fs/smb#_rmdir): error code on non-empty dir 2018-12-05 15:35:24 +01:00
Julien Fontanet 20c3f76278 feat(fs): split rmdir into rmdir and rmtree 2018-12-05 15:35:17 +01:00
Julien Fontanet 2c93b69144 chore(fs): simplify sync/forget
- These methods are now optional
- sync no longer returns anything
2018-12-05 14:39:12 +01:00
Julien Fontanet 043b381733 chore(fs/abstract#list): remove default value 2018-12-05 14:30:55 +01:00
Julien Fontanet ff014df231 chore(fs): remove unnecessary default params 2018-12-05 14:29:35 +01:00
Julien Fontanet 055d1e81da chore(fs): sort methods 2018-12-05 14:27:20 +01:00
Julien Fontanet b60678e79f fix(fs/abstract#test): resolve path 2018-12-05 14:06:53 +01:00
Julien Fontanet fd93dfbc18 feat(fs): prefix support (#3759)
It is a prefix that will be used as root for all other paths.
2018-12-05 13:51:38 +01:00
Julien Fontanet d74a5d73f0 chore(fs/abstract#test): Buffer#compare → Buffer#equals 2018-12-05 13:49:33 +01:00
Julien Fontanet 16a6d395c8 chore(fs/abstract): only call low-level methods 2018-12-05 13:48:42 +01:00
Julien Fontanet e25ff221ba fix(fs/abstract#_outputFile): missing callback 2018-12-05 11:05:01 +01:00
Julien Fontanet 7df965ccd7 chore(fs): remove unnecessary tests 2018-12-05 11:00:55 +01:00
Julien Fontanet f6b73b8303 chore(fs/abstract#_outputFile): use readable-stream/finished 2018-12-05 11:00:12 +01:00
Julien Fontanet d617214c62 chore: update dependencies 2018-12-05 10:39:38 +01:00
Julien Fontanet e85744cec0 chore(fs/smb): preserve stack on wrapped errors 2018-12-05 10:27:13 +01:00
Julien Fontanet da74555e02 feat(xo-remote-parser/smb): handle missing path 2018-12-04 17:48:38 +01:00
Julien Fontanet 3967bfa099 chore(xo-server/config/remoteOptions.timeout): add comment 2018-12-03 17:50:34 +01:00
Julien Fontanet 8569dbf985 chore: String#substring() → String#slice()
- homogeneity
- [faster in v8](https://bugs.chromium.org/p/v8/issues/detail?id=6730)
2018-12-03 14:59:59 +01:00
Julien Fontanet 9a03a70a3d fix(ESLint): disable react/jsx-indent rule 2018-12-03 14:59:48 +01:00
Julien Fontanet 42badbb08e fix(lint-staged): ESLint should not format 2018-12-03 14:54:41 +01:00
Julien Fontanet 956bdf0e03 feat(fs/smb#_writeFile): support flags 2018-12-03 14:39:24 +01:00
Julien Fontanet 91ff02d5c3 fix(fs/smb): always normalize errors 2018-12-03 14:38:51 +01:00
Julien Fontanet 84d88cf2b9 fix(fs/local#_{output,read}File): correctly handle flags 2018-12-03 14:35:52 +01:00
Julien Fontanet fca2693730 feat(fs/{output,read}File): only support flags option 2018-12-03 14:35:17 +01:00
Julien Fontanet d7ac1b9659 feat(fs/smb): implement rmdir 2018-12-03 13:11:31 +01:00
Julien Fontanet ddb1a8ff51 fix(fs/smb): ensure connection is always closed (#3733) 2018-12-03 11:41:27 +01:00
Julien Fontanet 75592023f2 fix(xo-server/file restore): correctly use _getFilePath
Fixes #3739
2018-11-30 08:24:52 +01:00
Julien Fontanet 89df4f771b fix(fs/local#_rmdir): correctly prefix path 2018-11-29 15:35:58 +01:00
Julien Fontanet 5271a5c984 chore(xo-web/addSubscriptions): dont use deprecated componentWillMount (#3734) 2018-11-29 11:17:46 +01:00
Julien Fontanet e69610643b feat(xo-server/xosan): use XOSAN as VM tag (#3735)
It previously was `XOSAN-${pool.name_label}` which is unnecessary, not easy to use for filtering and problematic for #2128.
2018-11-28 22:27:45 +01:00
Julien Fontanet ef61e4fe6d chore(xo-server/api/xosan): reformat code 2018-11-28 22:10:12 +01:00
Julien Fontanet 4f776e1370 chore(fs): normalize paths in Abstract (#3732) 2018-11-28 21:44:49 +01:00
Julien Fontanet aa72708996 chore: reformat some files 2018-11-28 19:10:51 +01:00
Julien Fontanet 2e327be49d chore(xo-web): reformat some files 2018-11-28 17:40:56 +01:00
Julien Fontanet e65b3200cd chore(fs): fix some Flow types 2018-11-28 13:39:38 +01:00
Julien Fontanet 30d3701ab1 chore(fs): reformat code 2018-11-28 13:34:12 +01:00
Julien Fontanet 4020081492 feat(xo-server/api): use per message deflate (#3720)
Related to #3699
2018-11-27 17:51:26 +01:00
Julien Fontanet b773f5e821 fix(xo-server/xen-servers): pool.id → pool.$id (#3723)
Correctly unregister a Xapi connection from its pool.
2018-11-27 10:24:52 +01:00
Julien Fontanet 76c5ced1dd Update xen-servers.js 2018-11-27 10:23:46 +01:00
Julien Fontanet ac46d3a5a2 chore: update dependencies
Fixes #3722
2018-11-27 09:26:39 +01:00
Julien Fontanet 2da576a1f8 fix(xo-web): avoid using TextDecoder (#3718)
This is an experimental API and not really necessary here.
2018-11-23 16:54:50 +01:00
Julien Fontanet 2e1ac27cf5 chore: dont format with ESLint 2018-11-23 16:38:24 +01:00
Julien Fontanet 258404affc fix(xo-web/settings/remotes): dont wait for test on create/edit 2018-11-23 16:03:00 +01:00
Julien Fontanet dd50fc37fe feat(xen-api): callTimeout option (#3707) 2018-11-20 10:12:58 +01:00
Julien Fontanet 11a0fc2a22 chore: update dependencies 2018-11-19 16:09:55 +01:00
Julien Fontanet 2946eaa156 feat(xo-server): 5.30.1 2018-11-16 18:11:39 +01:00
Julien Fontanet 6dcae9a7d7 fix(xo-server/deleteVm): pass array to Promise.all 2018-11-16 18:10:47 +01:00
Julien Fontanet 9dfd81c28f feat(xo-web/subscriptions): keep cached data for 10m (#3701)
Related to #3699

This should improve user experience when changing pages.
2018-11-16 17:37:33 +01:00
Julien Fontanet 4c0fe3c14f fix(xo-server/importVdiContent): only throws when compiled with yarn dev
Related to #3678
2018-11-16 14:19:34 +01:00
Julien Fontanet 2934b23d2f fix(xo-server/vm.delete): fix template handling (#3695)
Fixes #3498

It seems a recent version of XenServer forbids from destroying VM templates directly, we need to set `is_a_template` to `false` before calling `VM.destroy`.
2018-11-16 11:04:56 +01:00
Julien Fontanet 82e4197237 fix(xo-web/deleteVm): dont ask to force if error (#3696) 2018-11-16 10:39:09 +01:00
Julien Fontanet a23189f132 fix(xo-server): update VM object when {,guest_}metrics have changed (#3694)
Fixes #3533
2018-11-16 10:32:13 +01:00
Julien Fontanet 47fa1ec81e fix(xo-web/settings/remotes): missing form id (#3697) 2018-11-16 09:35:14 +01:00
Julien Fontanet 4b468663f3 feat(xo-server): ability to set XAPI options in config (#3692) 2018-11-15 16:00:52 +01:00
Julien Fontanet 3ef3ae0166 fix(xo-server/remote.get{,All}): obfuscate sensitive values (#3687)
Fixes #3682
2018-11-14 14:39:20 +01:00
Julien Fontanet bc6dbe2771 chore(xen-api/README): add 7.{4..6} compatibility 2018-11-14 14:18:14 +01:00
Julien Fontanet 6da2669c6f fix(fs/smb#list): throws ENOTDIR instead of SMB error (#3685)
Fixes support#1014

This is more in line of other handlers and fix an issue in Backup NG where listing VM backups would fail when there are files in `xo-vm-backups/`.
2018-11-14 10:11:52 +01:00
Julien Fontanet 8094b5097f feat(xo-server/reaclette-utils/generateId): used as a computed for generated ID (#3680) 2018-11-13 22:58:37 +01:00
Julien Fontanet b4cbd8b2b5 chore(fs): ignore enabled option
It makes no sense for this library to handled disabled remote.
2018-11-13 15:59:16 +01:00
Julien Fontanet f8fbb6b7d3 feat(xen-api): add call params to errors (#3679)
It also moves `.method` to `.call.method`, but it appears it was not currently used in our code.
2018-11-13 12:03:05 +01:00
Julien Fontanet c8da9fec0a chore: minor Flow fixes 2018-11-13 11:24:23 +01:00
Julien Fontanet 79fb3ec8bd fix(xo-server/plugin.get): hide sensitive config values (#3671) 2018-11-13 11:09:58 +01:00
Julien Fontanet 2243966ce1 feat(xo-server/checkPermissions): similar to hasPermissions but throws 2018-11-13 10:46:38 +01:00
Julien Fontanet ca7d520997 feat(xo-acl-resolver/assert): throw error if unauthorized 2018-11-13 10:46:38 +01:00
Julien Fontanet df44487363 chore(xo-web/backup-ng/log): disable bug reporting
Temporary measure because it is currently broken due to the size of the log in the HTTP request.
2018-11-13 10:13:20 +01:00
Julien Fontanet b39eb0f60d chore(xo-server/api): add expected permission to unauthorized error 2018-11-12 17:34:15 +01:00
Julien Fontanet 2daac73c17 chore(xo-common/api-errors/unauthorized): add metadata
```ts
let data: {
  permission?: string,
  object: {
    id?: string,
    type?: string,
  },
}
```
2018-11-12 15:30:28 +01:00
Julien Fontanet 23eb3c3094 chore(xo-server/resourceSet.get{,All}): explicit permission check 2018-11-12 15:25:51 +01:00
Julien Fontanet 776d0f9e4a chore(xo-server/ipPool.getAll): explicit permission check 2018-11-12 15:25:51 +01:00
Julien Fontanet 38084c8199 chore(xo-common/api-errors/unauthorized): remove "unauthorized" in message
It confuses users and the message is still relevant without in case of unauthorized users.
2018-11-12 13:50:33 +01:00
Julien Fontanet d49294849f chore(xo-server/vm.import): remove host parameter (#3663) 2018-11-08 16:30:50 +01:00
Julien Fontanet 00e1601f85 chore(xo-server): use VM.domain_type when available (#3664)
And fallback to our previous detection when unavailable.

Starting from this commit, `virtualizationMode` will no longer contain `'pvhvm'`, this must be computed UI side by using both `virtualizationMode` and `xenTools` properties.
2018-11-08 14:37:47 +01:00
Julien Fontanet 1701e1d4ba feat(xo-server/_importVdiContent): require length in dev mode 2018-11-08 10:45:11 +01:00
Julien Fontanet 497b3eb296 feat(xo-server/disk.import): extract length from header 2018-11-08 10:44:35 +01:00
Julien Fontanet ecfafa0fea chore: npm → yarn 2018-11-07 22:24:46 +01:00
Julien Fontanet def66d8218 chore(xapi-explore-sr): remove Jest config/scripts 2018-11-07 22:23:17 +01:00
Julien Fontanet eeb08abec2 chore(xapi-explore-sr): use Babel 7 2018-11-07 22:18:58 +01:00
Julien Fontanet 90923c657d chore: re-format code 2018-11-07 18:37:23 +01:00
Julien Fontanet 4ff6eeb424 chore: update dependencies 2018-11-07 18:15:57 +01:00