| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
We want configshell_fb/ to exist so we can more easily do prerelease
development using PYTHONPATH.
Remove package_dir from setup.py since with this change we don't need it
any more.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We have changed the API from Datera configshell, so we should be using
a different package name to eliminate confusion.
Still package under configshell pkg name, but issue a warning to switch.
Change code in shell.py to use relative imports instead of package name.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
| |
Later on in the function, we assume "parameter" is still the dict that
was passed in.
Reported-by: Fabian Deutsch <fdeutsch@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A node named "foo4" will match the regexp in sorting_keys and will sort by
("foo", 4). A node named "foo" will not match and will sort by
("foo", None).
This is incorrect because None is not orderable with integers. In the
second case, having the second element in the tuple be 0 does the
right thing.
Fixes #14
Reported-by: Arthur Lutz
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
Fix ui_command_get() when no parameter is provided
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "get attribute" command displays an error message after the list
of attributes. For instance, in the TPG context, the following error
is displayed:
No parameter 't' in group 'attribute'
This happens because the 'parameter' argument in ui_command_get() is
overwritten in the loop that iterates over the list of parameters to
display their value. This patch fixes the issue by renaming the
variable in the loop so that the value of the original 'parameter'
variable is preserved.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
To follow-on Christophe's previous fix, now that the previous conditional
returns, it's a little easier to follow (IMHO) if the next conditional
is an 'if' instead of an 'elif'.
Also, add an empty line.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
Fix exception raised when 'help' is invoked
|
|/
|
|
| |
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
| |
Arrg. Can't reference self in a default parameter.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
| |
An earlier version of the commit used it, but its use was removed in the
final commit. Whups.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Extend con.display() with an error boolean optional parameter. If true,
output goes to stderr. Is this in log._log() to send messages >= 'error'
to stderr.
This is based on work by Tregaron Bayly and Jason Earl at Bluehost, thanks.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change logic in run_interactive() to not recursively call itself, and to
let exceptions through to callers.
Raising ExecutionError instead of printing a message but not raising an
exception is now allowed. This lets us reorganize a few functions for
less nested logic.
Change log.error()s to exceptions.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A very nice behavior is having <tab><tab> bring up options for the next
expected commandline token when nothing is underneath the cursor. There was
a workaround to get this working with the simpleparse parser, and we need
a different workaround for it to work with pyparsing.
This keeps the same technique of adding a bogus input and seeing what the
parser would categorize it as, and then setting current_token based on
that.
We also ensure current_token is defined. Without this, the call to
_dispatch_completion fails with a NameError but somebody catches the
error so things just silently don't work, without the debug msg in
_dispatch_completion for unknown current_token ever printing.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
|
|
| |
See https://github.com/agrover/configshell-fb/pull/8 comments for more.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
update debian packaging
|
| |
| |
| |
| |
| |
| | |
This splits an exatra -docs package, too.
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
| |
| |
| |
| | |
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
epydoc is needed for building the docs
and that again needs all usual dependencies.
On the other side epydoc isn't needed on runtime anymore.
This should be backwards compatible to configshell,
but targetcli-fb needs this version instead of the original.
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
| |
| |
| |
| | |
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
| |
| |
| |
| | |
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
| |
| |
| |
| |
| |
| | |
This is an alternative to the original configshell.
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
|\ \
| |/
|/| |
Fix an integer division on Python 3
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With Python 2, '/' returns the floor of the mathematical result of
division if the arguments are ints. With Python 3, the operator
returns a reasonable approximation of the mathematical result of the
division.
This commit uses '//', which is the floor division operator in both
Python 2 and Python 3, so that the result can be safely used to index
an array.
For more details, see PEP 238 "changing the division operator"
http://www.python.org/dev/peps/pep-0238
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|\
| |
| | |
fix version in package builds
|
|/
|
|
|
|
|
| |
Without this fix at least dpkg complains about the version
not starting with a number (starting with "v").
Signed-off-by: Johannes Dewender <github@JonnyJD.net>
|
|\
| |
| | |
Perform some cleanup and state that configshell-fb is compatible with Python 3
|
| |
| |
| |
| | |
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
| |
| |
| |
| | |
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|/
|
|
| |
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|\
| |
| | |
2to3: preparatory work for python 3
|
|/
|
|
|
|
| |
Generated with `2to3 -f except`.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| | |
Replace simpleparse with pyparsing
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Configshell uses simpleparse to parse the command line. Unfortunately,
simpleparse does not seem to be maintained anymore: the last release
was three years ago. Moreover, simpleparse is not widely used (on
Debian, only configshell depends on it).
On the other hand, pyparsing is actively maintained, widely used and
ready for Python 3. So let's use it.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
|
|
|
|
|
|
| |
Also update the package name, version, URL and maintainer.
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|
|
|
| |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
|\
| |
| |
| |
| | |
Conflicts:
README
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch converts configshell code copyright from AGPL to the
permissive Apache License 2.0.
It also update copyright owner to Datera, Inc.
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
|
| |
| |
| |
| | |
Signed-off-by: Andy Grover <agrover@redhat.com>
|
| |
| |
| |
| |
| | |
Reported-by: bsyd
Signed-off-by: Andy Grover <agrover@redhat.com>
|