Auto sync manager's RPC_API_VERSION
With current code whenever we update the RPC_API_VERSION in an rpcapi.py file we also have to update that same attribute in its manager. This patch links the managers' RPC_API_VERSION attribute to their corresponding RPC API version. Change-Id: Ic71c3dd8d434fbf752a86ff9c594837ce3650b04
This commit is contained in:
parent
54c5d0c01d
commit
7d1cdbab37
|
@ -83,7 +83,7 @@ QUOTAS = quota.QUOTAS
|
|||
class BackupManager(manager.SchedulerDependentManager):
|
||||
"""Manages backup of block storage devices."""
|
||||
|
||||
RPC_API_VERSION = '2.0'
|
||||
RPC_API_VERSION = backup_rpcapi.BackupAPI.RPC_API_VERSION
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ from cinder import objects
|
|||
from cinder import quota
|
||||
from cinder import rpc
|
||||
from cinder.scheduler.flows import create_volume
|
||||
from cinder.scheduler import rpcapi as scheduler_rpcapi
|
||||
from cinder.volume import rpcapi as volume_rpcapi
|
||||
|
||||
|
||||
|
@ -60,7 +61,7 @@ class SchedulerManager(manager.Manager):
|
|||
# create_consistencygroup(), create_volume(), migrate_volume_to_host(),
|
||||
# retype() and manage_existing() in v3.0 of RPC API.
|
||||
|
||||
RPC_API_VERSION = '2.1'
|
||||
RPC_API_VERSION = scheduler_rpcapi.SchedulerAPI.RPC_API_VERSION
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ MAPPING = {
|
|||
class VolumeManager(manager.SchedulerDependentManager):
|
||||
"""Manages attachable block storage devices."""
|
||||
|
||||
RPC_API_VERSION = '2.3'
|
||||
RPC_API_VERSION = volume_rpcapi.VolumeAPI.RPC_API_VERSION
|
||||
|
||||
target = messaging.Target(version=RPC_API_VERSION)
|
||||
|
||||
|
|
Loading…
Reference in New Issue