Skip to content

Commit d314d48

Browse files
committed
updated docs
1 parent b37d9ff commit d314d48

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ deep_security/dist/
1919
/*.egg-info
2020
deep_security/*.egg-info
2121
docs/build
22+
tests/

docs/source/index.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directives..
55
6-
.. toctree::
7-
:maxdepth: 4
8-
9-
dsp3
10-
116
127
|
138
Welcome to DSP3

dsp3/models/manager.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ def system_event_retreive(self, range_from=None, range_to=None, specific_time=No
417417

418418
def set_trusted_update_mode(self, host_id: int, duration:int = 0, enabled: bool = True) -> str:
419419
"""
420+
This function sets the trusted (maintenance) mode status of the host specified for a specific duration.
420421
421422
:param host_id: host to enable or disable trusted (maintenance) mode for
422423
: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
432433

433434
def get_trusted_update_mode(self, host_id: int) -> str:
434435
"""
436+
This function retreives the trusted (maintenance) mode status of the host specified.
435437
436438
:param host_id: the id of the host to retreive trust update mode (maintenance) status on
437439
:return: json string of the format
@@ -458,6 +460,13 @@ def get_trusted_update_mode(self, host_id: int) -> str:
458460
return json.dumps(dict(DescribeTrustedUpdateModeResponse=dict(startTime=start_time, endTime=end_time, state=state, \
459461
endTimeHuman=human_end_time, startTimeHuman=human_start_time )))
460462

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+
461470

462471
def end_session(self) -> None:
463472
"""

0 commit comments

Comments
 (0)