Clean up redundant code.
parent
611045528f
commit
f4335f43ad
|
@ -67,16 +67,8 @@ class DataStore(object):
|
|||
def __init__(self, name="DataStore"):
|
||||
self.name = name
|
||||
self.id = make_id()
|
||||
self.source = DataSource()
|
||||
self.sink = DataSink()
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return self.source
|
||||
|
||||
@property
|
||||
def sink(self):
|
||||
return self.sink
|
||||
self.source = None
|
||||
self.sink = None
|
||||
|
||||
def get(self, stix_id):
|
||||
"""
|
||||
|
|
|
@ -26,14 +26,6 @@ class FileSystemStore(DataStore):
|
|||
self.source = FileSystemSource(stix_dir=stix_dir)
|
||||
self.sink = FileSystemSink(stix_dir=stix_dir)
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return self.source
|
||||
|
||||
@property
|
||||
def sink(self):
|
||||
return self.sink
|
||||
|
||||
# file system sink API calls
|
||||
|
||||
def add(self, stix_objs):
|
||||
|
|
|
@ -64,14 +64,6 @@ class MemoryStore(DataStore):
|
|||
self.source = MemorySource(stix_data=self.data, _store=True)
|
||||
self.sink = MemorySink(stix_data=self.data, _store=True)
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return self.source
|
||||
|
||||
@property
|
||||
def sink(self):
|
||||
return self.sink
|
||||
|
||||
# memory sink API calls
|
||||
|
||||
def add(self, stix_data):
|
||||
|
|
|
@ -32,15 +32,7 @@ class TAXIICollectionStore(DataStore):
|
|||
self.name = name
|
||||
self.id = make_id()
|
||||
self.source = TAXIICollectionSource(taxii_client, api_root_name, collection_id, user, password)
|
||||
self.sink = self.TAXIICollectionSink(taxii_client, api_root_name, collection_id, user, password)
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
return self.source
|
||||
|
||||
@property
|
||||
def sink(self):
|
||||
return self.sink
|
||||
self.sink = TAXIICollectionSink(taxii_client, api_root_name, collection_id, user, password)
|
||||
|
||||
# file system sink API calls
|
||||
|
||||
|
|
Loading…
Reference in New Issue