diff --git a/.travis.yml b/.travis.yml index c2d2cf6..3829d8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,8 @@ python: install: - pip install -r external_requirements.txt --extra-index-url https://pypi.python.org/simple - pip install -r test_requirements.txt --extra-index-url https://pypi.python.org/simple - - pip install "cloudshell-shell-core>=2.2.0,<2.3.0" --extra-index-url https://testpypi.python.org/simple - - pip install "cloudshell-automation-api>=8.0.0.0,<8.1.0.0" --extra-index-url https://testpypi.python.org/simple + - pip install "cloudshell-shell-core>=3.1.0,<3.2.0" --extra-index-url https://testpypi.python.org/simple + - pip install "cloudshell-automation-api>=8.2.0.0,<8.2.1.0" --extra-index-url https://testpypi.python.org/simple script: - pushd package @@ -21,3 +21,4 @@ notifications: email: false #notifications: # webhools: https://qualisystems.getbadges.io/api/app/webhook/{will be added later} + diff --git a/drivers/customscript_shell/requirements.txt b/drivers/customscript_shell/requirements.txt index f71fe6b..b8dcea7 100644 --- a/drivers/customscript_shell/requirements.txt +++ b/drivers/customscript_shell/requirements.txt @@ -1,2 +1,2 @@ -cloudshell-shell-core>=2.2.0,<2.3.0 -cloudshell-cm-customscript>=1.2.0,<1.3.0 +cloudshell-shell-core>=3.1.0,<3.2.0 +cloudshell-cm-customscript>=1.3.0,<1.4.0 diff --git a/drivers/version.txt b/drivers/version.txt index 867e524..589268e 100644 --- a/drivers/version.txt +++ b/drivers/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/kill_python.bat b/kill_python.bat new file mode 100644 index 0000000..49acd5d --- /dev/null +++ b/kill_python.bat @@ -0,0 +1,4 @@ +@echo off +::taskkill /im python.exe /f +wmic Path win32_process Where "CommandLine Like '%%\\ExecutionServer\\%%python.exe%%'" Call Terminate +wmic Path win32_process Where "CommandLine Like '%%\\ProgramData\\QualiSystems\\%%python.exe%%'" Call Terminate \ No newline at end of file diff --git a/package/cloudshell/cm/customscript/domain/script_configuration.py b/package/cloudshell/cm/customscript/domain/script_configuration.py index ca644a1..9f9cfab 100644 --- a/package/cloudshell/cm/customscript/domain/script_configuration.py +++ b/package/cloudshell/cm/customscript/domain/script_configuration.py @@ -53,7 +53,7 @@ def json_to_object(self, json_str): script_conf = ScriptConfiguration() script_conf.timeout_minutes = json_obj.get('timeoutMinutes', 0.0) - script_conf.print_output = bool_parse(json_obj.get('printOutput')) + script_conf.print_output = bool_parse(json_obj.get('printOutput', True)) repo = json_obj['repositoryDetails'] script_conf.script_repo.url = repo.get('url') diff --git a/package/cloudshell/cm/customscript/domain/windows_script_executor.py b/package/cloudshell/cm/customscript/domain/windows_script_executor.py index 179c455..4fdc829 100644 --- a/package/cloudshell/cm/customscript/domain/windows_script_executor.py +++ b/package/cloudshell/cm/customscript/domain/windows_script_executor.py @@ -14,7 +14,7 @@ from cloudshell.cm.customscript.domain.reservation_output_writer import ReservationOutputWriter from cloudshell.cm.customscript.domain.script_configuration import HostConfiguration from cloudshell.cm.customscript.domain.script_executor import IScriptExecutor, ErrorMsg, ExcutorConnectionError -from requests import ConnectionError +from requests import ConnectionError, ConnectTimeout class WindowsScriptExecutor(IScriptExecutor): @@ -39,6 +39,9 @@ def connect(self): uid = str(uuid4()) result = self.session.run_cmd('@echo '+uid) assert uid in result.std_out + except ConnectTimeout as e: + self.logger(e.response) + raise ExcutorConnectionError(10060, e) #10060=Timeout except ConnectionError as e: match = re.search(r'\[Errno (?P\d+)\]', str(e.message)) error_code = int(match.group('errno')) if match else 0 diff --git a/package/requirements.txt b/package/requirements.txt index 0e38305..1cde969 100644 --- a/package/requirements.txt +++ b/package/requirements.txt @@ -1,5 +1,5 @@ -cloudshell-automation-api>=8.0.0.0,<8.1.0.0 -cloudshell-shell-core>=2.2.0,<2.3.0 +cloudshell-automation-api>=8.2.0.0,<8.2.1.0 +cloudshell-shell-core>=3.1.0,<3.2.0 pywinrm>=0.2.2 paramiko>=2.1.1 scpclient>=0.7 \ No newline at end of file diff --git a/package/version.txt b/package/version.txt index 867e524..589268e 100644 --- a/package/version.txt +++ b/package/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/version.txt b/version.txt index 867e524..589268e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file