@@ -417,6 +417,7 @@ def system_event_retreive(self, range_from=None, range_to=None, specific_time=No
417
417
418
418
def set_trusted_update_mode (self , host_id : int , duration :int = 0 , enabled : bool = True ) -> str :
419
419
"""
420
+ This function sets the trusted (maintenance) mode status of the host specified for a specific duration.
420
421
421
422
:param host_id: host to enable or disable trusted (maintenance) mode for
422
423
:param duration: the amount of time to enable trusted mode. Not required for disable request
@@ -432,6 +433,7 @@ def set_trusted_update_mode(self, host_id: int, duration:int = 0, enabled: bool
432
433
433
434
def get_trusted_update_mode (self , host_id : int ) -> str :
434
435
"""
436
+ This function retreives the trusted (maintenance) mode status of the host specified.
435
437
436
438
:param host_id: the id of the host to retreive trust update mode (maintenance) status on
437
439
:return: json string of the format
@@ -458,6 +460,13 @@ def get_trusted_update_mode(self, host_id: int) -> str:
458
460
return json .dumps (dict (DescribeTrustedUpdateModeResponse = dict (startTime = start_time , endTime = end_time , state = state , \
459
461
endTimeHuman = human_end_time , startTimeHuman = human_start_time )))
460
462
463
+ def decision_logs (self ):
464
+ url = "https://{}:{}/rest/decision-logs" .format (self .host , self .port )
465
+ headers = {'Content-Type' : 'application/json' }
466
+ cookies = dict (sID = self .session_id )
467
+ r = requests .get (url = url , verify = False , cookies = cookies , headers = headers )
468
+ return r .content
469
+
461
470
462
471
def end_session (self ) -> None :
463
472
"""
0 commit comments