mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
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:
@@ -72,7 +72,7 @@ from ansible.errors import AnsibleParserError, AnsibleOptionsError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.config.manager import ensure_type
|
||||
|
||||
from ..module_utils.tower_api import TowerModule
|
||||
from ..module_utils.tower_api import TowerAPIModule
|
||||
|
||||
|
||||
def handle_error(**kwargs):
|
||||
@@ -104,12 +104,12 @@ class InventoryModule(BaseInventoryPlugin):
|
||||
|
||||
# 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
|
||||
|
||||
module = TowerModule(
|
||||
module = TowerAPIModule(
|
||||
argument_spec={}, direct_params=module_params,
|
||||
error_callback=handle_error, warn_callback=self.warn_callback
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user