pyats.cli.commands package


class pyats.cli.commands.create.CreateCommand(*args, **kwargs)

Bases: pyats.cli.base.CommandWithSubcommands

SUBCMDS_ENTRYPOINT = 'pyats.cli.commands.create'
SUBCOMMANDS = [<class 'pyats.cli.commands.create.CreateProject'>]
description = '\nCreates script and library components automatically based on your input. These\nare helper functions intended to make your development life easier/reducing\nnumber of boilerplate to-dos.\n\n    '
help = 'create scripts and libraries from template'
name = 'create'
class pyats.cli.commands.create.CreateProject(*args, **kwargs)

Bases: pyats.cli.base.Subcommand

Creates a new pyATS project from cookiecutter template

description = '\n    create a pyATS script from cookiecutter template, located at:\n\n\nRequires Cookiecutter package to be installed to work.\n    '
help = 'create a new pyATS project from template'
name = 'project'

runs this subcommand

pyats.cli.commands.create.string_in(strng, charset)

Bases: pyats.cli.base.Command

The run command is really in its nature, a CommandWithSubcommands class. However - due to limitation of argparse and subparser chaining, when subparsers are involved, the amount of control given to the actual subparser is limited (eg - if the parsers require dynamic configuration).

Most of this is attributed to the fact that the core implementation of cli parsing is based on “parse first, run after”; where as in pluggable parsing designs, two-layer parsing is required (parse configuration first, configure the core parser, then parse again).

Think of the implementation of this command as a a “nested command” instead.


alias of pyats.cli.base.Command

help = 'runs the provided script and output corresponding results.'

internal entrypoint for commands

name = 'run'
standard_logging = False
class pyats.cli.commands.secret.SecretCommand(*args, **kwargs)

Bases: pyats.cli.base.CommandWithSubcommands

Command for working with secret strings.

SUBCMDS_ENTRYPOINT = 'pyats.cli.commands.secret'
help = 'utilities for working with secret strings.'
name = 'secret'
class*args, **kwargs)

Bases: pyats.cli.base.Command

Simple command to enter python shell and load testbed yaml file as testbed variable.

description = "\nEnters typical python interactive shell, setting a global variable named\n'testbed' which contains the loaded testbed YAML file\n    "
help = 'enter Python shell and load a testbed file'
name = 'shell'

api to be implemented by the designer, performs the dirty work your command is designed to do

class pyats.cli.commands.validate.ValidateCommand(*args, **kwargs)

Bases: pyats.cli.base.CommandWithSubcommands

SUBCMDS_ENTRYPOINT = 'pyats.cli.commands.validate'
help = 'utlities that helps to validate input files'
name = 'validate'