[pcp] use socket.gethostname() instead of shelling out

There's no need to take a fork to retrieve the system host name.
Use the socket.gethostname() function instead (plugins also have
no businness importing things from sos.utilities directly - all
the useful functions in there have wrapper methods in the Plugin
class, e.g. call_ext_prog(), check_ext_prog() etc.).

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[rpm] reduce verify timeout to 180s

The initial rpm verify timeout was set to 3600s (one hour). This
is insane; if a verify has not completed in that time then it's
unlikely that it ever will. With the current set of verify
patterns the total time taken in rpm (including both the verify
and all other runs, e.g. policy initialisation) is under 60s on
all my test hosts (bare metal and virtual).

Allow a factor of three over this figure and set the timeout to
180s.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[sosreport] remove module comment

This is part of an effort to cleanup syntax throughout the entire python
codebase.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[sosreport] make pep8 happy

There were a ton of violations as far as pep8 is concerned. Corrected all of
these in this particular file. There were even a few incorrect comparison
syntax within the checking of particular plugin options that were corrected as
well.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
Collect local FirewallD XML config

FirewallD looks for config files for icmptypes, zones, and services in /etc/firewalld/ and if none are found, falls back to /usr/lib/firewalld/. This way, changes made on the system are stored under /etc which overrides the default.
[gluster] tidy up add_copy_spec() usage

The gluster plugin has a pile of fragmented add_copy_spec() calls.
Consolidate them into as few add_copy_specs() calls as possible
and remove the cargo-cult positioning of logs at the end.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[gluster] add redhat-storage-release

Fixes #329.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[nfsserver] add /etc/exports.d

Fixes #326.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[megacli] - remove rogue print statement

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[archive,reporting] - more pep8/pyflakes fixes

No code changes just formatting to make the linters happy.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[plugins] - pep8 fixes

Code formatting for pep8/pyflakes

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[ldap] - fix undefined variable ldap_conf

Code was attempting to access a variable within the incorrect scope.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[docs] - Add API documentation generation

Use sphinx to generate api docs which we can tie into a service like
Read the docs in order to have reference documentation on our apis.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[docs] - Add links to wiki documentation

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[plugins] - pep8 fixes for first patch of sub plugins

pep8/pyflakes fixes for first set of plugins abrt-ceph

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[docs] include sos import path for resolving modules

During documentation generation we need to be able to resolve the
modules on other systems while generating the documentation.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[docs] fix a typo in the mailing list description

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[docs] link the mailing list in restructured text properly

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[plugins] more pep8/pyflake plugin cleanup

There's a lot of changes, however, it is primarily formatting of existing
code and no new code is introduced.

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[plugins] pep8 compliance for rest of plugins

All plugins should now be in compliance with pep8

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>