# Path: vspheretools/VSphereTools.py
# def Version(onlyPrint=False):
# def ParseArgsMain():
# def TeamCityParamSetter(keyName, value):
#     def __init__(self):
#     def VMStatus(self):
#     def VMStart(self):
#     def VMStartWait(self):
#     def VMStop(self):
#     def GetVMProperties(self):
#     def GetVMSnapshotsList(self):
#     def CreateVMSnapshot(self, **kwargs):
#     def GetVMIPaddress(self):
#     def SetVMIPaddressIntoTeamCityParameter(self, paramName):
#     def VMRevertToCurrentSnapshot(self):
#     def VMRevertToSnapshot(self, snapshotName=None):
#     def CloneVM(self, cloneName=None):
#     def DeleteVM(self):
#     def CopyFileIntoVM(self, srcFile=None, dstFile=None, overwrite=False):
#     def CopyFileFromVM(self, srcFile=None, dstFile=None, overwrite=False):
#     def MakeDirectoryOnVM(self, dirPath=None, createSubDirs=True):
#     def MonitoringProcessOnVM(self, pID, remoteLogFile=None):
#     def ExecuteProgramOnVM(self, **kwargs):
# def Main():
# VC_SERVER = r""  # e.g. vcenter-01.example.com
# VC_LOGIN = r""  # login to Sphere
# VC_PASSWORD = r""  # password to Sphere
# VM_NAME = r""  # name of virtual machine
# VM_GUEST_LOGIN = r""  # login to VM guest OS
# VM_GUEST_PASSWORD = r""  # password to VM guest
# VM_CLONES_DIR = "Clones"  # directory for cloning vm
# OP_TIMEOUT = 300  # operations timeout in seconds
#         VC_SERVER = args.server
#         VC_LOGIN = args.login
#         VC_PASSWORD = args.password
#         VM_NAME = args.name
#         VM_GUEST_LOGIN = args.guest_login
#         VM_GUEST_PASSWORD = args.guest_password
#         VM_CLONES_DIR = args.clone_dir
#         OP_TIMEOUT = int(args.timeout)
# class Sphere():


import pytest
from vspheretools import VSphereTools
        # TODO: How to check this method if status == 'POWERED ON'?
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile=None, dstFile=None, overwrite=False)
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile=None, dstFile=None, overwrite=True)
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile='SOMEPATH', dstFile='SOMEPATH', overwrite=False)
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile='SOMEPATH', dstFile='SOMEPATH', overwrite=True)

    def test_MakeDirectoryOnVM(self):
        sphere = VSphereTools.Sphere()
        # TODO: How to check this method if status == 'POWERED ON'?
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath=None, createSubDirs=True)
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath=None, createSubDirs=False)
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath='SOMEDIR', createSubDirs=True)
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath='SOMEDIR', createSubDirs=True)

    def test_MonitoringProcessOnVM(self):
        sphere = VSphereTools.Sphere()
        assert sphere.MonitoringProcessOnVM(pID=None, remoteLogFile=None) == -1  # -1 because state is 'POWERED OFF'
        assert sphere.MonitoringProcessOnVM(pID=None, remoteLogFile='SOMEFILE') == -1
        assert sphere.MonitoringProcessOnVM(pID=123, remoteLogFile=None) == -1
        assert sphere.MonitoringProcessOnVM(pID=123, remoteLogFile='SOMEFILE') == -1

    def test_ExecuteProgramOnVM(self):

# Path: vspheretools/VSphereTools.py
# def Version(onlyPrint=False):
# def ParseArgsMain():
# def TeamCityParamSetter(keyName, value):
#     def __init__(self):
#     def VMStatus(self):
#     def VMStart(self):
#     def VMStartWait(self):
#     def VMStop(self):
#     def GetVMProperties(self):
#     def GetVMSnapshotsList(self):
#     def CreateVMSnapshot(self, **kwargs):
#     def GetVMIPaddress(self):
#     def SetVMIPaddressIntoTeamCityParameter(self, paramName):
#     def VMRevertToCurrentSnapshot(self):
#     def VMRevertToSnapshot(self, snapshotName=None):
#     def CloneVM(self, cloneName=None):
#     def DeleteVM(self):
#     def CopyFileIntoVM(self, srcFile=None, dstFile=None, overwrite=False):
#     def CopyFileFromVM(self, srcFile=None, dstFile=None, overwrite=False):
#     def MakeDirectoryOnVM(self, dirPath=None, createSubDirs=True):
#     def MonitoringProcessOnVM(self, pID, remoteLogFile=None):
#     def ExecuteProgramOnVM(self, **kwargs):
# def Main():
# VC_SERVER = r""  # e.g. vcenter-01.example.com
# VC_LOGIN = r""  # login to Sphere
# VC_PASSWORD = r""  # password to Sphere
# VM_NAME = r""  # name of virtual machine
# VM_GUEST_LOGIN = r""  # login to VM guest OS
# VM_GUEST_PASSWORD = r""  # password to VM guest
# VM_CLONES_DIR = "Clones"  # directory for cloning vm
# OP_TIMEOUT = 300  # operations timeout in seconds
#         VC_SERVER = args.server
#         VC_LOGIN = args.login
#         VC_PASSWORD = args.password
#         VM_NAME = args.name
#         VM_GUEST_LOGIN = args.guest_login
#         VM_GUEST_PASSWORD = args.guest_password
#         VM_CLONES_DIR = args.clone_dir
#         OP_TIMEOUT = int(args.timeout)
# class Sphere():


# Path: tests/test_vspheretools.py
import pytest
from vspheretools import VSphereTools

        # TODO: How to check this method if status == 'POWERED ON'?
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile=None, dstFile=None, overwrite=False)
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile=None, dstFile=None, overwrite=True)
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile='SOMEPATH', dstFile='SOMEPATH', overwrite=False)
        with pytest.raises(Exception):
            sphere.CopyFileFromVM(srcFile='SOMEPATH', dstFile='SOMEPATH', overwrite=True)

    def test_MakeDirectoryOnVM(self):
        sphere = VSphereTools.Sphere()
        # TODO: How to check this method if status == 'POWERED ON'?
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath=None, createSubDirs=True)
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath=None, createSubDirs=False)
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath='SOMEDIR', createSubDirs=True)
        with pytest.raises(Exception):
            sphere.MakeDirectoryOnVM(dirPath='SOMEDIR', createSubDirs=True)

    def test_MonitoringProcessOnVM(self):
        sphere = VSphereTools.Sphere()
        assert sphere.MonitoringProcessOnVM(pID=None, remoteLogFile=None) == -1  # -1 because state is 'POWERED OFF'
        assert sphere.MonitoringProcessOnVM(pID=None, remoteLogFile='SOMEFILE') == -1
        assert sphere.MonitoringProcessOnVM(pID=123, remoteLogFile=None) == -1
        assert sphere.MonitoringProcessOnVM(pID=123, remoteLogFile='SOMEFILE') == -1

    def test_ExecuteProgramOnVM(self):

        sphere = VSphereTools.Sphere()