feat(xen-api/cli): add proxy support

This commit is contained in:
Julien Fontanet 2022-04-25 16:27:17 +02:00
parent bbf3dae37f
commit 4fb34ffee9
2 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,7 @@
- @vates/cached-dns.lookup major - @vates/cached-dns.lookup major
- @vates/event-listeners-manager major - @vates/event-listeners-manager major
- xen-api patch - xen-api minor
- xo-vmdk-to-vhd minor - xo-vmdk-to-vhd minor
- @xen-orchestra/proxy patch - @xen-orchestra/proxy patch
- xo-server minor - xo-server minor

View File

@ -44,13 +44,14 @@ const usage = 'Usage: xen-api <url> [<user> [<password>]]'
async function main(createClient) { async function main(createClient) {
const opts = minimist(process.argv.slice(2), { const opts = minimist(process.argv.slice(2), {
string: ['session-id'], string: ['proxy', 'session-id'],
boolean: ['allow-unauthorized', 'help', 'read-only', 'verbose'], boolean: ['allow-unauthorized', 'help', 'read-only', 'verbose'],
alias: { alias: {
'allow-unauthorized': 'au', 'allow-unauthorized': 'au',
debounce: 'd', debounce: 'd',
help: 'h', help: 'h',
proxy: 'p',
'read-only': 'ro', 'read-only': 'ro',
verbose: 'v', verbose: 'v',
}, },
@ -87,6 +88,7 @@ async function main(createClient) {
allowUnauthorized: opts.au, allowUnauthorized: opts.au,
auth, auth,
debounce: opts.debounce != null ? +opts.debounce : null, debounce: opts.debounce != null ? +opts.debounce : null,
httpProxy: opts.proxy,
readOnly: opts.ro, readOnly: opts.ro,
syncStackTraces: true, syncStackTraces: true,
}) })