The function _get_volume_id expects a volume_id or path and returns an integer ID to that volume. The path to a local volume which has been created looks like /dev/mapper/nova--volumes-volume--00000001 for example. The path probably had -vol- in the past, which explains the original code. We simply want to get the numeric part of this path and convert it to an integer.
The function _get_volume_id expects a volume_id or path and returns an integer ID to that volume. The path to a local volume which has been created looks like /dev/mapper/ nova--volumes- volume- -00000001 for example. The path probably had -vol- in the past, which explains the original code. We simply want to get the numeric part of this path and convert it to an integer.