| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
There's no reason to truncate mangled command names within an
archive. This isn't MS-DOS 3.1 and there are cases where the 64
character limit causes a loss of uniqueness and resulting name
collisions (e.g. namespaced network commands).
Fixes #388.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Numerous Plugin methods are not expected to be called from outside
the base class. Mark them private with a leading underscore:
_copy_dir()
_copy_node()
_copy_symlink()
_do_copy_path()
_expand_copy_spec()
_mangle_command()
_make_command_filename()
_is_forbidden_path()
_collect_copy_specs()
_collect_cmd_output()
_collect_strings()
A couple of these (_mangle_command() and _do_copy_path()) are
invoked from the Plugin test suite; update the relevant cases to
call the new names.
Fixes #348.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
| |
The 'u' prefix wasn't reintroduced back into Python 3 until
version 3.3. Use six here to accomodate for that.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Returning a 3-tuple has always been ugly. It gets worse as the
parameter list for this family of functions grows. Worse, the 3rd
member of the tuple is unused and is always set to 0.
Rip the whole mess out and return a single, simple dictionary
object with 'status' and 'output' keys.
Update utilities_tests to reflect the new interface.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Since strings are iterable a plugin attempting to call
add_copy_specs("/something") results in a plugin calling
add_copy_spec("/"). Raise a TypeError if this happens.
Fixes Issue #141.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Give add_copy_spec() and add_copy_specs() their own test cases.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Fixes Issue #243.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
| |
Has test case but no callers. Delete it.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
The DirTree class has remained unused since it was implemented.
Remove the definition and associated test cases.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
The function is defined and even has test cases. But no callers..
Remove the function and the test cases that exercise it.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The handrolled profile logging support in sos hasn't been widely
used in a long time and is a problem better solved with external
profiling and coverage tools.
Rip out all the support and documentation. This shortens and
simplifies numerous Plugin class methods.
Fixes Issue #244.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
Replace explicit test for six.PY2 with try/exception handling of
StringIO import.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
| |
The policy_tests unit tests call validatePlugin(). Update them to
use the new name.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
| |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes a necessary dependency on python-six for its compability layer
since we are wanting to continue support for both Python 2.7.x and Python 3.x.
In addition, this will allow us to effectively phase out Python 2 support
when/if the time arises that all interested distributions have done away with
Python 2.
This port passes all unittests for both python 2.7.x and python 3.3.x
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
| |
Since fix for 0ed431a went in we revert our unittests to the old (working) behavior.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
| |
Update unittests to reflect 4a594b6dce129f8d9837c0d93768576badf2b2b7
|
|
|
|
|
|
|
|
|
|
| |
- We are planning on moving to python distutils for future packaging
however, we still want to keep our current build infrastructure around
until we are able to test the builds overtime. For now distutils will
live alongside the current build process and slowly replace the Makefiles
once deemed fit.
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
| |
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
| |
- Simple fix to make all unittests green
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- In our unittest we defined 'is_installed' to be a bool when in fact we wanted
to verify if a package is installed via the _method_ is is_installed. Since
overriding that method with our variable definition we basically removed
any functionality of 'is_installed' method in Plugin class.
- Initializing a fake plugin to test was failing due to our global
logger not being initialized. Put a simple check in the library to
make sure the logger is defined no matter what the calling state does.
- Make import selinux conditional
- Add travis-ci support
- Rename README to utilize travis-ci build status and other markdown supported
features
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
|
|
|
|
|
|
|
|
|
| |
Fix policy and utility function, method and variable names to use
lower case underscored style instead of camelCase.
Related to Issue #112.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
| |
The name copy_stuff() isn't as descriptive now that the data may
be being streamed into an archive without being copied into a
temporary directory. Calling it collect covers both equally well.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are lots of historical camelCase function and method names
in the plugin directory even though pep8 very clearly recommends
against these other than for external backwards compatibility.
Rename all the camelCased functions and methods and fix up the
main sosreport code, examples and tests to use the new names.
Fixes Issue #112.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
| |
|
|
|
|
|
|
| |
The TarFileArchive class currently doesn't allow recursive
directory addition using the add_file() interface - disable those
tests for now.
|
| |
|
|
|
|
|
| |
Rename doRegexSub and doRegexExtOutputSub to doFileSub and
doExtOutputSub respectively.
|
|\ |
|
| | |
|
|/
|
|
| |
unicode filename to a zipfile would fail
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 1c2cf82a424125decda210a557755e8467bf0b2b
Author: Jesse Jaggars <jjaggars@redhat.com>
Date: Tue Mar 13 15:20:47 2012 -0500
adding regex sub tests and some docstrings
commit d72f2f28b364519710f95a53330821138fc40849
Author: Jesse Jaggars <jjaggars@redhat.com>
Date: Tue Mar 13 11:13:06 2012 -0500
adding many tests for plugins
|
|
|
|
| |
non-existant files as well
|
|
|
|
|
|
|
| |
Pulled up PackageManager implementation to simplify subclass responsibilities
Moved compress method to Archive classes
Re-organized utilities.py
Added tests to exercise more utilities methods
|
| |
|
| |
|
| |
|
|
|
|
| |
simplifying specification of valid plugin subclasses
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code reorganization
Cross platform support for Windows, OS X and Linux
Dynamically loaded policies
Support for loading plugins from multiple locations
via __path__ modification of sos.plugins
Support for running via Jython
Support for executing from a jarfile
Support for json based reporting infrastructure
- Previous reporting methods still exist
Support for other checksum algorithms (determined by policy)
Support for other compression algorithms (determined by policy)
New plugin API for writing arbitrary information in a new file inside
the report archive.
New plugin API for modifying files that have been added to the
archive.
Added API for global plugin options
- external interface is unavailable at this time
Many small bugfixes
|
|
|
|
| |
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1053 ef72aa8b-4018-0410-8976-d6e080ef94d8
|
|
|
|
| |
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1050 ef72aa8b-4018-0410-8976-d6e080ef94d8
|
|
|
|
| |
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1049 ef72aa8b-4018-0410-8976-d6e080ef94d8
|