File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -678,25 +678,28 @@ def splunk_version(self):
678678
679679 @property
680680 def kvstore_owner (self ):
681+ """Returns the KVStore owner for this instance of Splunk.
682+
683+ By default is the kvstore owner is not set, it will return "nobody"
684+ :return: A string with the KVStore owner.
685+ """
681686 if self ._kvstore_owner is None :
682687 self ._kvstore_owner = "nobody"
683- #self.namespace['owner'] = "nobody"
684688 return self ._kvstore_owner
685689
686690 @kvstore_owner .setter
687691 def kvstore_owner (self , value ):
688692 self ._kvstore_owner = value
689- #self.namespace['owner'] = value
690693
691694 @property
692695 def kvstore (self ):
693696 """Returns the collection of KV Store collections.
694697
698+ sets the owner for the namespace, before retrieving the KVStore Collection
699+
695700 :return: A :class:`KVStoreCollections` collection of :class:`KVStoreCollection` entities.
696701 """
697702 self .namespace ['owner' ] = self .kvstore_owner
698- # if self.namespace['owner'] is None:
699- # self.namespace['owner'] = "nobody"
700703 return KVStoreCollections (self )
701704
702705 @property
Original file line number Diff line number Diff line change 2626class KVStoreBatchTestCase (testlib .SDKTestCase ):
2727 def setUp (self ):
2828 super (KVStoreBatchTestCase , self ).setUp ()
29- self .service .namespace ['owner' ] = 'nobody'
29+ # self.service.namespace['owner'] = 'nobody'
3030 self .service .namespace ['app' ] = 'search'
3131 confs = self .service .kvstore
3232 if ('test' in confs ):
Original file line number Diff line number Diff line change 2525class KVStoreConfTestCase (testlib .SDKTestCase ):
2626 def setUp (self ):
2727 super (KVStoreConfTestCase , self ).setUp ()
28- self .service .namespace ['owner' ] = 'nobody'
28+ # self.service.namespace['owner'] = 'nobody'
2929 self .service .namespace ['app' ] = 'search'
3030 self .confs = self .service .kvstore
3131 if ('test' in self .confs ):
3232 self .confs ['test' ].delete ()
3333
3434 def test_owner_restriction (self ):
35- self .service .namespace [ 'owner' ] = 'admin'
35+ self .service .kvstore_owner = 'admin'
3636 self .assertRaises (client .HTTPError , lambda : self .confs .list ())
37- self .service .namespace [ 'owner' ] = 'nobody'
37+ self .service .kvstore_owner = 'nobody'
3838
3939 def test_create_delete_collection (self ):
4040 self .confs .create ('test' )
Original file line number Diff line number Diff line change 2727class KVStoreDataTestCase (testlib .SDKTestCase ):
2828 def setUp (self ):
2929 super (KVStoreDataTestCase , self ).setUp ()
30- self .service .namespace ['owner' ] = 'nobody'
30+ # self.service.namespace['owner'] = 'nobody'
3131 self .service .namespace ['app' ] = 'search'
3232 self .confs = self .service .kvstore
3333 if ('test' in self .confs ):
You can’t perform that action at this time.
0 commit comments