mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
parent
01585cbf31
commit
55adb8c64c
@ -228,10 +228,15 @@ const addPrependCommand = (command = '', resource = '') => {
|
||||
let newRsc = rsc
|
||||
|
||||
if (prependCommand) {
|
||||
let splitPrepend = prependCommand.split(' ')
|
||||
const splitPrepend = prependCommand.split(' ').filter(el => el !== '')
|
||||
newCommand = splitPrepend[0]
|
||||
splitPrepend = splitPrepend.splice(1)
|
||||
newRsc = [...splitPrepend, command, ...rsc].filter(el => el !== '')
|
||||
// remove command
|
||||
splitPrepend.shift()
|
||||
|
||||
// stringify the rest of the parameters
|
||||
const stringifyRestCommand = [command, ...rsc].join(' ')
|
||||
|
||||
newRsc = [...splitPrepend, stringifyRestCommand]
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -571,6 +571,16 @@ const configureProvision = (res = {}, next = () => undefined, params = {}, userD
|
||||
const command = 'configure'
|
||||
const endpoint = getEndpoint()
|
||||
const authCommand = ['--user', user, '--password', password]
|
||||
const paramsCommand = [command, params.id, '--debug', '--json', '--fail_cleanup', '--batch', '--force', ...authCommand, ...endpoint]
|
||||
let lastLine = ''
|
||||
const uuid = v4()
|
||||
const emit = message => {
|
||||
message.toString().split(/\r|\n/).map(line => {
|
||||
if (line) {
|
||||
lastLine = line
|
||||
publish(defaultCommandProvision, { id: params.id, data: lastLine, command: command, commandId: uuid })
|
||||
}
|
||||
})
|
||||
const paramsCommand = [command, params.id, '--debug', '--json', '--force', '--fail_cleanup', '--batch', ...authCommand, ...endpoint]
|
||||
|
||||
// get Log file
|
||||
|
Loading…
x
Reference in New Issue
Block a user