Remove vol_get_usage_by_time from conductor api/rpcapi

In Havana, commit 3cf4cb253 moved the volume usage notify code to
conductor.

In Juno, commit 47f6ffad8 dropped vol_get_usage_by_time from conductor
manager but not from the conductor api/rpcapi modules. Without
vol_get_usage_by_time being in conductor manager it's an API pointing to
nothing and won't work so we should remove it.

The DB APIs are left in since the vol_usage_update DB API is tested
using vol_get_usage_by_time.

If we were to leave the conductor APIs in tree, we should add the
conductor manager method back in and convert the volume_usages table to
nova objects, and possibly also expose it via a v2.1 API extension.

Closes-Bug: #1434687

Change-Id: Ie2980d681c62cd3457b359fbe4f5c32a2bcfc5db
This commit is contained in:
Matt Riedemann 2015-03-20 13:29:09 -07:00
parent 37a6c601f3
commit 307e998efb
2 changed files with 1 additions and 9 deletions

View File

@ -108,9 +108,6 @@ class LocalAPI(object):
return self._manager.block_device_mapping_get_all_by_instance(
context, instance, legacy)
def vol_get_usage_by_time(self, context, start_time):
return self._manager.vol_get_usage_by_time(context, start_time)
def vol_usage_update(self, context, vol_id, rd_req, rd_bytes, wr_req,
wr_bytes, instance, last_refreshed=None,
update_totals=False):

View File

@ -137,6 +137,7 @@ class ConductorAPI(object):
- Remove aggregate_host_add() and aggregate_host_delete()
- Remove network_migrate_instance_start() and
network_migrate_instance_finish()
- Remove vol_get_usage_by_time
... Icehouse supports message version 2.0. So, any changes to
existing methods in 2.x after that point should be done such
@ -216,12 +217,6 @@ class ConductorAPI(object):
return cctxt.call(context, 'block_device_mapping_get_all_by_instance',
instance=instance_p, legacy=legacy)
def vol_get_usage_by_time(self, context, start_time):
start_time_p = jsonutils.to_primitive(start_time)
cctxt = self.client.prepare()
return cctxt.call(context, 'vol_get_usage_by_time',
start_time=start_time_p)
def vol_usage_update(self, context, vol_id, rd_req, rd_bytes, wr_req,
wr_bytes, instance, last_refreshed=None,
update_totals=False):