Commit graph

128 commits

Author SHA1 Message Date
Benjamin Renard 6adcc1eeed SFTP client: add missing connect() call in get_file and open_file methods
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-30 14:46:43 +02:00
Benjamin Renard e858cb3d71 SFTP client: add missing docstrings
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-30 14:36:51 +02:00
Benjamin Renard 54d6c6e0f3 SFTP client: add get_file and open_file methods
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-06-30 14:34:25 +02:00
Benjamin Renard 9511b31a79 Add SFTP client
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-06-28 11:05:43 +02:00
Benjamin Renard b80cc3b3b6 Fix typo
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-23 18:56:58 +02:00
Benjamin Renard f541630a63 ldap: code cleaning / fix pylint/flake8 warnings
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-06-23 18:38:21 +02:00
Benjamin Renard 2bc9964b12 ldap.LdapServer: Add encode/decode helpers and parameters 2022-06-23 18:34:48 +02:00
Benjamin Renard fe3e3ed5f4 ldap: fix DN spliting/escaping problems
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2022-06-07 12:40:53 +02:00
Benjamin Renard cbb97ae726 LdapClient.update_need: fix handling None changes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-06-01 18:46:37 +02:00
Benjamin Renard 025fd12dc4 ldap: add parameter to disable SSL certificate check 2022-06-01 18:46:08 +02:00
Benjamin Renard e8de509346 Report: add methods to attach file/payload
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-05-27 19:59:47 +02:00
Benjamin Renard 5a7a46355c LdapClient.update_object: do not modify the provided changes parameter in case of renaming 2022-05-27 19:54:03 +02:00
Benjamin Renard a36ce4070b LdapClient.add_object: ignore 'dn' attribute if provided 2022-05-27 19:52:59 +02:00
Benjamin Renard be80b1ed8c report: make Report compatible with mylib.config.Config
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-05-27 17:09:51 +02:00
Benjamin Renard 6ac1216ed8 LdapClient: improve just-try mode detection
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-05-27 15:29:16 +02:00
Benjamin Renard 5f0527f0c3 config: add get_option() method 2022-05-27 15:15:34 +02:00
Benjamin Renard ade97bc90f LdapClient: init cache in __init__ method and reset it during initialization
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fix cache sharing problem when multiple clients are used on same soft
2022-05-27 14:11:40 +02:00
Benjamin Renard e7e07a944a LdapClient: replace private __get_option method by protected _get_option
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
To make call by inherited class object easier.
2022-05-27 12:53:11 +02:00
Benjamin Renard 3bf87222fd config: start adding support of multiline values
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2022-05-13 14:47:01 +02:00
Benjamin Renard bca3f4f347 config.BooleanOption: fix handling argparse options
The argparse option now reverse the default value set in configuration 
file instead of only the default value set on adding the configuration 
option.
2022-04-21 14:16:30 +02:00
Benjamin Renard 0a0fae3e90 Add TelltaleFile helper class 2022-04-12 12:59:20 +02:00
Benjamin Renard 63600416b3 config: use a section to configure console logging 2022-02-24 17:03:12 +01:00
Benjamin Renard ef94c6969f config: fix console logged message format 2022-02-24 12:33:24 +01:00
Benjamin Renard 9a89638e54 Code cleaning 2022-01-20 19:14:16 +01:00
Benjamin Renard b90994037a config.Config: add constructor parameter default_config_dirpath 2022-01-20 19:11:51 +01:00
Benjamin Renard c851e7aca7 config: fix save method when file exists and is writeable but not the directory 2022-01-19 19:17:32 +01:00
Benjamin Renard 5a30541917 Add mylib-test-email-with-config script 2022-01-19 17:31:55 +01:00
Benjamin Renard fdf68a8ee2 email: make EmailClient compatible with mylib.mylib.Config 2022-01-19 17:31:00 +01:00
Benjamin Renard ba4e85be50 config: add ConfigurableObject object class 2022-01-19 17:26:47 +01:00
Benjamin Renard 0823353c0a config: Fix configuration interactive mode 2022-01-19 17:20:53 +01:00
Benjamin Renard 558da5c815 ldap.LdapClient: add update_need method 2021-12-08 18:19:37 +01:00
Benjamin Renard 26e7b8efd1 ldap.LdapClient: fix errors handling changes on RDN attribute 2021-12-08 18:19:10 +01:00
Benjamin Renard 947ed765aa ldap.LdapClient: make get_attr case-insensitive on attribute name 2021-12-08 16:58:58 +01:00
Benjamin Renard 4d4e8f133b Fix some pylint warnings 2021-11-23 13:08:44 +01:00
Benjamin Renard 31b994ad3c PgDB: add exit_on_error parameter to connect method 2021-11-23 13:08:24 +01:00
Benjamin Renard 8e4864f2d5 OracleDB: add exit_on_error parameter to connect method 2021-11-23 13:03:55 +01:00
Benjamin Renard d15c4f36fb Config: add configure method
This method is an entry point of a script you could use to created your 
configuration file.

Note: make sure to load to define all your configuration section and 
options
before running it.
2021-11-23 13:02:12 +01:00
Benjamin Renard 6601891f9d config: add ask_values and execute_callback parameters to parse_arguments_options 2021-11-23 12:35:40 +01:00
Benjamin Renard 2e829c4cc3 config: add ask_values method that allowing interactive configuration 2021-11-23 12:34:50 +01:00
Benjamin Renard e058d315d4 config: BaseOption.set now also set parser option value 2021-11-23 12:31:33 +01:00
Benjamin Renard 8438f95e68 Config: Add config_file_env_variable parameter
The new config_file_env_variable parameter allow to specify environment
variable name that will be used to determine configuration file path if
it's not explicitly provided using -c/--config parameter.
2021-11-19 16:16:46 +01:00
Benjamin Renard e6ce412db0 Config: Implement custom argparse TextHelpFormatter to keep line return 2021-11-19 16:13:36 +01:00
Benjamin Renard 9c35ead28e PgDB: add debug of SQL query in doSQL & doSelect methods 2021-11-19 11:53:30 +01:00
Benjamin Renard ef510a36ee OracleDB: add debug of SQL query in doSQL & doSelect methods 2021-11-19 11:52:50 +01:00
Benjamin Renard 366260e92a Config.get_arguments_parser: allow to override argparse description 2021-11-18 21:20:53 +01:00
Benjamin Renard afdb1430a6 Fix/improve pretty_format* helpers 2021-11-18 19:56:51 +01:00
Benjamin Renard b7a576eb52 PgDB: add INFO log message on server connection 2021-11-18 19:56:18 +01:00
Benjamin Renard 5acbdbe8e3 OracleDB: add INFO log message on server connection 2021-11-18 19:56:07 +01:00
Benjamin Renard 4691ba7386 config: Add -C/--console parameter 2021-11-18 19:55:44 +01:00
Benjamin Renard f8225bfbc9 OracleDB: Add format_param method 2021-11-18 19:21:43 +01:00
Benjamin Renard 6c7f3e4871 PgDB: Add format_param method 2021-11-18 19:21:27 +01:00
Benjamin Renard 0eda55f11c OracleDB.select: add support for orderby clause specify by tuple 2021-11-18 12:43:02 +01:00
Benjamin Renard 48c1fb085e OracleDB.truncate: fix SQL query (TABLE word needed) 2021-11-18 12:34:30 +01:00
Benjamin Renard bfccaa0945 PgDB.select: add support for orderby clause specify by tuple 2021-11-18 12:25:17 +01:00
Benjamin Renard 7b1019cb1b Add oracle lib
Based on mylib.pgsql.PgDB exiting lib and cx_Oracle, 
mylib.oracle.OracleDB provide an easy way to execute simple SQL query on 
an Oracle Database server.
2021-11-07 22:00:21 +01:00
Benjamin Renard c77f9e5674 PgSQL: fix quoting table name with schema prefix 2021-11-07 21:57:00 +01:00
Benjamin Renard 6b825813c1 PgSQL: code cleaning 2021-11-07 21:37:18 +01:00
Benjamin Renard 94ed2e50fd config.BooleanOption: change default argument name to add enable/disable 2021-11-06 15:15:03 +01:00
Benjamin Renard f8d78f6fe2 config.BaseOption: add no_arg parameter 2021-11-06 15:14:06 +01:00
Benjamin Renard 73c19816f7 LdapClient: add support to config lib 2021-11-03 17:41:15 +01:00
Benjamin Renard dc0f17dd20 Add config lib 2021-11-03 17:38:31 +01:00
Benjamin Renard 9d611284ef PgDB._add_where_clauses: Fix handling fields already in params 2021-11-03 17:04:58 +01:00
Benjamin Renard afe54819bb Improve PgDB class and add unit tests 2021-10-06 21:33:25 +02:00
Benjamin Renard 4ff38aa898 Add LdapClient.format_changes() method 2021-07-12 13:37:41 +02:00
Benjamin Renard 21bd45ad25 PgDB: add possibility to provide query parameters on doSelect() 2021-07-12 12:18:38 +02:00
Benjamin Renard 6e778a8691 PgDB: fix connect() return and improve logging 2021-07-12 12:18:29 +02:00
Benjamin Renard 51dd4f5724 mylib.script.helpers: move email stuff import to helper function to avoid global requirement 2021-06-23 12:59:48 +02:00
Benjamin Renard b9ba720798 LdapClient: fix get_object_by_dn() and get_object_by_dn() methods when populate cache method return no objects 2021-06-03 12:26:19 +02:00
Benjamin Renard 6e85515420 Add missing __init__.py file for mylib.scripts 2021-06-02 19:16:11 +02:00
Benjamin Renard a325803130 Add LdapClient 2021-06-02 18:59:09 +02:00
Benjamin Renard 1cd9432e25 email options: remove short options to avoid conflict 2021-05-26 15:13:15 +02:00
Benjamin Renard 5bdfc8479d Fix some pylint warnings 2021-05-26 14:44:30 +02:00
Benjamin Renard b2d33e3ddf mylib.scripts.helpers: add possibility to specify config dict to handle default option values 2021-05-26 14:44:15 +02:00
Benjamin Renard 51a4d35823 Add some pretty formating helper functions 2021-05-26 11:56:45 +02:00
Benjamin Renard 45f088fa2b scripts.helpers: improve get_opts_parser() 2021-05-26 11:56:02 +02:00
Benjamin Renard f44006535b ldap: format_date & parse_date: consider naive date as default 2021-05-26 11:55:16 +02:00
Benjamin Renard 6bbacce38a Code cleaning 2021-05-19 19:19:57 +02:00
Benjamin Renard bd4845f780 Switch to module style lib, make python3 compatibility and clean code 2021-05-19 18:07:42 +02:00