Adding import/export awx kit features

Changed library structure

Origional TowerModule becomes TowerLegacyModule

TowerModule from tower_api becomes TowerAPIModule

A real base TowerModule is created in tower_module.py

A new TowerAWXKitModule is created in tower_awxkit

TowerAWXKitModule and TowerAPIModule are child classes of TowerModule
This commit is contained in:
John Westcott IV
2020-08-03 12:09:00 -04:00
parent 383f8aa8f9
commit 40f6741474
41 changed files with 652 additions and 315 deletions

View File

@@ -115,7 +115,7 @@ from ansible.plugins.lookup import LookupBase
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_native
from ansible.utils.display import Display
from ..module_utils.tower_api import TowerModule
from ..module_utils.tower_api import TowerAPIModule
class LookupModule(LookupBase):
@@ -133,13 +133,13 @@ class LookupModule(LookupBase):
# Defer processing of params to logic shared with the modules
module_params = {}
for plugin_param, module_param in TowerModule.short_params.items():
for plugin_param, module_param in TowerAPIModule.short_params.items():
opt_val = self.get_option(plugin_param)
if opt_val is not None:
module_params[module_param] = opt_val
# Create our module
module = TowerModule(
module = TowerAPIModule(
argument_spec={}, direct_params=module_params,
error_callback=self.handle_error, warn_callback=self.warn_callback
)