From c5dd215323932b85ba538b87b7d397459716ca2e Mon Sep 17 00:00:00 2001 From: cktricky Date: Thu, 26 Apr 2018 12:59:32 -0400 Subject: [PATCH] we can no longer ignore config.py because it is necessary --- .gitignore | 2 +- modules/config.py | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 modules/config.py diff --git a/.gitignore b/.gitignore index 5ee9a1d..43e60a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ #let's attempt not to check in config.py with keys -config.py +#config.py #weirdAAL.db *.db diff --git a/modules/config.py b/modules/config.py new file mode 100644 index 0000000..892f341 --- /dev/null +++ b/modules/config.py @@ -0,0 +1,25 @@ +''' +Module for interacting with the config service +''' + +from libs.config import * + +def module_config_list_all_rules(): + list_all_config_rules() + +def module_config_list_all_recorders(): + list_all_config_recorders() + +def module_config_delete_rule(*args): + try: + if args[0][0] and args[0][1]: + delete_config_rule(args[0][0], args[0][1]) + except IndexError: + print("You must provide the rule name and region name: -a someRuleName,us-east-1") + +def module_config_delete_recorder(*args): + try: + if args[0][0] and args[0][1]: + delete_config_recorder(args[0][0], args[0][1]) + except IndexError: + print("You must provide the recorder name and region name: -a someRecorderName,us-east-1")