Skip to content

Commit 97faea1

Browse files
committed
Add missing method on BaseExtractor
The ABC BaseExtractor lacked the abstract method extract_for_tenant that the subclasses had to implement.
1 parent cb2cec0 commit 97faea1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

caso/extract/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,15 @@ def _get_keystone_users(self, ks_client):
100100

101101
def vm_status(self, status):
102102
return openstack_vm_statuses.get(status.lower(), 'unknown')
103+
104+
@abc.abstractmethod
105+
def extract_for_tenant(self, tenant, extract_from):
106+
"""Extract records for a tenant from given date.
107+
108+
:param tenant: Tenant to extract records for.
109+
:param extract_from: datetime.datetime object indicating the date to
110+
extract records from
111+
:returns: A dictionary of {"server_id": caso.record.Record"}
112+
113+
This method should be overriden in a subclass.
114+
"""

0 commit comments

Comments
 (0)