create SHUB account
This commit is contained in:
parent
2653e8547e
commit
b3ca00aafe
|
@ -171,12 +171,44 @@
|
|||
"inputParameters" : {
|
||||
"url" : "${init.input.storagehub}/workspace",
|
||||
"method" : "GET",
|
||||
"expect" : [200, 406],
|
||||
"headers" : {
|
||||
"Accept" : "application/json",
|
||||
"Authorization" : "Bearer ${authorize_with_uma_rpt.output.body.access_token}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "decision",
|
||||
"taskReferenceName": "check_workspace_existance",
|
||||
"inputParameters": {
|
||||
"status": "${check_workspace.output.status}"
|
||||
},
|
||||
"type": "DECISION",
|
||||
"caseExpression": "($.status === 406 ? 'create' : 'exists')",
|
||||
"decisionCases": {
|
||||
"create": [
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "create_jcr_account",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.storagehub}/workspace/users",
|
||||
"method" : "POST",
|
||||
"headers" : {
|
||||
"Content-Type" : "application/x-www-form-urlencoded",
|
||||
"Accept" : "application/json",
|
||||
"Authorization" : "Bearer ${authorize.output.body.access_token}"
|
||||
},
|
||||
"body" : {
|
||||
"user" : "${get_service_account_user.output.body.username}",
|
||||
"password" : "r3u4h-ewrqwli!_m"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue