Skip to content

Commit 65cfd21

Browse files
author
Frederick Ross
committed
More doctoring updates.
1 parent 8844307 commit 65cfd21

8 files changed

Lines changed: 31 additions & 78 deletions

‎splunklib/binding.py‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,9 @@ def delete(self, path_segment, owner=None, app=None, sharing=None, **query):
416416
"""DELETE at *path_segment* with the given namespace and query.
417417
418418
Named to match the HTTP method. This function makes at least
419-
one roundtrip to the server, and one additional round trip for
420-
each 303 status returned.
419+
one roundtrip to the server, one additional round trip for
420+
each 303 status returned, and at most two additional round
421+
trips if autologin is enabled.
421422
422423
If *owner*, *app*, and *sharing* are omitted, then uses this
423424
``Context``'s default namespace. All other keyword arguments
@@ -463,8 +464,9 @@ def get(self, path_segment, owner=None, app=None, sharing=None, **query):
463464
"""GET from *path_segment* with the given namespace and query.
464465
465466
Named to match the HTTP method. This function makes at least
466-
one roundtrip to the server, and one additional round trip for
467-
each 303 status returned.
467+
one roundtrip to the server, one additional round trip for
468+
each 303 status returned, and at most two additional round
469+
trips if autologin is enabled.
468470
469471
If *owner*, *app*, and *sharing* are omitted, then uses this
470472
``Context``'s default namespace. All other keyword arguments
@@ -510,8 +512,9 @@ def post(self, path_segment, owner=None, app=None, sharing=None, **query):
510512
"""POST to *path_segment* with the given namespace and query.
511513
512514
Named to match the HTTP method. This function makes at least
513-
one roundtrip to the server, and one additional round trip for
514-
each 303 status returned.
515+
one roundtrip to the server, one additional round trip for
516+
each 303 status returned, and at most two additional round
517+
trips if autologin is enabled.
515518
516519
If *owner*, *app*, and *sharing* are omitted, then uses this
517520
``Context``'s default namespace. All other keyword arguments

‎splunklib/client.py‎

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def _parse_atom_metadata(content):
188188
def connect(**kwargs):
189189
"""Connect and log in to a Splunk instance.
190190
191-
This is a shorthand for ``Service(...).login()``. :func:`connect` makes one round trip to the server (for logging in).
191+
This is a shorthand for ``Service(...).login()``. :func:`connect`
192+
makes one round trip to the server (for logging in).
192193
193194
:param `host`: The host name (default: ``"localhost"``).
194195
:type host: string
@@ -410,8 +411,9 @@ def get(self, path_segment="", owner=None, app=None, sharing=None, **query):
410411
"""GET from *path_segment* relative to this endpoint.
411412
412413
Named to match the HTTP method. This function makes at least
413-
one roundtrip to the server, and one additional round trip for
414-
each 303 status returned.
414+
one roundtrip to the server, one additional round trip for
415+
each 303 status returned, plus at most two additional round
416+
trips if autologin is enabled.
415417
416418
If *owner*, *app*, and *sharing* are omitted, then takes a
417419
default namespace from this ``Endpoint``'s ``Service``. All
@@ -467,8 +469,9 @@ def post(self, path_segment="", owner=None, app=None, sharing=None, **query):
467469
"""POST to *path_segment* relative to this endpoint.
468470
469471
Named to match the HTTP method. This function makes at least
470-
one roundtrip to the server, and one additional round trip for
471-
each 303 status returned.
472+
one roundtrip to the server, one additional round trip for
473+
each 303 status returned, and at most two additional round
474+
trips if autologin is enabled.
472475
473476
If *owner*, *app*, and *sharing* are omitted, then takes a
474477
default namespace from this ``Endpoint``'s ``Service``. All
@@ -685,7 +688,9 @@ def refresh(self, state=None):
685688
686689
If *state* is provided, load it as the new state for this
687690
entity. Otherwise, make a roundtrip to the server (by calling
688-
the :meth:`read`f method of self) to fetch an updated state.
691+
the :meth:`read` method of self) to fetch an updated state,
692+
plus at most two additional round trips if autologin is
693+
enabled.
689694
690695
**Example**::
691696
@@ -865,7 +870,8 @@ def __getitem__(self, key):
865870
pass just a name, it will raise a ``ValueError``. In that
866871
case, add the namespace as a second argument.
867872
868-
This function makes a single roundtrip to the server.
873+
This function makes a single roundtrip to the server, plus at
874+
most two additional round trips if autologin is enabled.
869875
870876
:param key: The name to fetch, or a tuple (name, namespace)
871877
:return: An Entity object.
@@ -919,7 +925,8 @@ def __iter__(self):
919925
:rtype: iterator over entities.
920926
921927
Implemented to give Collection a listish interface. This
922-
function always makes a roundtrip to the server.
928+
function always makes a roundtrip to the server, plus at most
929+
two additional round trips if autologin is enabled.
923930
924931
**Example**::
925932
@@ -939,7 +946,8 @@ def __len__(self):
939946
further failure modes beyond those possible for any method on
940947
an Endpoint.
941948
942-
This function always makes a roundtrip to the server.
949+
This function always makes a round trip to the server, plus at
950+
most two additional round trips if autologin is enabled.
943951
944952
**Example**::
945953
@@ -1180,7 +1188,8 @@ def list(self, count=None, **kwargs):
11801188
There is no laziness in this function. The entire collection
11811189
is loaded at once and returned as a list. This function makes
11821190
a single roundtrip to the server, plus at most two more if
1183-
autologin is enabled.
1191+
autologin is enabled. There is no caching: every call makes at
1192+
least one round trip.
11841193
11851194
:param `count`: The maximum number of items to return (optional).
11861195
:param `offset`: The offset of the first item to return (optional).
@@ -1191,9 +1200,6 @@ def list(self, count=None, **kwargs):
11911200
:param `sort_mode`: The collating sequence for sorting returned items:
11921201
*auto*, *alpha*, *alpha_case*, *num* (optional).
11931202
:rtype: list
1194-
1195-
This function always makes a roundtrip to the server, and
1196-
makes no attempt at caching.
11971203
"""
11981204
# response = self.get(count=count, **kwargs)
11991205
# return self._load_list(response)
@@ -1618,8 +1624,9 @@ def results(self, timeout=None, wait_time=1, **query_params):
16181624
finish, and otherwise throw a ``ValueError``.
16191625
16201626
With *timeout*``=None``, this method makes a single roundtrip
1621-
to the server. With *timeout* set to an integer, it polls
1622-
repeatedly until it times out or the search is finished.
1627+
to the server, plus at most two additional round trips if
1628+
autologin is enabled. With *timeout* set to an integer, it
1629+
polls repeatedly until it times out or the search is finished.
16231630
16241631
:param timeout: Timeout in seconds, or ``None`` to fail immediately.
16251632
:type timeout: ``float``

‎tests/splunklib.baseline‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎tests/splunklib.binding.baseline‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎tests/splunklib.client.baseline‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎tests/splunklib.data.baseline‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎tests/splunklib.results.baseline‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎tests/test_module.py‎

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)