Remove SchedulerDependentManager
The update_service_capabilities method of this class has been unused since it was disabled as a periodic task in commit 674ef05b0ac668e16529a3ddc2b8fe26dc729dad. The compute manager's update to a v3 rpc api removed the last references to publishing capabilities, so this can now be completely removed. After removing the capabilities bits, the only value left in this class was providing an instance of the scheduler rpcapi class. This seemed like overkill, so I removed this class completely and added the scheduler rpcapi instance to the compute manager directly. Related to blueprint rpc-major-version-updates-icehouse Related to blueprint no-compute-fanout-to-scheduler Change-Id: I72fd16fc96938a9ea9d509e24319a5273de900a9
This commit is contained in:
@@ -62,7 +62,6 @@ from nova.objects import base as objects_base
|
||||
from nova.openstack.common import log as logging
|
||||
from nova.openstack.common import periodic_task
|
||||
from nova.openstack.common.rpc import dispatcher as rpc_dispatcher
|
||||
from nova.scheduler import rpcapi as scheduler_rpcapi
|
||||
|
||||
|
||||
CONF = cfg.CONF
|
||||
@@ -128,27 +127,3 @@ class Manager(base.Base, periodic_task.PeriodicTasks):
|
||||
Child classes should override this method.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class SchedulerDependentManager(Manager):
|
||||
"""Periodically send capability updates to the Scheduler services.
|
||||
|
||||
Services that need to update the Scheduler of their capabilities
|
||||
should derive from this class. Otherwise they can derive from
|
||||
manager.Manager directly. Updates are only sent after
|
||||
update_service_capabilities is called with non-None values.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, host=None, db_driver=None, service_name='undefined'):
|
||||
self.last_capabilities = None
|
||||
self.service_name = service_name
|
||||
self.scheduler_rpcapi = scheduler_rpcapi.SchedulerAPI()
|
||||
super(SchedulerDependentManager, self).__init__(host, db_driver,
|
||||
service_name)
|
||||
|
||||
def update_service_capabilities(self, capabilities):
|
||||
"""Remember these capabilities to send on next periodic update."""
|
||||
if not isinstance(capabilities, list):
|
||||
capabilities = [capabilities]
|
||||
self.last_capabilities = capabilities
|
||||
|
||||
Reference in New Issue
Block a user