[API] Disallow MnB messages if disabled
Change-Id: If912fcf573217afe65d1b330274db335d34d199a
This commit is contained in:
@@ -42,8 +42,8 @@ class UsageStats(object):
|
|||||||
self.start_stats_sched()
|
self.start_stats_sched()
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if self.billing_timer:
|
if self.stats_timer:
|
||||||
self.billing_timer.cancel()
|
self.stats_timer.cancel()
|
||||||
|
|
||||||
def gather_stats(self):
|
def gather_stats(self):
|
||||||
# Work out if it is our turn to run
|
# Work out if it is our turn to run
|
||||||
|
@@ -31,8 +31,10 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
def update_mnb(event_type, lbid, tenant_id):
|
def update_mnb(event_type, lbid, tenant_id):
|
||||||
# Start a new thread
|
|
||||||
eventlet.spawn_n(client_job, event_type, lbid, tenant_id)
|
if cfg.CONF['admin_api'].billing_enable:
|
||||||
|
# Start a new thread
|
||||||
|
eventlet.spawn_n(client_job, event_type, lbid, tenant_id)
|
||||||
|
|
||||||
|
|
||||||
def client_job(event_type, lbid, tenant_id):
|
def client_job(event_type, lbid, tenant_id):
|
||||||
|
Reference in New Issue
Block a user