-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Moved counter for checking handler classes to outside the condition (#104) * Add recursive checking when creating a destination directory (#105) * 106 unexplained errors deleting gpg keystore after decryption (#107) * Move exception print statement earlier to avoid confusing log messages. Check for directories before trying to delete them. * Upate changelog * Add way to enable host key validation for SSH/SFTP (#108) * bump version v24.37.2 -> v24.42.0
- Loading branch information
1 parent
5c3da8d
commit 3331e11
Showing
20 changed files
with
393 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" | |
|
||
[project] | ||
name = "opentaskpy" | ||
version = "v24.37.2" | ||
version = "v24.42.0" | ||
authors = [{ name = "Adam McDonagh", email = "[email protected]" }] | ||
license = { text = "GPLv3" } | ||
classifiers = [ | ||
|
@@ -71,7 +71,7 @@ otf-batch-validator = "opentaskpy.cli.batch_validator:main" | |
profile = 'black' | ||
|
||
[tool.bumpver] | ||
current_version = "v24.37.2" | ||
current_version = "v24.42.0" | ||
version_pattern = "vYY.WW.PATCH[-TAG]" | ||
commit_message = "bump version {old_version} -> {new_version}" | ||
commit = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Utility functions for SSH.""" | ||
|
||
from logging import Logger | ||
|
||
from paramiko import AutoAddPolicy, SSHClient | ||
|
||
|
||
def setup_host_key_validation(client: SSHClient, spec: dict, logger: Logger) -> None: | ||
"""Set up host key validation for an SSH client. | ||
Args: | ||
client (SSHClient): The SSH client to set up. | ||
spec (dict): The spec for the SSH connection. | ||
logger (logging.Logger): The logger to use. | ||
""" | ||
logger.info("Loading system host keys") | ||
client.load_system_host_keys() | ||
|
||
if ( | ||
"hostKeyValidation" in spec["protocol"] | ||
and spec["protocol"]["hostKeyValidation"] | ||
): | ||
if "knownHostsFile" in spec["protocol"]: | ||
host_key = spec["protocol"]["knownHostsFile"] | ||
logger.info(f"Loading host keys from {host_key}") | ||
client.load_host_keys(host_key) | ||
else: | ||
client.set_missing_host_key_policy(AutoAddPolicy()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type": "transfer", | ||
"source": { | ||
"hostname": "127.0.0.1", | ||
"directory": "/home/application/testFiles/src", | ||
"fileRegex": ".*\\.txt", | ||
"protocol": { | ||
"name": "sftp", | ||
"port": 1234, | ||
"credentials": { | ||
"username": "{{ SSH_USERNAME }}" | ||
} | ||
} | ||
}, | ||
"destination": [ | ||
{ | ||
"hostname": "{{ HOST_D }}", | ||
"directory": "/home/application/testFiles/dest", | ||
"protocol": { | ||
"name": "sftp", | ||
"credentials": { | ||
"username": "{{ SSH_USERNAME }}" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.