Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions splunklib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# The purpose of this module is to provide a friendlier domain interface to
# various Splunk endpoints. The approach here is to leverage the binding
# layer to capture endpoint context and provide objects and methods that
# offer simplified access their corresponding endpoints. The design avoids
# caching resource state. From the perspective of this module, the 'policy'
# for caching resource state belongs in the application or a higher level
# framework, and its the purpose of this module to provide simplified
# access to that resource state.
#
# A side note, the objects below that provide helper methods for updating eg:
# Entity state, are written so that they may be used in a fluent style.
#

"""The **splunklib.client** module provides a Pythonic interface to the
`Splunk REST API <http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTcontents>`_,
Expand Down Expand Up @@ -56,20 +43,31 @@

print(my_app['author']) # Or: print(my_app.author)
my_app.package() # Creates a compressed package of this application

The purpose of this module is to provide a friendlier domain interface to
various Splunk endpoints. The approach here is to leverage the binding
layer to capture endpoint context and provide objects and methods that
offer simplified access their corresponding endpoints. The design avoids
caching resource state. From the perspective of this module, the 'policy'
for caching resource state belongs in the application or a higher level
framework, and its the purpose of this module to provide simplified
access to that resource state.

A side note, the objects below that provide helper methods for updating eg:
Entity state, are written so that they may be used in a fluent style.
"""

import contextlib
import datetime
import json
import logging
import re
import socket
from datetime import datetime, timedelta
from time import sleep
from urllib import parse
from warnings import deprecated

from . import data
from .data import record
from .binding import (
AuthenticationError,
Context,
Expand All @@ -80,17 +78,18 @@
_NoAuthenticationToken,
namespace,
)
from .data import record

logger = logging.getLogger(__name__)

__all__ = [
"connect",
"AuthenticationError",
"IncomparableException",
"NotSupportedError",
"OperationError",
"IncomparableException",
"Service",
"connect",
"namespace",
"AuthenticationError",
]

PATH_APPS = "apps/local/"
Expand Down Expand Up @@ -2007,6 +2006,10 @@ def clear_password(self):
return self.content.get("clear_password")

@property
@deprecated(
"To improve security, this field now returns an empty \
string and will be removed from Splunk in a future release."
)
def encrypted_password(self):
return self.content.get("encr_password")

Expand Down
Loading