Merge "Added quote calls to rating processors"
This commit is contained in:
@@ -73,6 +73,15 @@ class BillingProcessorBase(object):
|
||||
client.cast({}, operation, name=self.module_name)
|
||||
return module_db.set_state(self.module_name, enabled)
|
||||
|
||||
def quote(self, data):
|
||||
"""Compute rating informations from data.
|
||||
|
||||
:param data: An internal CloudKitty dictionary used to describe
|
||||
resources.
|
||||
:type data: dict(str:?)
|
||||
"""
|
||||
return self.process(data)
|
||||
|
||||
@abc.abstractmethod
|
||||
def process(self, data):
|
||||
"""Add billing informations to data
|
||||
|
||||
@@ -124,7 +124,7 @@ class APIWorker(BaseWorker):
|
||||
|
||||
def quote(self, res_data):
|
||||
for processor in self._processors.values():
|
||||
processor.process(res_data)
|
||||
processor.quote(res_data)
|
||||
|
||||
price = decimal.Decimal(0)
|
||||
for res in res_data:
|
||||
|
||||
Reference in New Issue
Block a user