feat(xen-api/cli): allow specifying transport

This commit is contained in:
Julien Fontanet
2023-06-22 11:02:15 +02:00
parent f256610e08
commit a62ae43274

View File

@@ -44,7 +44,7 @@ const usage = 'Usage: xen-api <url> [<user> [<password>]]'
async function main(createClient) {
const opts = minimist(process.argv.slice(2), {
string: ['proxy', 'session-id'],
string: ['proxy', 'session-id', 'transport'],
boolean: ['allow-unauthorized', 'help', 'read-only', 'verbose'],
alias: {
@@ -54,6 +54,7 @@ async function main(createClient) {
proxy: 'p',
'read-only': 'ro',
verbose: 'v',
transport: 't',
},
})
@@ -91,6 +92,7 @@ async function main(createClient) {
httpProxy: opts.proxy,
readOnly: opts.ro,
syncStackTraces: true,
transport: opts.transport || undefined,
})
await xapi.connect()