Clean up redundant code.

stix2.1
Greg Back 2017-07-19 21:12:56 +00:00
parent 611045528f
commit f4335f43ad
4 changed files with 3 additions and 35 deletions

View File

@ -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):
"""

View File

@ -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):

View File

@ -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):

View File

@ -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