'Determine the ovirt authorization settings and return a ovirt_sdk driver.
:rtype : ovirtsdk.api.API'

@staticmethod
def get_ovirt_driver():

    kwargs = {}
    ovirt_ini_default_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ovirt.ini')
    ovirt_ini_path = os.environ.get('OVIRT_INI_PATH', ovirt_ini_default_path)
    config = ConfigParser.SafeConfigParser(defaults={'ovirt_url': '', 'ovirt_username': '', 'ovirt_password': '', 'ovirt_api_secrets': ''})
    if ('ovirt' not in config.sections()):
        config.add_section('ovirt')
    config.read(ovirt_ini_path)
    secrets_path = config.get('ovirt', 'ovirt_api_secrets')
    secrets_found = False
    try:
        import secrets
        kwargs = getattr(secrets, 'OVIRT_KEYWORD_PARAMS', {})
        secrets_found = True
    except ImportError:
        pass
    if ((not secrets_found) and secrets_path):
        if (not secrets_path.endswith('secrets.py')):
            err = 'Must    specify    ovirt_sdk    secrets    file    as    /absolute/path/to/secrets.py'
            print err
            sys.exit(1)
        sys.path.append(os.path.dirname(secrets_path))
        try:
            import secrets
            kwargs = getattr(secrets, 'OVIRT_KEYWORD_PARAMS', {})
        except ImportError:
            pass
    if (not secrets_found):
        kwargs = {'url': config.get('ovirt', 'ovirt_url'), 'username': config.get('ovirt', 'ovirt_username'), 'password': config.get('ovirt', 'ovirt_password')}
    kwargs['url'] = os.environ.get('OVIRT_URL', kwargs['url'])
    kwargs['username'] = next((val for val in [os.environ.get('OVIRT_EMAIL'), os.environ.get('OVIRT_USERNAME'), kwargs['username']] if (val is not None)))
    kwargs['password'] = next((val for val in [os.environ.get('OVIRT_PASS'), os.environ.get('OVIRT_PASSWORD'), kwargs['password']] if (val is not None)))
    return API(insecure=True, **kwargs)
