Skip to content

Commit b3071c5

Browse files
author
Frederick Ross
committed
Refactored out the one use of Service.namespace, and removed the method.
1 parent fe22e6f commit b3071c5

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

splunklib/client.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,17 +1018,6 @@ def name(self):
10181018
"""
10191019
return self.state.title
10201020

1021-
@property
1022-
def namespace(self):
1023-
"""Returns the namespace for this entity.
1024-
1025-
:return: A :class:`splunklib.data.Record` object with three keys:
1026-
``owner``, ``app``, and ``sharing``.
1027-
"""
1028-
return namespace(owner = self._state.access['owner'],
1029-
app = self._state.access['app'],
1030-
sharing = self._state.access['sharing'])
1031-
10321021
def read(self):
10331022
"""Reads the current state of the entity from the server."""
10341023
response = self.get()
@@ -3075,8 +3064,9 @@ def fired_alerts(self):
30753064
c = Collection(
30763065
self.service,
30773066
self.service._abspath(PATH_FIRED_ALERTS + self.name,
3078-
owner=self.namespace.owner, app=self.namespace.app,
3079-
sharing=self.namespace.sharing),
3067+
owner=self._state.access.owner,
3068+
app=self._state.access.app,
3069+
sharing=self._state.access.sharing),
30803070
item=AlertGroup)
30813071
return c
30823072

0 commit comments

Comments
 (0)