mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-14 00:33:23 +09: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 c4bb5edf69)
This commit is contained in:
1 parent
7b8857f219
commit
3269e2c69e
1 file changed
+10
-3
@@ -981,9 +981,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]}"
|
||||
|
||||
Reference in new issue
Block a user