Skip to content

Commit

Permalink
update simplesample
Browse files Browse the repository at this point in the history
  • Loading branch information
lausser committed Apr 2, 2017
1 parent 6071d58 commit 214b630
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions recipes/default/classes/datasource_simplesample.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def __ds_ident__(params={}):
class SimpleSample(coshsh.datasource.Datasource):
def __init__(self, **kwargs):
super(self.__class__, self).__init__(**kwargs)
# default name is taken from the ini-section
# [datasource_thisisthename]
#self.name = kwargs["name"]
self.dir = kwargs.get("dir", "/tmp")
self.objects = {}
Expand All @@ -38,5 +40,12 @@ def open(self):

def read(self, filter=None, objects={}, force=None, **kwargs):
logger.info('read items from simplesample')
# if the recipe has read other datasources before, then these
# are the objects collected so far:
self.objects = objects
#self.add('hosts', Host(...))

def close(self):
# close a database, file, ...
pass

0 comments on commit 214b630

Please sign in to comment.