Skip to content

Commit a06a053

Browse files
authored
Renaming SdMonClient -> SdMonitorClient (#42)
For consistency with SdSecureClient
1 parent 3bc7793 commit a06a053

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,25 @@ Usage
2929

3030
_Note:_ in order to use this API you must obtain a Sysdig Monitor/Secure API token. You can get your user's token in the _Sysdig Monitor API_ section of the settings page for [monitor](https://app.sysdigcloud.com/#/settings/user) or [secure](https://secure.sysdig.com/#/settings/user).
3131

32-
The library exports two classes, `SdMonClient` and `SdSecureClient` that are used to connect to Sysdig Monitor/Secure and execute actions. They can be instantiated like this:
32+
The library exports two classes, `SdMonitorClient` and `SdSecureClient` that are used to connect to Sysdig Monitor/Secure and execute actions. They can be instantiated like this:
3333

3434
``` python
35-
from sdcclient import SdMonClient
35+
from sdcclient import SdMonitorClient
3636

3737
api_token = "MY_API_TOKEN"
3838

3939
#
4040
# Instantiate the Sysdig Monitor client
4141
#
42-
client = SdMonClient(api_token)
42+
client = SdMonitorClient(api_token)
4343
```
4444

45-
For backwards compatibility purposes, a third class `SdcClient` is exported which is an alias of `SdMonClient`.
45+
For backwards compatibility purposes, a third class `SdcClient` is exported which is an alias of `SdMonitorClient`.
4646

4747
Once instantiated, all the methods documented below can be called on the object.
4848

4949
#### Return Values
50-
Every method in the SdMonClient/SdSecureClient classes returns **a list with two entries**. The first one is a boolean value indicating if the call was successful. The second entry depends on the result:
50+
Every method in the SdMonitorClient/SdSecureClient classes returns **a list with two entries**. The first one is a boolean value indicating if the call was successful. The second entry depends on the result:
5151
- If the call was successful, it's a dictionary reflecting the json returned by the underlying REST call
5252
- If the call failed, it's a string describing the error
5353

@@ -70,7 +70,7 @@ export SDC_SSL_VERIFY='false'
7070
Alternatively, you can specify the additional arguments in your Python scripts as you instantiate the SDC client:
7171

7272
```
73-
client = SdMonClient(api_token, sdc_url='https://<YOUR-API-SERVER-HOSTNAME-OR-IP>', ssl_verify=False)
73+
client = SdMonitorClient(api_token, sdc_url='https://<YOUR-API-SERVER-HOSTNAME-OR-IP>', ssl_verify=False)
7474
```
7575

7676

sdcclient/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from sdcclient._client import SdcClient
2-
from sdcclient._client import SdMonClient
2+
from sdcclient._client import SdMonitorClient
33
from sdcclient._client import SdSecureClient

sdcclient/_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -867,10 +867,10 @@ def get_user_api_token(self, username, teamname):
867867
data = res.json()
868868
return [True, data['token']['key']]
869869

870-
class SdMonClient(_SdcCommon):
870+
class SdMonitorClient(_SdcCommon):
871871

872872
def __init__(self, token="", sdc_url='https://app.sysdigcloud.com', ssl_verify=True):
873-
super(SdMonClient, self).__init__(token, sdc_url, ssl_verify)
873+
super(SdMonitorClient, self).__init__(token, sdc_url, ssl_verify)
874874

875875
def get_alerts(self):
876876
'''**Description**
@@ -1721,7 +1721,7 @@ def clear_falco_rules(self):
17211721

17221722

17231723
# For backwards compatibility
1724-
SdcClient = SdMonClient
1724+
SdcClient = SdMonitorClient
17251725

17261726
class SdSecureClient(_SdcCommon):
17271727

0 commit comments

Comments
 (0)