cloudmesh_client.shell package¶
Subpackages¶
- cloudmesh_client.shell.plugins package
- Submodules
- cloudmesh_client.shell.plugins.AkeyCommand module
- cloudmesh_client.shell.plugins.Bar module
- cloudmesh_client.shell.plugins.CheckCommand module
- cloudmesh_client.shell.plugins.CloudCommand module
- cloudmesh_client.shell.plugins.ClusterCommand module
- cloudmesh_client.shell.plugins.ClusterCommand2 module
- cloudmesh_client.shell.plugins.ColorCommand module
- cloudmesh_client.shell.plugins.CometCommand module
- cloudmesh_client.shell.plugins.DebugCommand module
- cloudmesh_client.shell.plugins.DefaultCommand module
- cloudmesh_client.shell.plugins.DeployCommand module
- cloudmesh_client.shell.plugins.FlavorCommand module
- cloudmesh_client.shell.plugins.GroupCommand module
- cloudmesh_client.shell.plugins.HadoopCommand module
- cloudmesh_client.shell.plugins.HpcCommand module
- cloudmesh_client.shell.plugins.ImageCommand module
- cloudmesh_client.shell.plugins.InfoCommand module
- cloudmesh_client.shell.plugins.InventoryCommand module
- cloudmesh_client.shell.plugins.KeyCommand module
- cloudmesh_client.shell.plugins.LauncherCommand module
- cloudmesh_client.shell.plugins.LimitsCommand module
- cloudmesh_client.shell.plugins.ListCommand module
- cloudmesh_client.shell.plugins.LoadCommand module
- cloudmesh_client.shell.plugins.LogLevelCommand module
- cloudmesh_client.shell.plugins.ManCommand module
- cloudmesh_client.shell.plugins.NetworkCommand module
- cloudmesh_client.shell.plugins.NistCommand module
- cloudmesh_client.shell.plugins.NovaCommand module
- cloudmesh_client.shell.plugins.OpenCommand module
- cloudmesh_client.shell.plugins.PortalCommand module
- cloudmesh_client.shell.plugins.PyCommand module
- cloudmesh_client.shell.plugins.QuotaCommand module
- cloudmesh_client.shell.plugins.RefreshCommand module
- cloudmesh_client.shell.plugins.RegisterCommand module
- cloudmesh_client.shell.plugins.ReservationCommand module
- cloudmesh_client.shell.plugins.ResetCommand module
- cloudmesh_client.shell.plugins.SecgroupCommand module
- cloudmesh_client.shell.plugins.SecureShellCommand module
- cloudmesh_client.shell.plugins.SelectCommand module
- cloudmesh_client.shell.plugins.ServerCommand module
- cloudmesh_client.shell.plugins.SetupCommand module
- cloudmesh_client.shell.plugins.StackCommand module
- cloudmesh_client.shell.plugins.SubmitCommands module
- cloudmesh_client.shell.plugins.SyncCommand module
- cloudmesh_client.shell.plugins.TerminalCommands module
- cloudmesh_client.shell.plugins.TestCommand module
- cloudmesh_client.shell.plugins.TimerCommand module
- cloudmesh_client.shell.plugins.UsageCommand module
- cloudmesh_client.shell.plugins.VcCommand module
- cloudmesh_client.shell.plugins.VmCommand module
- cloudmesh_client.shell.plugins.WhoCommand module
- cloudmesh_client.shell.plugins.WorkflowCommand module
- Module contents
Submodules¶
cloudmesh_client.shell.cm module¶
-
class
cloudmesh_client.shell.cm.
CloudmeshConsole
(context)[source]¶ Bases:
cmd.Cmd
,cloudmesh_client.shell.cm.CommandProxyClass
-
do_exec
(filename)[source]¶ Usage: exec FILENAME executes the commands in the file. See also the script command. Arguments: FILENAME The name of the file
-
do_h
(instance, args)¶ - Usage:
- history history list history last history ID
-
do_help
(arg)[source]¶ Usage: help help COMMAND Description: List available commands with "help" or detailed help with "help COMMAND".
-
do_history
(instance, args)¶ - Usage:
- history history list history last history ID
-
do_q
(args)¶ Usage: quit Description: Action to be performed whne quit is typed
-
do_shell
(instance, args)¶ - Usage:
- shell ARGUMENTS…
- Description:
- Executes a shell command
-
do_var
(instance, args)¶ - Usage:
- var list var delete NAMES var NAME=VALUE var NAME
- Arguments:
- NAME Name of the variable NAMES Names of the variable separated by spaces VALUE VALUE to be assigned
special vars date and time are defined
-
do_version
(instance, args)¶ - Usage:
- version [–format=FORMAT] [–check=CHECK]
- Options:
--format=FORMAT the format to print the versions in [default: table] --check=CHECK boolean tp conduct an additional check [default: True] - Description:
- Prints out the version number
-
onecmd
(line)[source]¶ Interpret the argument as though it had been typed in response to the prompt.
This may be overridden, but should not normally need to be; see the precmd() and postcmd() methods for useful execution hooks. The return value is a flag indicating whether interpretation of commands by the interpreter should stop.
-
-
cloudmesh_client.shell.cm.
PluginCommandClasses
¶ # not yet implemented class ConsoleClasses(object):
def __init__(self, *command_classes):
classes = [] for c in command_classes:
classes.append(PluginCommand.__subclasses__())print (classes)
- PluginCommandClasses = type(
- ‘CommandProxyClass’, tuple(classes), {})
return PluginCommandClasses
alias of
CommandProxyClass
-
cloudmesh_client.shell.cm.
main
()[source]¶ - Usage:
- cm –help cm [–echo] [–debug] [–nosplash] [-i] [COMMAND …]
- Arguments:
- COMMAND A command to be executed
- Options:
--file=SCRIPT -f SCRIPT Executes the script -i After start keep the shell interactive, otherwise quit [default: False] --nosplash do not show the banner [default: False]
cloudmesh_client.shell.cm_shell_status module¶
-
class
cloudmesh_client.shell.cm_shell_status.
cm_shell_status
(context)[source]¶ Bases:
cloudmesh_client.shell.command.PluginCommand
,cloudmesh_client.shell.command.ShellPluginCommand
-
do_status
(instance, args)¶ Usage: status status db status CLOUDS... Arguments: Options:
-
topics
= {'status': 'cloud'}¶
-
cloudmesh_client.shell.command module¶
-
cloudmesh_client.shell.command.
command
(func)[source]¶ A decorator to create a function with docopt arguments. It also generates a help function
@command def do_myfunc(self, args):
“”” docopts text “”” passwill create
- def do_myfunc(self, args, arguments):
- “”” docopts text “”” …
- def help_myfunc(self, args, arguments):
- … prints the docopt text …
Parameters: func – the function for the decorator
cloudmesh_client.shell.console module¶
-
class
cloudmesh_client.shell.console.
Console
[source]¶ Bases:
object
A simple way to print in a console terminal in color. Instead of using simply the print statement you can use special methods to indicate warnings, errors, ok and regular messages.
Example Usage:
Console.warning("Warning") Console.error("Error") Console.info("Info") Console.msg("msg") Console.ok("Success")
One can swith the color mode off with:
Console.color = False Console.error("Error")
The color will be switched on by default.
-
color
= True¶
-
debug
= True¶
-
theme
= {'OKBLUE': '\x1b[34m', 'OKGREEN': '\x1b[32m', 'BOLD': '\x1b[1m', 'HEADER': '\x1b[35m', 'ENDC': '\x1b[0m', 'BLACK': '\x1b[30m', 'FAIL': '\x1b[31m', 'CYAN': '\x1b[36m', 'WHITE': '\x1b[37m', 'RED': '\x1b[31m', 'BLUE': '\x1b[34m', 'WARNING': '\x1b[35m', 'GREEN': '\x1b[32m'}¶
-
theme_bw
= {'OKBLUE': '', 'OKGREEN': '', 'BOLD': '', 'HEADER': '', 'ENDC': '', 'BLACK': '', 'FAIL': '', 'CYAN': '', 'WHITE': '', 'RED': '', 'BLUE': '', 'WARNING': '', 'GREEN': ''}¶
-
theme_color
= {'OKBLUE': '\x1b[34m', 'OKGREEN': '\x1b[32m', 'BOLD': '\x1b[1m', 'HEADER': '\x1b[35m', 'ENDC': '\x1b[0m', 'BLACK': '\x1b[30m', 'FAIL': '\x1b[31m', 'CYAN': '\x1b[36m', 'WHITE': '\x1b[37m', 'RED': '\x1b[31m', 'BLUE': '\x1b[34m', 'WARNING': '\x1b[35m', 'GREEN': '\x1b[32m'}¶
-