mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
B #5313 onegate server to send post to oneflow for scaling
Signed-off-by: Rafael Campuzano <rcampuz.telecom@gmail.com> (cherry picked from commit c4bb5edf691e4b0d6114f1c5db51cfbae7391779) (cherry picked from commit 3269e2c69ee87a8cccd998acdcce7ec3aebc34dd)
This commit is contained in:
parent
44ded9c1c6
commit
b6b455061a
@ -960,9 +960,16 @@ put '/service/role/:role' do
|
||||
|
||||
check_vm_in_service(source_vm['ID'], service_id, client)
|
||||
|
||||
action_response = flow_client(client).put(
|
||||
"/service/" + service_id + "/role/" + params[:role],
|
||||
request.body.read)
|
||||
cardinality = JSON.parse(request.body.read)["cardinality"]
|
||||
body_json = {
|
||||
:cardinality => cardinality,
|
||||
:role_name => params[:role],
|
||||
:force => false
|
||||
}.to_json
|
||||
|
||||
action_response = flow_client(client).post(
|
||||
"/service/" + service_id + "/scale",
|
||||
body_json)
|
||||
|
||||
if CloudClient::is_error?(action_response)
|
||||
error_msg = "Error performing action on service #{service_id} role #{params[:role]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user