]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove an useless and wrong call
authorXinXiaohui <xiaohui.xin@intel.com>
Tue, 1 Mar 2016 02:20:41 +0000 (10:20 +0800)
committerXinXiaohui <xiaohui.xin@intel.com>
Tue, 1 Mar 2016 02:34:18 +0000 (10:34 +0800)
In cinder/objects/service.py, the method
obj_make_compatible() of Class Service is
useless and it called convert_version_to_tuple()
incorrectly from utils from Cinder instead of
from versionutils from oslo_utils, just remove it.

Change-Id: I383ba2c793add02b83591cc44e4e4584d09c7ed5

cinder/objects/service.py

index b8f833e627101ee652aed14704e0c1fd8a4a5417..3047f5b1be1f3c18e7130f18c3f3f0b80b52cc3a 100644 (file)
@@ -22,7 +22,6 @@ from cinder.i18n import _
 from cinder import objects
 from cinder.objects import base
 from cinder.objects import fields as c_fields
-from cinder import utils
 
 LOG = logging.getLogger(__name__)
 
@@ -58,10 +57,6 @@ class Service(base.CinderPersistentObject, base.CinderObject,
         'active_backend_id': fields.StringField(nullable=True),
     }
 
-    def obj_make_compatible(self, primitive, target_version):
-        """Make an object representation compatible with a target version."""
-        target_version = utils.convert_version_to_tuple(target_version)
-
     @staticmethod
     def _from_db_object(context, service, db_service):
         for name, field in service.fields.items():