~vishvananda/nova/volume-cleanup-2

« back to all changes in this revision

Viewing changes to nova/compute/manager.py

  • Committer: Vishvananda Ishaya
  • Date: 2011-09-18 18:56:01 UTC
  • Revision ID: vishvananda@gmail.com-20110918185601-5m13m2c4x6pmfm59
compare as string instead of converting to int

Show diffs side-by-side

added added

removed removed

Lines of Context:
1320
1320
        bdms = self.db.block_device_mapping_get_all_by_instance(
1321
1321
                context, instance_id)
1322
1322
        for item in bdms:
1323
 
            LOG.warn(dict(item))
1324
 
            if item['volume_id'] == volume_id:
 
1323
            # NOTE(vish): Comparing as strings because the os_api doesn't
 
1324
            #             convert to integer and we may wish to support uuids
 
1325
            #             in the future.
 
1326
            if str(item['volume_id']) == str(volume_id):
1325
1327
                bdm = item
1326
1328
                break
1327
1329
        mp = bdm['device_name']