From d0f728db0269e1549649a5b189541a2ea8765ced Mon Sep 17 00:00:00 2001 From: igoro1975 Date: Thu, 10 Aug 2017 15:10:28 +0300 Subject: [PATCH 1/6] Output parameter fix. True if does not exist. --- .../cloudshell/cm/customscript/domain/script_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') From 077bc9c3c0cd94a45d58d1b65bf287bbc19ed96f Mon Sep 17 00:00:00 2001 From: igoro1975 Date: Thu, 10 Aug 2017 15:14:26 +0300 Subject: [PATCH 2/6] Version updated to 1.2.1 --- drivers/version.txt | 2 +- package/version.txt | 2 +- version.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/version.txt b/drivers/version.txt index 867e524..cb174d5 100644 --- a/drivers/version.txt +++ b/drivers/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.2.1 \ No newline at end of file diff --git a/package/version.txt b/package/version.txt index 867e524..cb174d5 100644 --- a/package/version.txt +++ b/package/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.2.1 \ No newline at end of file diff --git a/version.txt b/version.txt index 867e524..cb174d5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.2.1 \ No newline at end of file From c524604a2580461adf6f0da45479a6bf47e3addf Mon Sep 17 00:00:00 2001 From: asafc64 Date: Thu, 7 Sep 2017 09:13:33 +0300 Subject: [PATCH 3/6] Wait on ConnectTimeout error --- .../cm/customscript/domain/windows_script_executor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 From ed3e31f9e2c1e3aab562e52c2ec04ff638147d2a Mon Sep 17 00:00:00 2001 From: noamwegner Date: Sun, 26 Nov 2017 14:55:55 +0200 Subject: [PATCH 4/6] upgraded cloudshell-shell-core which supports https. --- .travis.yml | 5 +++-- drivers/customscript_shell/requirements.txt | 2 +- kill_python.bat | 4 ++++ package/requirements.txt | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 kill_python.bat diff --git a/.travis.yml b/.travis.yml index c2d2cf6..1fe9cb6 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.3.0.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..c63c7bf 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-shell-core>=3.1.0,<3.2.0 cloudshell-cm-customscript>=1.2.0,<1.3.0 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/requirements.txt b/package/requirements.txt index 0e38305..42bbab9 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.3.0.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 From 24114cf329ba75d0861d3ae6c2d17c8032f7abd8 Mon Sep 17 00:00:00 2001 From: noamwegner Date: Tue, 28 Nov 2017 11:53:33 +0200 Subject: [PATCH 5/6] increased version for driver. fixed cloudshell-automation-api requirement to a more correct way from >=8.2.0.0,<8.3.0.0 to >=8.2.0.0,<8.2.1.0 so that we could increase micro version from 8.2.0.100 to 8.2.X.X without the risk of ALL customers updating package. --- .travis.yml | 2 +- drivers/customscript_shell/requirements.txt | 2 +- drivers/version.txt | 2 +- package/requirements.txt | 2 +- package/version.txt | 2 +- version.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1fe9cb6..3829d8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ 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>=3.1.0,<3.2.0" --extra-index-url https://testpypi.python.org/simple - - pip install "cloudshell-automation-api>=8.2.0.0,<8.3.0.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 diff --git a/drivers/customscript_shell/requirements.txt b/drivers/customscript_shell/requirements.txt index c63c7bf..87a9f45 100644 --- a/drivers/customscript_shell/requirements.txt +++ b/drivers/customscript_shell/requirements.txt @@ -1,2 +1,2 @@ cloudshell-shell-core>=3.1.0,<3.2.0 -cloudshell-cm-customscript>=1.2.0,<1.3.0 +cloudshell-cm-customscript>=1.3.1,<1.4.0 diff --git a/drivers/version.txt b/drivers/version.txt index cb174d5..6261a05 100644 --- a/drivers/version.txt +++ b/drivers/version.txt @@ -1 +1 @@ -1.2.1 \ No newline at end of file +1.3.1 \ No newline at end of file diff --git a/package/requirements.txt b/package/requirements.txt index 42bbab9..1cde969 100644 --- a/package/requirements.txt +++ b/package/requirements.txt @@ -1,4 +1,4 @@ -cloudshell-automation-api>=8.2.0.0,<8.3.0.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 diff --git a/package/version.txt b/package/version.txt index cb174d5..6261a05 100644 --- a/package/version.txt +++ b/package/version.txt @@ -1 +1 @@ -1.2.1 \ No newline at end of file +1.3.1 \ No newline at end of file diff --git a/version.txt b/version.txt index cb174d5..6261a05 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.2.1 \ No newline at end of file +1.3.1 \ No newline at end of file From 99c548515d6e4222ef96e0d4d45f67922518151d Mon Sep 17 00:00:00 2001 From: noamwegner Date: Wed, 29 Nov 2017 11:00:13 +0200 Subject: [PATCH 6/6] reset mirco version --- drivers/customscript_shell/requirements.txt | 2 +- drivers/version.txt | 2 +- package/version.txt | 2 +- version.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/customscript_shell/requirements.txt b/drivers/customscript_shell/requirements.txt index 87a9f45..b8dcea7 100644 --- a/drivers/customscript_shell/requirements.txt +++ b/drivers/customscript_shell/requirements.txt @@ -1,2 +1,2 @@ cloudshell-shell-core>=3.1.0,<3.2.0 -cloudshell-cm-customscript>=1.3.1,<1.4.0 +cloudshell-cm-customscript>=1.3.0,<1.4.0 diff --git a/drivers/version.txt b/drivers/version.txt index 6261a05..589268e 100644 --- a/drivers/version.txt +++ b/drivers/version.txt @@ -1 +1 @@ -1.3.1 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/package/version.txt b/package/version.txt index 6261a05..589268e 100644 --- a/package/version.txt +++ b/package/version.txt @@ -1 +1 @@ -1.3.1 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/version.txt b/version.txt index 6261a05..589268e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.3.1 \ No newline at end of file +1.3.0 \ No newline at end of file