def ec2_id_to_id(ec2_id):
    try:
        return int(ec2_id.split('-')[-1], 16)
    except ValueError:
        raise exception.InvalidEc2Id(ec2_id=ec2_id)
Convert an ec2 ID (i-[base 16 number]) to an instance id (int)
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/ec2/ec2utils.py/ec2_id_to_id