# Path: tests/utilities.py
# def load_config(config_file):
#     if not os.path.isfile(config_file):
#         pytest.skip("Please create configuration file %s!" % config_file)
# 
#     try:
#         with open(config_file, "r") as json_file:
#             return json.load(json_file)
#     except IOError as err:
#         pytest.skip("Unable to read configuration file: '%s'", err)


import logging
import pytest
from .utilities import load_config



@pytest.fixture
def nonexisting_vm():
    return "giertz.pinkepank.loc"


@pytest.fixture
def snapshot_name(virtualisation):
    if virtualisation == 'libvirt':
        return "LibvirtClientTest"
    elif virtualisation == 'pyvmomi':
        return "PyvmomiClientTest"


@pytest.fixture(params=['libvirt', 'pyvmomi'])
def virtualisation(request):
    return request.param


@pytest.fixture
def virtConfigFile(virtualisation):
    if virtualisation == 'libvirt':
        return "libvirt_config.json"
    elif virtualisation == 'pyvmomi':
        return "pyvmomi_config.json"


@pytest.fixture

# Path: tests/utilities.py
# def load_config(config_file):
#     if not os.path.isfile(config_file):
#         pytest.skip("Please create configuration file %s!" % config_file)
# 
#     try:
#         with open(config_file, "r") as json_file:
#             return json.load(json_file)
#     except IOError as err:
#         pytest.skip("Unable to read configuration file: '%s'", err)


# Path: tests/conftest.py
import logging
import pytest
from .utilities import load_config




@pytest.fixture
def nonexisting_vm():
    return "giertz.pinkepank.loc"


@pytest.fixture
def snapshot_name(virtualisation):
    if virtualisation == 'libvirt':
        return "LibvirtClientTest"
    elif virtualisation == 'pyvmomi':
        return "PyvmomiClientTest"


@pytest.fixture(params=['libvirt', 'pyvmomi'])
def virtualisation(request):
    return request.param


@pytest.fixture
def virtConfigFile(virtualisation):
    if virtualisation == 'libvirt':
        return "libvirt_config.json"
    elif virtualisation == 'pyvmomi':
        return "pyvmomi_config.json"


@pytest.fixture

def virtConfig(virtConfigFile):