This commit is contained in:
@@ -72,7 +72,7 @@ def Is_the_server_already_wanted_state(id_machine, wanted_state,instance_type):
|
||||
bool_result = False
|
||||
return bool_result
|
||||
|
||||
def all_operations(wanted_state,list_machine):
|
||||
def all_operations(request,wanted_state,list_machine):
|
||||
info_to_display = ""
|
||||
if wanted_state == "running":
|
||||
operation_to_perform = "start"
|
||||
@@ -84,7 +84,7 @@ def all_operations(wanted_state,list_machine):
|
||||
|
||||
for machine_target in list_machine:
|
||||
print(machine_target[1])
|
||||
kubernetes_connection.scale_up(main.request,namespace_name=machine_target[0],name=machine_target[1],replicas=machine_target[2]);
|
||||
kubernetes_connection.scale_up(request,namespace_name=machine_target[0],deploy_name=machine_target[1],replicas=machine_target[2]);
|
||||
# if not(Is_the_server_already_wanted_state(machine_target[0], wanted_state,machine_target[1])):
|
||||
# function.action(False,machine_target[0],operation_to_perform,machine_target[1])
|
||||
# print(str(machine_target[0])+" is now "+str(wanted_state))
|
||||
@@ -106,7 +106,7 @@ def main(request):
|
||||
print("-----------------UP-----------------------")
|
||||
print("------------------------------------------")
|
||||
print(list_servers_up)
|
||||
print(all_operations("running", list_servers_up))
|
||||
print(all_operations(request,"running", list_servers_up))
|
||||
#
|
||||
#
|
||||
# ## Server(s) supposed to be DOWN
|
||||
|
||||
Reference in New Issue
Block a user