@@ -781,7 +781,7 @@ def get_initial_broks(self, broker_name):
781
781
:type: bool
782
782
"""
783
783
logger .debug ("Getting initial broks for %s, %s %s" , self .name , self .alive , self .reachable )
784
- return self .con .get ('fill_initial_broks' , {'broker_name' : broker_name }, wait = 'long' )
784
+ return self .con .get ('fill_initial_broks' , {'broker_name' : broker_name }, wait = True )
785
785
786
786
@valid_connection ()
787
787
@communicate ()
@@ -814,7 +814,7 @@ def put_conf(self, configuration, test=False):
814
814
return True
815
815
# ----------
816
816
817
- return self .con .post ('push_configuration' , {'conf' : configuration }, wait = 'long' )
817
+ return self .con .post ('push_configuration' , {'conf' : configuration }, wait = True )
818
818
819
819
@valid_connection ()
820
820
@communicate ()
@@ -885,7 +885,7 @@ def push_broks(self, broks):
885
885
:rtype: bool
886
886
"""
887
887
logger .debug ("[%s] Pushing %d broks" , self .name , len (broks ))
888
- return self .con .post ('push_broks' , {'broks' : broks }, wait = 'long' )
888
+ return self .con .post ('push_broks' , {'broks' : broks }, wait = True )
889
889
890
890
@valid_connection ()
891
891
@communicate ()
@@ -903,7 +903,7 @@ def push_actions(self, actions, scheduler_instance_id):
903
903
logger .debug ("Pushing %d actions from %s" , len (actions ), scheduler_instance_id )
904
904
return self .con .post ('push_actions' , {'actions' : actions ,
905
905
'scheduler_instance_id' : scheduler_instance_id },
906
- wait = 'long' )
906
+ wait = True )
907
907
908
908
@valid_connection ()
909
909
@communicate ()
@@ -921,7 +921,7 @@ def push_results(self, results, scheduler_name):
921
921
"""
922
922
logger .debug ("Pushing %d results" , len (results ))
923
923
result = self .con .post ('put_results' , {'results' : results , 'from' : scheduler_name },
924
- wait = 'long' )
924
+ wait = True )
925
925
return result
926
926
927
927
@valid_connection ()
@@ -936,7 +936,7 @@ def push_external_commands(self, commands):
936
936
:rtype: bool
937
937
"""
938
938
logger .debug ("Pushing %d external commands" , len (commands ))
939
- return self .con .post ('run_external_commands' , {'cmds' : commands }, wait = 'long' )
939
+ return self .con .post ('run_external_commands' , {'cmds' : commands }, wait = True )
940
940
941
941
@valid_connection ()
942
942
@communicate ()
@@ -947,7 +947,7 @@ def get_external_commands(self):
947
947
:return: External Command list on success, [] on failure
948
948
:rtype: list
949
949
"""
950
- res = self .con .get ('get_external_commands' , wait = True )
950
+ res = self .con .get ('get_external_commands' , wait = False )
951
951
logger .debug ("Got %d external commands from %s: %s" , len (res ), self .name , res )
952
952
return unserialize (res , True )
953
953
@@ -963,7 +963,7 @@ def get_broks(self, broker_name):
963
963
:return: Broks list on success, [] on failure
964
964
:rtype: list
965
965
"""
966
- res = self .con .get ('get_broks' , {'broker_name' : broker_name }, wait = True )
966
+ res = self .con .get ('get_broks' , {'broker_name' : broker_name }, wait = False )
967
967
logger .debug ("Got broks from %s: %s" , self .name , res )
968
968
return unserialize (res , True )
969
969
@@ -976,7 +976,7 @@ def get_events(self):
976
976
:return: Broks list on success, [] on failure
977
977
:rtype: list
978
978
"""
979
- res = self .con .get ('get_events' , wait = True )
979
+ res = self .con .get ('get_events' , wait = False )
980
980
logger .debug ("Got events from %s: %s" , self .name , res )
981
981
return unserialize (res , True )
982
982
@@ -991,7 +991,7 @@ def get_results(self, scheduler_instance_id):
991
991
:rtype: list
992
992
"""
993
993
res = self .con .get ('get_results' , {'scheduler_instance_id' : scheduler_instance_id },
994
- wait = 'long' )
994
+ wait = True )
995
995
logger .debug ("Got %d results from %s: %s" , len (res ), self .name , res )
996
996
return res
997
997
@@ -1010,23 +1010,6 @@ def get_actions(self, params):
1010
1010
logger .debug ("Got actions from %s: %s" , self .name , res )
1011
1011
return unserialize (res , True )
1012
1012
1013
- @valid_connection ()
1014
- def get_object (self , o_type , o_name ):
1015
- """Send a HTTP request to the scheduler (GET /get_host)
1016
- Get host information from the scheduler.
1017
- Un-serialize data received.
1018
-
1019
- :param o_type: searched object type
1020
- :type o_type: str
1021
- :param o_name: searched object name (or uuid)
1022
- :type o_name: str
1023
- :return: serialized object information
1024
- :rtype: str
1025
- """
1026
- res = self .con .get ('object' , {'o_type' : o_type , 'o_name' : o_name }, wait = True )
1027
- logger .debug ("Got an %s object from %s: %s" , o_type , self .name , res )
1028
- return res
1029
-
1030
1013
1031
1014
class SatelliteLinks (Items ):
1032
1015
"""Class to handle serveral SatelliteLink"""
0 commit comments