def _ensure_content_type():
    from django.contrib.contenttypes.models import ContentType
    try:
        row = ContentType.objects.get(app_label=PERM_APP_NAME)
    except ContentType.DoesNotExist:
        row = ContentType(name=PERM_APP_NAME, app_label=PERM_APP_NAME, model=PERM_APP_NAME)
        row.save()
    return row.id
Destroy VBD from host database.
dataset/ETHPy150Open wuher/devil/devil/perm/management.py/_ensure_content_type--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/xenapi/vm_utils.py/destroy_vbd