def main(args=None): CoreServices.setup() # inject existing libraries. # because of that all the ansible modules should be imported after that CoreServices.dependency_manager().inject_libraries() specs_manager = api.SpecManager() # Init Managers specs_manager.register_spec( WorkspaceManagerSpec('workspace', description="Workspace manager. " "Allows to create and use an " "isolated environment for plugins " "execution.")) specs_manager.register_spec( PluginManagerSpec('plugin', description="Plugin management")) specs_manager.register_spec( SSHSpec('ssh', description="Interactive ssh session to node from inventory.")) # register all plugins for plugin in CoreServices.plugins_manager().PLUGINS_DICT.values(): specs_manager.register_spec(api.InfraredPluginsSpec(plugin)) argcomplete.autocomplete(specs_manager.parser) return specs_manager.run_specs(args) or 0
def main(args=None): CoreServices.setup() # inject ansible config file CoreServices.ansible_config_manager().inject_config() specs_manager = api.SpecManager() # Init Managers specs_manager.register_spec( WorkspaceManagerSpec('workspace', description="Workspace manager. " "Allows to create and use an " "isolated environment for plugins " "execution.")) specs_manager.register_spec( PluginManagerSpec('plugin', description="Plugin management")) specs_manager.register_spec( SSHSpec('ssh', description="Interactive ssh session to node from inventory.")) # register all plugins for plugin in CoreServices.plugins_manager().PLUGINS_DICT.values(): specs_manager.register_spec(api.InfraredPluginsSpec(plugin)) argcomplete.autocomplete(specs_manager.parser) return specs_manager.run_specs(args) or 0
def main(args=None): # configure core services CoreServices.setup('infrared.cfg') # Init Managers plugin_manager = CoreServices.plugins_manager() specs_manager = api.SpecManager() specs_manager.register_spec( WorkspaceManagerSpec('workspace', description="Workspace manager. " "Allows to create and use an " "isolated environment for plugins " "execution.")) specs_manager.register_spec( PluginManagerSpec('plugin', plugin_manager=plugin_manager, description="Plugin management")) specs_manager.register_spec( SSHSpec('ssh', description="Interactive ssh session to node from inventory.")) # register all plugins for plugin in plugin_manager.PLUGINS_DICT.values(): specs_manager.register_spec(api.InfraredPluginsSpec(plugin)) return specs_manager.run_specs(args) or 0