conf: Remove deprecated 'compute_stats_class' opt

Change-Id: I9efbd7ba066705d5fa2353587237d197015a4f25
Blueprint centralize-config-options-ocata
This commit is contained in:
Sarafraj Singh
2016-10-11 14:24:13 -05:00
committed by Stephen Finucane
parent f223f2ebdb
commit 02fa59d280
4 changed files with 9 additions and 16 deletions

View File

@@ -22,10 +22,10 @@ import copy
from oslo_log import log as logging from oslo_log import log as logging
from oslo_serialization import jsonutils from oslo_serialization import jsonutils
from oslo_utils import importutils
from nova.compute import claims from nova.compute import claims
from nova.compute import monitors from nova.compute import monitors
from nova.compute import stats
from nova.compute import task_states from nova.compute import task_states
from nova.compute import vm_states from nova.compute import vm_states
import nova.conf import nova.conf
@@ -87,7 +87,7 @@ class ResourceTracker(object):
self.pci_tracker = None self.pci_tracker = None
self.nodename = nodename self.nodename = nodename
self.compute_node = None self.compute_node = None
self.stats = importutils.import_object(CONF.compute_stats_class) self.stats = stats.Stats()
self.tracked_instances = {} self.tracked_instances = {}
self.tracked_migrations = {} self.tracked_migrations = {}
monitor_handler = monitors.MonitorHandler(self) monitor_handler = monitors.MonitorHandler(self)

View File

@@ -168,20 +168,6 @@ Possible values:
* Any positive integer representing amount of memory in MB to reserve * Any positive integer representing amount of memory in MB to reserve
for the host. for the host.
"""),
cfg.StrOpt('compute_stats_class',
default='nova.compute.stats.Stats',
deprecated_for_removal=True,
deprecated_since='13.0.0',
help="""
Abstracts out managing compute host stats to pluggable class. This class
manages and updates stats for the local compute host after an instance
is changed. These configurable compute stats may be useful for a
particular scheduler implementation.
Possible values
* A string representing fully qualified class name.
"""), """),
] ]

View File

@@ -539,6 +539,8 @@ class Reservation(BASE, NovaBase, models.SoftDeleteMixin):
'QuotaUsage.deleted == 0)') 'QuotaUsage.deleted == 0)')
# TODO(macsz) This class can be removed. It might need a DB migration to drop
# this.
class Snapshot(BASE, NovaBase, models.SoftDeleteMixin): class Snapshot(BASE, NovaBase, models.SoftDeleteMixin):
"""Represents a block storage device that can be attached to a VM.""" """Represents a block storage device that can be attached to a VM."""
__tablename__ = 'snapshots' __tablename__ = 'snapshots'

View File

@@ -0,0 +1,5 @@
---
upgrade:
- |
The ``compute_stats_class`` options is deprecated and have been removed
from the ``default`` group of nova.conf.