Skip to content

cm: load command #183

@laszewsk

Description

@laszewsk

in cloudmesh_client.shell.plugins.LoadCommand we propose to implement a load plugin command that can load dynamically plugins into cm at runtime.

Goals:

  • do the plugin at runtime and no restarting of cm is required
  • add loaded modules to the cloudmeh yaml file or the db so that next time cm is started the module is also loaded
  • have the ability to unload modules at runtime (low priority), we could force in this case a restart

Draft yaml

 cloudmesh:
       modules: 
       - cloudmesh_workflow.plugins.WorkflowCommand

Draft Manual

        Usage:
            load list [--format=FORMAT]
            load reset
            load --base=MODULE PLUGINS...
            load --delete --base=MODULE PLUGINS...

            loads a plugins into the cloudmesh command shell


        OPTIONS:
            --base=MODULE  the prefix of the modules [default: cloudmesh_client.shell.plugins]
            --format=FORMAT  the output format

        ARGUMENTS:
           PLUGINS        the list of plugins to be loaded

        Examples:
            cm load list
                lists the plugins currently loaded

            cm load reset
                unloads all plugins that are not part of the standard plugin
                load list

            cm load load workflow graphviz
                loads the modules workflow and graphviz
                the plugins are classes defined with

                    class CheckCommand(PluginCommand, CloudPluginCommand)

                If they are located in a different moduel, the module name can either be
                specified as part of the PLUGIN anem, or if
                 multiple modules are loaded as part of the MODULE parameter

            cm load list --format=csv
                list sthe loaded plugins in csv format

            cm load --delete load workflow graphviz
                the oposite of load

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions