From c2b5e76f22531da9a53d25ced6debdf79d9ef9c2 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Tue, 30 Sep 2014 18:34:21 +0100 Subject: [Plugin] remove add_copy_specs() Merge add_copy_specs() into add_copy_spec() and treat any strings passed to the new method as though they were a single item list. Mirrors the prior change to add_cmd_outputs(). Fixes #301. Signed-off-by: Bryn M. Reeves --- sos/plugins/__init__.py | 25 +++++++++++-------------- sos/plugins/acpid.py | 4 ++-- sos/plugins/activemq.py | 4 ++-- sos/plugins/anaconda.py | 2 +- sos/plugins/apache.py | 4 ++-- sos/plugins/apparmor.py | 2 +- sos/plugins/apt.py | 2 +- sos/plugins/auditd.py | 2 +- sos/plugins/azure.py | 2 +- sos/plugins/block.py | 2 +- sos/plugins/boot.py | 2 +- sos/plugins/ceph.py | 2 +- sos/plugins/cgroups.py | 4 ++-- sos/plugins/cluster.py | 2 +- sos/plugins/cobbler.py | 4 ++-- sos/plugins/corosync.py | 2 +- sos/plugins/cron.py | 2 +- sos/plugins/cs.py | 8 ++++---- sos/plugins/ctdb.py | 2 +- sos/plugins/cups.py | 2 +- sos/plugins/dbus.py | 2 +- sos/plugins/dhcp.py | 4 ++-- sos/plugins/docker.py | 6 +++--- sos/plugins/ds.py | 4 ++-- sos/plugins/filesys.py | 2 +- sos/plugins/firewalld.py | 2 +- sos/plugins/general.py | 6 +++--- sos/plugins/gluster.py | 2 +- sos/plugins/grub.py | 2 +- sos/plugins/grub2.py | 2 +- sos/plugins/hardware.py | 2 +- sos/plugins/hts.py | 2 +- sos/plugins/i18n.py | 2 +- sos/plugins/infiniband.py | 2 +- sos/plugins/ipa.py | 4 ++-- sos/plugins/ipsec.py | 2 +- sos/plugins/iscsi.py | 2 +- sos/plugins/iscsitarget.py | 2 +- sos/plugins/juju.py | 2 +- sos/plugins/kdump.py | 6 +++--- sos/plugins/keepalived.py | 2 +- sos/plugins/kernel.py | 2 +- sos/plugins/kernelrt.py | 2 +- sos/plugins/keyutils.py | 2 +- sos/plugins/kvm.py | 2 +- sos/plugins/ldap.py | 4 ++-- sos/plugins/libraries.py | 2 +- sos/plugins/libvirt.py | 2 +- sos/plugins/logrotate.py | 2 +- sos/plugins/logs.py | 4 ++-- sos/plugins/maas.py | 2 +- sos/plugins/md.py | 2 +- sos/plugins/memory.py | 2 +- sos/plugins/mongodb.py | 2 +- sos/plugins/mrggrid.py | 2 +- sos/plugins/mrgmessg.py | 2 +- sos/plugins/multipath.py | 2 +- sos/plugins/mysql.py | 6 +++--- sos/plugins/named.py | 2 +- sos/plugins/navicli.py | 2 +- sos/plugins/networking.py | 4 ++-- sos/plugins/nfs.py | 2 +- sos/plugins/nfsserver.py | 2 +- sos/plugins/nis.py | 2 +- sos/plugins/ntp.py | 2 +- sos/plugins/numa.py | 2 +- sos/plugins/oddjob.py | 2 +- sos/plugins/openhpi.py | 2 +- sos/plugins/openshift.py | 6 +++--- sos/plugins/openstack_ceilometer.py | 2 +- sos/plugins/openstack_cinder.py | 6 +++--- sos/plugins/openstack_glance.py | 2 +- sos/plugins/openstack_heat.py | 2 +- sos/plugins/openstack_keystone.py | 2 +- sos/plugins/openstack_neutron.py | 4 ++-- sos/plugins/openstack_nova.py | 4 ++-- sos/plugins/openswan.py | 2 +- sos/plugins/ovirt.py | 2 +- sos/plugins/ovirt_hosted_engine.py | 6 +++--- sos/plugins/pam.py | 2 +- sos/plugins/pci.py | 2 +- sos/plugins/pcp.py | 4 ++-- sos/plugins/postfix.py | 2 +- sos/plugins/postgresql.py | 2 +- sos/plugins/powerpath.py | 2 +- sos/plugins/powerpc.py | 6 +++--- sos/plugins/ppp.py | 2 +- sos/plugins/processor.py | 2 +- sos/plugins/psacct.py | 2 +- sos/plugins/pxe.py | 2 +- sos/plugins/qpid.py | 2 +- sos/plugins/radius.py | 4 ++-- sos/plugins/s390.py | 2 +- sos/plugins/samba.py | 2 +- sos/plugins/satellite.py | 10 +++++----- sos/plugins/scsi.py | 2 +- sos/plugins/sendmail.py | 4 ++-- sos/plugins/smartcard.py | 2 +- sos/plugins/soundcard.py | 2 +- sos/plugins/squid.py | 2 +- sos/plugins/ssh.py | 2 +- sos/plugins/ssmtp.py | 2 +- sos/plugins/sssd.py | 2 +- sos/plugins/startup.py | 2 +- sos/plugins/symcli.py | 2 +- sos/plugins/systemd.py | 2 +- sos/plugins/sysvipc.py | 2 +- sos/plugins/teamd.py | 2 +- sos/plugins/tomcat.py | 2 +- sos/plugins/tuned.py | 2 +- sos/plugins/udev.py | 2 +- sos/plugins/upstart.py | 2 +- sos/plugins/vmware.py | 2 +- sos/plugins/vsftpd.py | 2 +- sos/plugins/x11.py | 2 +- sos/plugins/xen.py | 4 ++-- sos/plugins/xinetd.py | 2 +- sos/plugins/yum.py | 4 ++-- tests/plugin_tests.py | 9 --------- 119 files changed, 169 insertions(+), 181 deletions(-) diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 48ece912..3e391005 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -446,22 +446,19 @@ class Plugin(object): self.name(), strfile) self.archive.add_link(link_path, _file) - def add_copy_specs(self, copyspecs): - if isinstance(copyspecs, six.string_types): - raise TypeError("add_copy_specs called with string argument") - for copyspec in copyspecs: - self.add_copy_spec(copyspec) - - def add_copy_spec(self, copyspec): + def add_copy_spec(self, copyspecs): """Add a file specification (can be file, dir,or shell glob) to be copied into the sosreport by this module. """ - if not (copyspec and len(copyspec)): - self._log_warn("added null or empty copy spec") - return False - copy_paths = self._expand_copy_spec(copyspec) - self.copy_paths.update(copy_paths) - self._log_info("added copyspec '%s'" % copyspec) + if isinstance(copyspecs, six.string_types): + copyspecs = [copyspecs] + for copyspec in copyspecs: + if not (copyspec and len(copyspec)): + self._log_warn("added null or empty copy spec") + return False + copy_paths = self._expand_copy_spec(copyspec) + self.copy_paths.update(copy_paths) + self._log_info("added copyspec '%s'" % copyspec) def get_command_output(self, prog, timeout=300, runat=None): result = sos_get_command_output(prog, timeout=timeout, runat=runat) @@ -674,7 +671,7 @@ class Plugin(object): may be overridden to add further copy_specs, forbidden_paths, and external programs if required. """ - self.add_copy_specs(list(self.files)) + self.add_copy_spec(list(self.files)) def postproc(self): """Perform any postprocessing. To be replaced by a plugin if required. diff --git a/sos/plugins/acpid.py b/sos/plugins/acpid.py index 83374cb0..7808b39b 100644 --- a/sos/plugins/acpid.py +++ b/sos/plugins/acpid.py @@ -23,14 +23,14 @@ class Acpid(Plugin): class RedHatAcpid(Acpid, RedHatPlugin): def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/acpid*", "/etc/acpi/events/power.conf"]) class DebianAcpid(Acpid, DebianPlugin, UbuntuPlugin): def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/acpi/events/powerbtn*"]) # vim: et ts=4 sw=4 diff --git a/sos/plugins/activemq.py b/sos/plugins/activemq.py index adc9f31f..291fcd9a 100644 --- a/sos/plugins/activemq.py +++ b/sos/plugins/activemq.py @@ -26,13 +26,13 @@ class ActiveMq(Plugin, RedHatPlugin, DebianPlugin): files = ('/var/log/activemq',) def setup(self): - self.add_copy_specs(list(self.files)) + self.add_copy_spec(list(self.files)) class UbuntuActiveMq(ActiveMq, UbuntuPlugin): def setup(self): super(UbuntuActiveMq, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ '/etc/activemq', '/etc/default/activemq' ]) diff --git a/sos/plugins/anaconda.py b/sos/plugins/anaconda.py index e582845c..08d300b2 100644 --- a/sos/plugins/anaconda.py +++ b/sos/plugins/anaconda.py @@ -44,7 +44,7 @@ class Anaconda(Plugin, RedHatPlugin): "/root/install.log.syslog" ] - self.add_copy_specs(paths) + self.add_copy_spec(paths) def postproc(self): self.do_file_sub( diff --git a/sos/plugins/apache.py b/sos/plugins/apache.py index aea98965..dc700cb0 100644 --- a/sos/plugins/apache.py +++ b/sos/plugins/apache.py @@ -32,7 +32,7 @@ class RedHatApache(Apache, RedHatPlugin): def setup(self): super(RedHatApache, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/httpd/conf/httpd.conf", "/etc/httpd/conf.d/*.conf" ]) @@ -53,7 +53,7 @@ class DebianApache(Apache, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianApache, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/apache2/*", "/etc/default/apache2" ]) diff --git a/sos/plugins/apparmor.py b/sos/plugins/apparmor.py index c9f08459..cb66bba9 100644 --- a/sos/plugins/apparmor.py +++ b/sos/plugins/apparmor.py @@ -24,7 +24,7 @@ class Apparmor(Plugin, UbuntuPlugin): profiles = ('security',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/apparmor" ]) diff --git a/sos/plugins/apt.py b/sos/plugins/apt.py index 587af4ca..091d30ff 100644 --- a/sos/plugins/apt.py +++ b/sos/plugins/apt.py @@ -25,7 +25,7 @@ class Apt(Plugin, DebianPlugin, UbuntuPlugin): profiles = ('system', 'sysmgmt', 'packagemanager') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/apt", "/var/log/apt" ]) diff --git a/sos/plugins/auditd.py b/sos/plugins/auditd.py index 76729cbf..7173f6a8 100644 --- a/sos/plugins/auditd.py +++ b/sos/plugins/auditd.py @@ -25,7 +25,7 @@ class Auditd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('audit',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/audit/auditd.conf", "/etc/audit/audit.rules" ]) diff --git a/sos/plugins/azure.py b/sos/plugins/azure.py index 52fe2e61..bcf4f196 100644 --- a/sos/plugins/azure.py +++ b/sos/plugins/azure.py @@ -26,7 +26,7 @@ class Azure(Plugin, UbuntuPlugin): packages = ('walinuxagent',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/waagent*", "/var/lib/cloud", "/etc/default/kv-kvp-daemon-init", diff --git a/sos/plugins/block.py b/sos/plugins/block.py index c92ea862..8c73ef64 100644 --- a/sos/plugins/block.py +++ b/sos/plugins/block.py @@ -34,7 +34,7 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ]) # legacy location for non-/run distributions - self.add_copy_specs([ + self.add_copy_spec([ "/etc/blkid.tab", "/run/blkid/blkid.tab" ]) diff --git a/sos/plugins/boot.py b/sos/plugins/boot.py index f70f34cc..71737421 100644 --- a/sos/plugins/boot.py +++ b/sos/plugins/boot.py @@ -28,7 +28,7 @@ class Boot(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ] def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ # legacy / special purpose bootloader configs "/etc/milo.conf", "/etc/silo.conf", diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py index 7d25f07a..52b8fff8 100644 --- a/sos/plugins/ceph.py +++ b/sos/plugins/ceph.py @@ -35,7 +35,7 @@ class Ceph(Plugin, RedHatPlugin, UbuntuPlugin): ) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ceph/", "/var/log/ceph/" ]) diff --git a/sos/plugins/cgroups.py b/sos/plugins/cgroups.py index f271cb77..25d89509 100644 --- a/sos/plugins/cgroups.py +++ b/sos/plugins/cgroups.py @@ -24,7 +24,7 @@ class Cgroups(Plugin, DebianPlugin, UbuntuPlugin): files = ('/proc/cgroups',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/cgroups", "/sys/fs/cgroup" ]) @@ -35,7 +35,7 @@ class RedHatCgroups(Cgroups, RedHatPlugin): def setup(self): super(RedHatCgroups, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/sysconfig/cgconfig", "/etc/sysconfig/cgred", "/etc/cgsnapshot_blacklist.conf", diff --git a/sos/plugins/cluster.py b/sos/plugins/cluster.py index 7c0111b9..ecfaa7b6 100644 --- a/sos/plugins/cluster.py +++ b/sos/plugins/cluster.py @@ -44,7 +44,7 @@ class Cluster(Plugin, RedHatPlugin): def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/cluster.conf", "/etc/cluster.xml", "/etc/cluster", diff --git a/sos/plugins/cobbler.py b/sos/plugins/cobbler.py index fdeebdb4..90d3150d 100644 --- a/sos/plugins/cobbler.py +++ b/sos/plugins/cobbler.py @@ -27,7 +27,7 @@ class RedHatCobbler(Cobbler, RedHatPlugin): profiles = ('cluster', 'sysmgmt') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/cobbler", "/var/log/cobbler", "/var/lib/rhn/kickstarts", @@ -40,7 +40,7 @@ class DebianCobbler(Cobbler, DebianPlugin, UbuntuPlugin): packages = ('cobbler',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/cobbler", "/var/log/cobbler", "/var/lib/cobbler" diff --git a/sos/plugins/corosync.py b/sos/plugins/corosync.py index dff65d9d..2cd22c38 100644 --- a/sos/plugins/corosync.py +++ b/sos/plugins/corosync.py @@ -24,7 +24,7 @@ class Corosync(Plugin): packages = ('corosync',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/corosync", "/var/lib/corosync/fdata", "/var/log/cluster/corosync.log" diff --git a/sos/plugins/cron.py b/sos/plugins/cron.py index 26497dfe..337c6256 100644 --- a/sos/plugins/cron.py +++ b/sos/plugins/cron.py @@ -25,7 +25,7 @@ class Cron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): files = ('/etc/crontab') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/cron*", "/var/log/cron", "/var/spool/cron" diff --git a/sos/plugins/cs.py b/sos/plugins/cs.py index 37f1c1df..2ca4e5ba 100644 --- a/sos/plugins/cs.py +++ b/sos/plugins/cs.py @@ -57,7 +57,7 @@ class CertificateSystem(Plugin, RedHatPlugin): self.add_alert("Red Hat Certificate System not found.") return if csversion == 71: - self.add_copy_specs([ + self.add_copy_spec([ "/opt/redhat-cs/slapd-*/logs/access", "/opt/redhat-cs/slapd-*/logs/errors", "/opt/redhat-cs/slapd-*/config/dse.ldif", @@ -71,7 +71,7 @@ class CertificateSystem(Plugin, RedHatPlugin): "/opt/redhat-cs/cert-*/tps-debug.log" ]) if csversion == 73: - self.add_copy_specs([ + self.add_copy_spec([ "/var/lib/rhpki-*/conf/*cfg*", "/var/lib/rhpki-*/conf/*.ldif", "/var/lib/rhpki-*/logs/debug", @@ -81,13 +81,13 @@ class CertificateSystem(Plugin, RedHatPlugin): "/var/lib/rhpki-*/logs/system" ]) if csversion in (73, 8): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/dirsrv/slapd-*/dse.ldif", "/var/log/dirsrv/slapd-*/access", "/var/log/dirsrv/slapd-*/errors" ]) if csversion == 8: - self.add_copy_specs([ + self.add_copy_spec([ "/etc/pki-*/CS.cfg", "/var/lib/pki-*/conf/*cfg*", "/var/log/pki-*/debug", diff --git a/sos/plugins/ctdb.py b/sos/plugins/ctdb.py index 9c040683..443181cb 100644 --- a/sos/plugins/ctdb.py +++ b/sos/plugins/ctdb.py @@ -24,7 +24,7 @@ class Ctdb(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): plugin_name = "ctdb" def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ctdb/public_addresses", "/etc/ctdb/static-routes", "/etc/ctdb/multipathd", diff --git a/sos/plugins/cups.py b/sos/plugins/cups.py index 936010a3..deae3b4e 100644 --- a/sos/plugins/cups.py +++ b/sos/plugins/cups.py @@ -35,7 +35,7 @@ class Cups(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): else: self.add_copy_spec("/var/log/cups") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/cups/*.conf", "/etc/cups/*.types", "/etc/cups/lpoptions", diff --git a/sos/plugins/dbus.py b/sos/plugins/dbus.py index 5957152a..2e6a99ee 100644 --- a/sos/plugins/dbus.py +++ b/sos/plugins/dbus.py @@ -22,7 +22,7 @@ class Dbus(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/dbus-1", "/var/lib/dbus/machine-id" ]) diff --git a/sos/plugins/dhcp.py b/sos/plugins/dhcp.py index 085e0088..84e96d22 100644 --- a/sos/plugins/dhcp.py +++ b/sos/plugins/dhcp.py @@ -30,7 +30,7 @@ class RedHatDhcp(Dhcp, RedHatPlugin): def setup(self): super(RedHatDhcp, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/dhcpd.conf", "/etc/dhcp" ]) @@ -43,7 +43,7 @@ class UbuntuDhcp(Dhcp, UbuntuPlugin): def setup(self): super(UbuntuDhcp, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/default/udhcpd", "/etc/udhcpd.conf" ]) diff --git a/sos/plugins/docker.py b/sos/plugins/docker.py index 9c0ac437..d8851a0a 100644 --- a/sos/plugins/docker.py +++ b/sos/plugins/docker.py @@ -29,7 +29,7 @@ class Docker(Plugin): "terminated ones", 'fast', False)] def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/var/lib/docker/repositories-*" ]) @@ -60,7 +60,7 @@ class RedHatDocker(Docker, RedHatPlugin): def setup(self): super(RedHatDocker, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/udev/rules.d/80-docker.rules" ]) @@ -74,7 +74,7 @@ class UbuntuDocker(Docker, UbuntuPlugin): def setup(self): super(UbuntuDocker, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/default/docker.io" ]) diff --git a/sos/plugins/ds.py b/sos/plugins/ds.py index 186abe4f..2413e43b 100644 --- a/sos/plugins/ds.py +++ b/sos/plugins/ds.py @@ -57,7 +57,7 @@ class DirectoryServer(Plugin, RedHatPlugin): if not self.check_version(): self.add_alert("Directory Server not found.") elif "ds8" in self.check_version(): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/dirsrv/slapd*/cert8.db", "/etc/dirsrv/slapd*/certmap.conf", "/etc/dirsrv/slapd*/dse.ldif", @@ -67,7 +67,7 @@ class DirectoryServer(Plugin, RedHatPlugin): "/var/log/dirsrv/*" ]) elif "ds7" in self.check_version(): - self.add_copy_specs([ + self.add_copy_spec([ "/opt/redhat-ds/slapd-*/config", "/opt/redhat-ds/slapd-*/logs" ]) diff --git a/sos/plugins/filesys.py b/sos/plugins/filesys.py index 32a42bcb..fab9dd3d 100644 --- a/sos/plugins/filesys.py +++ b/sos/plugins/filesys.py @@ -27,7 +27,7 @@ class Filesys(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ("dumpe2fs", 'dump filesystem information', 'slow', False)] def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/filesystems", "/etc/fstab", "/proc/self/mounts", diff --git a/sos/plugins/firewalld.py b/sos/plugins/firewalld.py index 24074c05..31e83376 100644 --- a/sos/plugins/firewalld.py +++ b/sos/plugins/firewalld.py @@ -27,7 +27,7 @@ class FirewallD(Plugin, RedHatPlugin): packages = ('firewalld',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/firewalld/firewalld.conf", "/etc/firewalld/icmptypes/*.xml", "/etc/firewalld/services/*.xml", diff --git a/sos/plugins/general.py b/sos/plugins/general.py index 0c43c8aa..341d2682 100644 --- a/sos/plugins/general.py +++ b/sos/plugins/general.py @@ -22,7 +22,7 @@ class General(Plugin): profiles = ('system', 'sysmgmt') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/sos.conf", "/etc/sysconfig", "/proc/stat", @@ -44,7 +44,7 @@ class RedHatGeneral(General, RedHatPlugin): def setup(self): super(RedHatGeneral, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/redhat-release", "/etc/fedora-release", "/var/log/up2date" @@ -59,7 +59,7 @@ class DebianGeneral(General, DebianPlugin): def setup(self): super(DebianGeneral, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/default", "/etc/lsb-release", "/etc/debian_version" diff --git a/sos/plugins/gluster.py b/sos/plugins/gluster.py index 8d836a27..1a313959 100644 --- a/sos/plugins/gluster.py +++ b/sos/plugins/gluster.py @@ -82,7 +82,7 @@ class Gluster(Plugin, RedHatPlugin): self.add_cmd_output("gluster peer status") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/redhat-storage-release", # collect unified file and object storage configuration "/etc/swift/", diff --git a/sos/plugins/grub.py b/sos/plugins/grub.py index 65b6a7dd..18e7b4d1 100644 --- a/sos/plugins/grub.py +++ b/sos/plugins/grub.py @@ -24,7 +24,7 @@ class Grub(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('grub',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/boot/efi/EFI/*/grub.conf", "/boot/grub/grub.conf", "/boot/grub/device.map", diff --git a/sos/plugins/grub2.py b/sos/plugins/grub2.py index 59740642..08700dd8 100644 --- a/sos/plugins/grub2.py +++ b/sos/plugins/grub2.py @@ -24,7 +24,7 @@ class Grub2(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('grub2',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/boot/efi/EFI/*/grub.cfg", "/boot/grub2/grub.cfg", "/boot/grub2/grubenv", diff --git a/sos/plugins/hardware.py b/sos/plugins/hardware.py index f2eb624f..92c347b4 100644 --- a/sos/plugins/hardware.py +++ b/sos/plugins/hardware.py @@ -23,7 +23,7 @@ class Hardware(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system', 'hardware') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/interrupts", "/proc/irq", "/proc/dma", diff --git a/sos/plugins/hts.py b/sos/plugins/hts.py index 4f5d626f..b8e4d41a 100644 --- a/sos/plugins/hts.py +++ b/sos/plugins/hts.py @@ -23,7 +23,7 @@ class HardwareTestSuite(Plugin, RedHatPlugin): profiles = ('debug',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/httpd/conf.d/hts.conf", "/var/hts" ]) diff --git a/sos/plugins/i18n.py b/sos/plugins/i18n.py index cf8dd44c..5326e2ca 100644 --- a/sos/plugins/i18n.py +++ b/sos/plugins/i18n.py @@ -23,7 +23,7 @@ class I18n(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/X11/xinit/xinput.d/*", "/etc/locale.conf" ]) diff --git a/sos/plugins/infiniband.py b/sos/plugins/infiniband.py index 7353332d..b0437d7b 100644 --- a/sos/plugins/infiniband.py +++ b/sos/plugins/infiniband.py @@ -26,7 +26,7 @@ class Infiniband(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('libibverbs-utils',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ofed/openib.conf", "/etc/ofed/opensm.conf" ]) diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py index e3ae4302..d563665b 100644 --- a/sos/plugins/ipa.py +++ b/sos/plugins/ipa.py @@ -37,14 +37,14 @@ class Ipa(Plugin, RedHatPlugin): def setup(self): if self.ipa_server: - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/ipaserver-install.log", "/var/log/ipareplica-install.log" ]) if self.ipa_client: self.add_copy_spec("/var/log/ipaclient-install.log") - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/ipaupgrade.log", "/var/log/krb5kdc.log", "/var/log/pki-ca/debug", diff --git a/sos/plugins/ipsec.py b/sos/plugins/ipsec.py index 10a23bbc..644109d7 100644 --- a/sos/plugins/ipsec.py +++ b/sos/plugins/ipsec.py @@ -39,7 +39,7 @@ class DebianIPSec(IPSec, DebianPlugin, UbuntuPlugin): files = ('/etc/ipsec-tools.conf',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ipsec-tools.conf", "/etc/ipsec-tools.d", "/etc/default/setkey" diff --git a/sos/plugins/iscsi.py b/sos/plugins/iscsi.py index 96534ce6..064b2f4d 100644 --- a/sos/plugins/iscsi.py +++ b/sos/plugins/iscsi.py @@ -30,7 +30,7 @@ class RedHatIscsi(Iscsi, RedHatPlugin): def setup(self): super(RedHatIscsi, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/iscsi/iscsid.conf", "/etc/iscsi/initiatorname.iscsi", "/var/lib/iscsi" diff --git a/sos/plugins/iscsitarget.py b/sos/plugins/iscsitarget.py index 43794a9e..f9cf2235 100644 --- a/sos/plugins/iscsitarget.py +++ b/sos/plugins/iscsitarget.py @@ -42,7 +42,7 @@ class DebianIscsiTarget(IscsiTarget, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianIscsiTarget, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/iet", "/etc/sysctl.d/30-iscsitarget.conf", "/etc/default/iscsitarget" diff --git a/sos/plugins/juju.py b/sos/plugins/juju.py index f6995e03..2efcc2ae 100644 --- a/sos/plugins/juju.py +++ b/sos/plugins/juju.py @@ -72,7 +72,7 @@ class Juju(Plugin, UbuntuPlugin): suggest_filename="{}.json".format(collection)) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/juju", "/var/lib/juju" ]) diff --git a/sos/plugins/kdump.py b/sos/plugins/kdump.py index fdadc932..6e64ba01 100644 --- a/sos/plugins/kdump.py +++ b/sos/plugins/kdump.py @@ -23,7 +23,7 @@ class KDump(Plugin): profiles = ('system', 'debug') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/cmdline" ]) @@ -34,7 +34,7 @@ class RedHatKDump(KDump, RedHatPlugin): packages = ('kexec-tools',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/kdump.conf", "/etc/udev/rules.d/*kexec.rules", "/var/crash/*/vmcore-dmesg.txt" @@ -47,7 +47,7 @@ class DebianKDump(KDump, DebianPlugin, UbuntuPlugin): packages = ('kdump-tools',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/default/kdump-tools" ]) diff --git a/sos/plugins/keepalived.py b/sos/plugins/keepalived.py index 69307c69..20e89bad 100644 --- a/sos/plugins/keepalived.py +++ b/sos/plugins/keepalived.py @@ -26,7 +26,7 @@ class Keepalived(Plugin, RedHatPlugin): packages = ('keepalived',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/keepalived/keepalived.conf", "/etc/sysconfig/keepalived" ]) diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py index 6377bfc7..877b2bb6 100644 --- a/sos/plugins/kernel.py +++ b/sos/plugins/kernel.py @@ -42,7 +42,7 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "dkms status" ]) - self.add_copy_specs([ + self.add_copy_spec([ "/proc/modules", "/proc/sys/kernel/random/boot_id", "/sys/module/*/parameters", diff --git a/sos/plugins/kernelrt.py b/sos/plugins/kernelrt.py index 4a5cf88d..7358ead5 100644 --- a/sos/plugins/kernelrt.py +++ b/sos/plugins/kernelrt.py @@ -29,7 +29,7 @@ class KernelRT(Plugin, RedHatPlugin): files = ('/sys/kernel/realtime',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ '/etc/rtgroups', '/proc/sys/kernel/sched_rt_period_us', '/proc/sys/kernel/sched_rt_runtime_us', diff --git a/sos/plugins/keyutils.py b/sos/plugins/keyutils.py index 03db1fd0..35625552 100644 --- a/sos/plugins/keyutils.py +++ b/sos/plugins/keyutils.py @@ -26,7 +26,7 @@ class Keyutils(Plugin, RedHatPlugin): packages = ('keyutils',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/request-key.conf", "/etc/request-key.d" ]) diff --git a/sos/plugins/kvm.py b/sos/plugins/kvm.py index bde969d3..cb2b85f8 100644 --- a/sos/plugins/kvm.py +++ b/sos/plugins/kvm.py @@ -33,7 +33,7 @@ class Kvm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): return os.access("/sys/module/kvm", os.R_OK) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/sys/module/kvm/srcversion", "/sys/module/kvm_intel/srcversion", "/sys/module/kvm_amd/srcversion", diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py index 1b07d123..1fb62bb2 100644 --- a/sos/plugins/ldap.py +++ b/sos/plugins/ldap.py @@ -43,7 +43,7 @@ class RedHatLdap(Ldap, RedHatPlugin): self.add_forbidden_path("/etc/openldap/certs/pin.txt") self.add_forbidden_path("/etc/openldap/certs/*passw*") self.add_forbidden_path("/etc/openldap/certs/key3.db") - self.add_copy_specs([ + self.add_copy_spec([ self.ldap_conf, "/etc/openldap/certs/cert8.db", "/etc/openldap/certs/secmod.db", @@ -76,7 +76,7 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): ldap_search = "ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// " - self.add_copy_specs([ + self.add_copy_spec([ self.ldap_conf, "/etc/slapd.conf", "/etc/ldap/slapd.d" diff --git a/sos/plugins/libraries.py b/sos/plugins/libraries.py index ff358ce7..2d0f4335 100644 --- a/sos/plugins/libraries.py +++ b/sos/plugins/libraries.py @@ -27,7 +27,7 @@ class Libraries(Plugin, RedHatPlugin, UbuntuPlugin): ] def setup(self): - self.add_copy_specs(["/etc/ld.so.conf", "/etc/ld.so.conf.d"]) + self.add_copy_spec(["/etc/ld.so.conf", "/etc/ld.so.conf.d"]) if self.get_option("ldconfigv"): self.add_cmd_output("ldconfig -v -N -X") self.add_cmd_output("ldconfig -p -N -X") diff --git a/sos/plugins/libvirt.py b/sos/plugins/libvirt.py index 50b7b3f1..9ff8a561 100644 --- a/sos/plugins/libvirt.py +++ b/sos/plugins/libvirt.py @@ -31,7 +31,7 @@ class Libvirt(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): self.add_forbidden_path("/etc/libvirt/passwd.db") self.add_forbidden_path("/etc/libvirt/krb5.tab") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/libvirt/libvirt.conf", "/etc/libvirt/libvirtd.conf", "/etc/libvirt/lxc.conf", diff --git a/sos/plugins/logrotate.py b/sos/plugins/logrotate.py index e0f91a17..3777026a 100644 --- a/sos/plugins/logrotate.py +++ b/sos/plugins/logrotate.py @@ -25,7 +25,7 @@ class LogRotate(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): def setup(self): self.add_cmd_output("logrotate --debug /etc/logrotate.conf", suggest_filename="logrotate_debug") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/logrotate*", "/var/lib/logrotate.status" ]) diff --git a/sos/plugins/logs.py b/sos/plugins/logs.py index ee44e45b..15ae26a4 100644 --- a/sos/plugins/logs.py +++ b/sos/plugins/logs.py @@ -23,7 +23,7 @@ class Logs(Plugin): profiles = ('system', 'hardware') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/syslog.conf", "/etc/rsyslog.conf" ]) @@ -79,7 +79,7 @@ class DebianLogs(Logs, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianLogs, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/syslog", "/var/log/udev", "/var/log/kern*", diff --git a/sos/plugins/maas.py b/sos/plugins/maas.py index bb0e761b..edcea5e0 100644 --- a/sos/plugins/maas.py +++ b/sos/plugins/maas.py @@ -45,7 +45,7 @@ class Maas(Plugin, UbuntuPlugin): return ret['status'] == 0 def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/squid-deb-proxy", "/etc/maas", "/var/lib/maas/dhcp*", diff --git a/sos/plugins/md.py b/sos/plugins/md.py index 3e10a56a..6c2ba4a5 100644 --- a/sos/plugins/md.py +++ b/sos/plugins/md.py @@ -24,7 +24,7 @@ class Md(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): def setup(self): self.add_cmd_output("mdadm -D /dev/md*") - self.add_copy_specs([ + self.add_copy_spec([ "/proc/mdstat", "/etc/mdadm.conf", "/dev/md/md-device-map" diff --git a/sos/plugins/memory.py b/sos/plugins/memory.py index 18834a96..0f20e997 100644 --- a/sos/plugins/memory.py +++ b/sos/plugins/memory.py @@ -23,7 +23,7 @@ class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system', 'hardware', 'memory') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/pci", "/proc/meminfo", "/proc/vmstat", diff --git a/sos/plugins/mongodb.py b/sos/plugins/mongodb.py index 030231bb..95661971 100644 --- a/sos/plugins/mongodb.py +++ b/sos/plugins/mongodb.py @@ -28,7 +28,7 @@ class MongoDb(Plugin, DebianPlugin, UbuntuPlugin): files = ('/etc/mongodb.conf',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/mongodb.conf", "/var/log/mongodb/mongodb.log" ]) diff --git a/sos/plugins/mrggrid.py b/sos/plugins/mrggrid.py index cbc6fd45..a5e535d7 100644 --- a/sos/plugins/mrggrid.py +++ b/sos/plugins/mrggrid.py @@ -23,7 +23,7 @@ class MrgGrid(Plugin, RedHatPlugin): profiles = ('mrg',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/condor/condor_config", "condor_status" ]) diff --git a/sos/plugins/mrgmessg.py b/sos/plugins/mrgmessg.py index 948e605c..3e77bbe5 100644 --- a/sos/plugins/mrgmessg.py +++ b/sos/plugins/mrgmessg.py @@ -23,7 +23,7 @@ class MrgMessg(Plugin, RedHatPlugin): profiles = ('mrg',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/qpidd.conf", "/etc/sasl2/qpidd.conf", "/var/rhm" diff --git a/sos/plugins/multipath.py b/sos/plugins/multipath.py index d3e1fd7f..e6b88020 100644 --- a/sos/plugins/multipath.py +++ b/sos/plugins/multipath.py @@ -23,7 +23,7 @@ class Multipath(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system', 'storage', 'hardware') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/multipath/", "/etc/multipath.conf" ]) diff --git a/sos/plugins/mysql.py b/sos/plugins/mysql.py index 937b87a4..8bc6e725 100644 --- a/sos/plugins/mysql.py +++ b/sos/plugins/mysql.py @@ -31,13 +31,13 @@ class Mysql(Plugin): def setup(self): super(Mysql, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ self.mysql_cnf, "/var/log/mysql/mysqld.log", "/var/log/mariadb/mariadb.log", ]) if self.get_option("all_logs"): - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/mysql*", "/var/log/mariadb*" ]) @@ -60,7 +60,7 @@ class RedHatMysql(Mysql, RedHatPlugin): def setup(self): super(RedHatMysql, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ld.so.conf.d/mysql-*.conf", "/etc/ld.so.conf.d/mariadb-*.conf" ]) diff --git a/sos/plugins/named.py b/sos/plugins/named.py index f4bbc883..2360db4c 100644 --- a/sos/plugins/named.py +++ b/sos/plugins/named.py @@ -28,7 +28,7 @@ class Named(Plugin): def setup(self): for cfg in self.config_files: if exists(cfg): - self.add_copy_specs([ + self.add_copy_spec([ cfg, self.get_dns_dir(cfg) ]) diff --git a/sos/plugins/navicli.py b/sos/plugins/navicli.py index 3062c13d..5175f89f 100644 --- a/sos/plugins/navicli.py +++ b/sos/plugins/navicli.py @@ -35,7 +35,7 @@ class Navicli(Plugin, RedHatPlugin): def get_navicli_config(self): """ EMC Navisphere Host Agent NAVICLI specific information - files """ - self.add_copy_specs([ + self.add_copy_spec([ "/etc/Navisphere/agent.config", "/etc/Navisphere/Navimon.cfg", "/etc/Navisphere/Quietmode.cfg", diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py index 1e4801fe..efefc457 100644 --- a/sos/plugins/networking.py +++ b/sos/plugins/networking.py @@ -69,7 +69,7 @@ class Networking(Plugin): def setup(self): super(Networking, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/proc/net/", "/etc/nsswitch.conf", "/etc/yp.conf", @@ -172,7 +172,7 @@ class UbuntuNetworking(Networking, UbuntuPlugin): def setup(self): super(UbuntuNetworking, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/resolvconf", "/etc/network/interfaces", "/etc/network/interfaces.d", diff --git a/sos/plugins/nfs.py b/sos/plugins/nfs.py index 0b816304..94eef65f 100644 --- a/sos/plugins/nfs.py +++ b/sos/plugins/nfs.py @@ -23,7 +23,7 @@ class Nfs(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ['nfs-utils'] def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/nfsmount.conf", "/etc/idmapd.conf", "/proc/fs/nfsfs/servers", diff --git a/sos/plugins/nfsserver.py b/sos/plugins/nfsserver.py index a7ca45a3..0aef76f3 100644 --- a/sos/plugins/nfsserver.py +++ b/sos/plugins/nfsserver.py @@ -43,7 +43,7 @@ class NfsServer(Plugin, RedHatPlugin): return False def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/exports", "/etc/exports.d", "/var/lib/nfs/etab", diff --git a/sos/plugins/nis.py b/sos/plugins/nis.py index fd892222..e22770c7 100644 --- a/sos/plugins/nis.py +++ b/sos/plugins/nis.py @@ -25,7 +25,7 @@ class Nis(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): files = ('/var/yp',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/yp*.conf", "/var/yp/*" ]) diff --git a/sos/plugins/ntp.py b/sos/plugins/ntp.py index 760ecea9..401b5df6 100644 --- a/sos/plugins/ntp.py +++ b/sos/plugins/ntp.py @@ -25,7 +25,7 @@ class Ntp(Plugin): packages = ('ntp',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ntp.conf", "/etc/ntp/step-tickers", "/etc/ntp/ntpservers" diff --git a/sos/plugins/numa.py b/sos/plugins/numa.py index facf6100..00cf042d 100644 --- a/sos/plugins/numa.py +++ b/sos/plugins/numa.py @@ -26,7 +26,7 @@ class Numa(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('numad', 'numactl') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/numad.conf", "/etc/logrotate.d/numad" ]) diff --git a/sos/plugins/oddjob.py b/sos/plugins/oddjob.py index bb796165..ae48b4b0 100644 --- a/sos/plugins/oddjob.py +++ b/sos/plugins/oddjob.py @@ -28,7 +28,7 @@ class Oddjob(Plugin, RedHatPlugin): packages = ('oddjob',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/oddjobd.conf", "/etc/oddjobd.conf.d", "/etc/dbus-1/system.d/oddjob.conf" diff --git a/sos/plugins/openhpi.py b/sos/plugins/openhpi.py index c6228b0e..48740af5 100644 --- a/sos/plugins/openhpi.py +++ b/sos/plugins/openhpi.py @@ -23,7 +23,7 @@ class OpenHPI(Plugin, RedHatPlugin): profiles = ('system', 'hardware') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/openhpi/openhpi.conf", "/etc/openhpi/openhpiclient.conf" ]) diff --git a/sos/plugins/openshift.py b/sos/plugins/openshift.py index ab599c49..a44b7468 100644 --- a/sos/plugins/openshift.py +++ b/sos/plugins/openshift.py @@ -38,7 +38,7 @@ class Openshift(Plugin, RedHatPlugin): return os.path.exists("/etc/openshift/node.conf") def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/openshift-enterprise-release", "/var/log/openshift", "/etc/openshift/*.conf", @@ -48,7 +48,7 @@ class Openshift(Plugin, RedHatPlugin): self.add_cmd_output("oo-diagnostics -v") if self.is_broker(): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/openshift/quickstarts.json", "/etc/openshift/plugins.d/*.conf", "/var/www/openshift/broker/httpd/conf.d/*.conf", @@ -62,7 +62,7 @@ class Openshift(Plugin, RedHatPlugin): ]) if self.is_node(): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/openshift/node-plugins.d/*.conf", "/etc/openshift/cart.conf.d", "/etc/openshift/iptables.*.rules", diff --git a/sos/plugins/openstack_ceilometer.py b/sos/plugins/openstack_ceilometer.py index f5f0a9d8..d9d66a5c 100644 --- a/sos/plugins/openstack_ceilometer.py +++ b/sos/plugins/openstack_ceilometer.py @@ -30,7 +30,7 @@ class OpenStackCeilometer(Plugin): def setup(self): # Ceilometer - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ceilometer/", "/var/log/ceilometer" ]) diff --git a/sos/plugins/openstack_cinder.py b/sos/plugins/openstack_cinder.py index 5e438cce..356480ca 100644 --- a/sos/plugins/openstack_cinder.py +++ b/sos/plugins/openstack_cinder.py @@ -37,10 +37,10 @@ class OpenStackCinder(Plugin): "cinder-manage db version", suggest_filename="cinder_db_version") - self.add_copy_specs(["/etc/cinder/"]) + self.add_copy_spec(["/etc/cinder/"]) if self.get_option("log"): - self.add_copy_specs(["/var/log/cinder/"]) + self.add_copy_spec(["/var/log/cinder/"]) class DebianOpenStackCinder(OpenStackCinder, DebianPlugin, UbuntuPlugin): @@ -77,7 +77,7 @@ class RedHatOpenStackCinder(OpenStackCinder, RedHatPlugin): def setup(self): super(RedHatOpenStackCinder, self).setup() - self.add_copy_specs(["/etc/sudoers.d/cinder"]) + self.add_copy_spec(["/etc/sudoers.d/cinder"]) # vim: et ts=4 sw=4 diff --git a/sos/plugins/openstack_glance.py b/sos/plugins/openstack_glance.py index c26d979b..31cc228a 100644 --- a/sos/plugins/openstack_glance.py +++ b/sos/plugins/openstack_glance.py @@ -33,7 +33,7 @@ class OpenStackGlance(plugins.Plugin): "glance-manage db_version", suggest_filename="glance_db_version" ) - self.add_copy_specs([ + self.add_copy_spec([ "/etc/glance/", "/var/log/glance/" ]) diff --git a/sos/plugins/openstack_heat.py b/sos/plugins/openstack_heat.py index 39c47272..e3a83ed1 100644 --- a/sos/plugins/openstack_heat.py +++ b/sos/plugins/openstack_heat.py @@ -31,7 +31,7 @@ class OpenStackHeat(plugins.Plugin): "heat-manage db_version", suggest_filename="heat_db_version" ) - self.add_copy_specs([ + self.add_copy_spec([ "/etc/heat/", "/var/log/heat/" ]) diff --git a/sos/plugins/openstack_keystone.py b/sos/plugins/openstack_keystone.py index 41f52f8d..7df7296b 100644 --- a/sos/plugins/openstack_keystone.py +++ b/sos/plugins/openstack_keystone.py @@ -27,7 +27,7 @@ class OpenStackKeystone(Plugin): ("nopw", "dont gathers keystone passwords", "slow", True)] def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/keystone/default_catalog.templates", "/etc/keystone/keystone.conf", "/etc/keystone/logging.conf", diff --git a/sos/plugins/openstack_neutron.py b/sos/plugins/openstack_neutron.py index ed99f69e..dba192ee 100644 --- a/sos/plugins/openstack_neutron.py +++ b/sos/plugins/openstack_neutron.py @@ -46,7 +46,7 @@ class Neutron(Plugin): else: self.component_name = "quantum" - self.add_copy_specs([ + self.add_copy_spec([ "/etc/%s/" % self.component_name, "/var/log/%s/" % self.component_name ]) @@ -72,7 +72,7 @@ class Neutron(Plugin): lease_directories.append( "/var/lib/%s/dhcp/%s/" % (self.component_name, netid)) - self.add_copy_specs(lease_directories) + self.add_copy_spec(lease_directories) # TODO: Refactor! Copied from Networking plugin. def get_interface_name(self, ip_addr_out): diff --git a/sos/plugins/openstack_nova.py b/sos/plugins/openstack_nova.py index fec5225f..d6dbd832 100644 --- a/sos/plugins/openstack_nova.py +++ b/sos/plugins/openstack_nova.py @@ -108,7 +108,7 @@ class DebianOpenStackNova(OpenStackNova, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianOpenStackNova, self).setup() - self.add_copy_specs(["/etc/sudoers.d/nova_sudoers"]) + self.add_copy_spec(["/etc/sudoers.d/nova_sudoers"]) class RedHatOpenStackNova(OpenStackNova, RedHatPlugin): @@ -138,7 +138,7 @@ class RedHatOpenStackNova(OpenStackNova, RedHatPlugin): def setup(self): super(RedHatOpenStackNova, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/logrotate.d/openstack-nova", "/etc/polkit-1/localauthority/50-local.d/50-nova.pkla", "/etc/sudoers.d/nova", diff --git a/sos/plugins/openswan.py b/sos/plugins/openswan.py index 039ab2d7..0e2d3f23 100644 --- a/sos/plugins/openswan.py +++ b/sos/plugins/openswan.py @@ -31,7 +31,7 @@ class Openswan(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('openswan',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ipsec.conf", "/etc/ipsec.d" ]) diff --git a/sos/plugins/ovirt.py b/sos/plugins/ovirt.py index 24c1cfa0..b169b903 100644 --- a/sos/plugins/ovirt.py +++ b/sos/plugins/ovirt.py @@ -84,7 +84,7 @@ class Ovirt(Plugin, RedHatPlugin): self.add_forbidden_path('/etc/ovirt-engine/.pgpass') self.add_forbidden_path('/etc/rhevm/.pgpass') # Copy engine config files. - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ovirt-engine", "/etc/rhevm/", "/etc/ovirt-engine-dwh", diff --git a/sos/plugins/ovirt_hosted_engine.py b/sos/plugins/ovirt_hosted_engine.py index 74fc4b28..aee8bc0a 100644 --- a/sos/plugins/ovirt_hosted_engine.py +++ b/sos/plugins/ovirt_hosted_engine.py @@ -41,9 +41,9 @@ class OvirtHostedEngine(Plugin, RedHatPlugin): # Add configuration files # Collecting the whole directory since it may contain branding # configuration files or third party plugins configuration files - self.add_copy_specs(['/etc/ovirt-hosted-engine-setup.env.d/']) + self.add_copy_spec(['/etc/ovirt-hosted-engine-setup.env.d/']) - self.add_copy_specs([ + self.add_copy_spec([ '/etc/ovirt-hosted-engine/answers.conf', '/etc/ovirt-hosted-engine/hosted-engine.conf', '/etc/ovirt-hosted-engine/vm.conf', @@ -65,7 +65,7 @@ class OvirtHostedEngine(Plugin, RedHatPlugin): sizelimit=self.limit ) - self.add_copy_specs([ + self.add_copy_spec([ '/var/log/ovirt-hosted-engine-ha/agent.log', '/var/log/ovirt-hosted-engine-ha/broker.log', ]) diff --git a/sos/plugins/pam.py b/sos/plugins/pam.py index 016796f7..28b6a240 100644 --- a/sos/plugins/pam.py +++ b/sos/plugins/pam.py @@ -24,7 +24,7 @@ class Pam(Plugin): security_libs = "" def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/pam.d", "/etc/security" ]) diff --git a/sos/plugins/pci.py b/sos/plugins/pci.py index 9e6470b8..ba9e6bbb 100644 --- a/sos/plugins/pci.py +++ b/sos/plugins/pci.py @@ -23,7 +23,7 @@ class Pci(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): profiles = ('hardware', 'system') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/ioports", "/proc/iomem", "/proc/bus/pci" diff --git a/sos/plugins/pcp.py b/sos/plugins/pcp.py index 7ca1a995..a696908e 100644 --- a/sos/plugins/pcp.py +++ b/sos/plugins/pcp.py @@ -87,7 +87,7 @@ class Pcp(Plugin, RedHatPlugin, DebianPlugin): # in a ridiculous way (i.e. setting PCP_SYSCONF_DIR to '/') this will # break badly. var_conf_dir = os.path.join(self.pcp_var_dir, 'config') - self.add_copy_specs([ + self.add_copy_spec([ self.pcp_sysconf_dir, var_conf_dir ]) @@ -138,7 +138,7 @@ class Pcp(Plugin, RedHatPlugin, DebianPlugin): else: self._log_warn("pcp_hostname was not set. Skipping.") - self.add_copy_specs([ + self.add_copy_spec([ # Collect PCP_LOG_DIR/pmcd and PCP_LOG_DIR/NOTICES os.path.join(self.pcp_log_dir, 'pmcd'), os.path.join(self.pcp_log_dir, 'NOTICES*'), diff --git a/sos/plugins/postfix.py b/sos/plugins/postfix.py index f6248ef8..efb9558a 100644 --- a/sos/plugins/postfix.py +++ b/sos/plugins/postfix.py @@ -24,7 +24,7 @@ class Postfix(Plugin): packages = ('postfix',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/postfix/main.cf", "/etc/postfix/master.cf" ]) diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py index 8cac0947..350131f3 100644 --- a/sos/plugins/postgresql.py +++ b/sos/plugins/postgresql.py @@ -145,7 +145,7 @@ class DebianPostgreSQL(PostgreSQL, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianPostgreSQL, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/postgresql/*.log", "/etc/postgresql/*/main/*.conf", "/var/lib/postgresql/*/main/PG_VERSION", diff --git a/sos/plugins/powerpath.py b/sos/plugins/powerpath.py index 349fd5d3..53692806 100644 --- a/sos/plugins/powerpath.py +++ b/sos/plugins/powerpath.py @@ -28,7 +28,7 @@ class PowerPath(Plugin, RedHatPlugin): """ EMC PowerPath specific information - files """ self.add_cmd_output("powermt version") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/init.d/PowerPath", "/etc/powermt.custom", "/etc/emcp_registration", diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index 6ef2704b..896d1d49 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -40,7 +40,7 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): isPowerNV = False if ispSeries or isPowerNV: - self.add_copy_specs([ + self.add_copy_spec([ "/proc/device-tree/", "/proc/loadavg", "/proc/locks", @@ -63,7 +63,7 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): ]) if ispSeries: - self.add_copy_specs([ + self.add_copy_spec([ "/proc/ppc64/lparcfg", "/proc/ppc64/eeh", "/proc/ppc64/systemcfg", @@ -81,7 +81,7 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): ]) if isPowerNV: - self.add_copy_specs([ + self.add_copy_spec([ "/proc/ppc64/eeh", "/proc/ppc64/systemcfg" "/proc/ppc64/topology_updates" diff --git a/sos/plugins/ppp.py b/sos/plugins/ppp.py index 8631e803..705e3865 100644 --- a/sos/plugins/ppp.py +++ b/sos/plugins/ppp.py @@ -27,7 +27,7 @@ class Ppp(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('ppp',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/wvdial.conf", "/etc/ppp", "/var/log/ppp" diff --git a/sos/plugins/processor.py b/sos/plugins/processor.py index afec86c1..19aca462 100644 --- a/sos/plugins/processor.py +++ b/sos/plugins/processor.py @@ -25,7 +25,7 @@ class Processor(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): packages = ('cpufreq-utils') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/cpuinfo", "/sys/class/cpuid", "/sys/devices/system/cpu" diff --git a/sos/plugins/psacct.py b/sos/plugins/psacct.py index 63bcebdc..026f6657 100644 --- a/sos/plugins/psacct.py +++ b/sos/plugins/psacct.py @@ -45,7 +45,7 @@ class DebianPsacct(Psacct, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianPsacct, self).setup() - self.add_copy_specs(["/var/log/account/pacct", "/etc/default/acct"]) + self.add_copy_spec(["/var/log/account/pacct", "/etc/default/acct"]) if self.get_option("all"): self.add_copy_spec("/var/log/account/pacct*.gz") diff --git a/sos/plugins/pxe.py b/sos/plugins/pxe.py index 08227d65..b7f1cfa4 100644 --- a/sos/plugins/pxe.py +++ b/sos/plugins/pxe.py @@ -43,7 +43,7 @@ class DebianPxe(Pxe, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianPxe, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/dhcp/dhcpd.conf", "/etc/default/tftpd-hpa" ]) diff --git a/sos/plugins/qpid.py b/sos/plugins/qpid.py index 8bbebde7..54931066 100644 --- a/sos/plugins/qpid.py +++ b/sos/plugins/qpid.py @@ -47,7 +47,7 @@ class Qpid(Plugin, RedHatPlugin): "ls -lanR /var/lib/qpidd" ]) - self.add_copy_specs([ + self.add_copy_spec([ "/etc/qpidd.conf", # applies to pre-0.22 versions "/etc/qpid/qpidd.conf", # applies since 0.22 version "/var/lib/qpid/syslog", diff --git a/sos/plugins/radius.py b/sos/plugins/radius.py index 22a9fceb..d8a56b4a 100644 --- a/sos/plugins/radius.py +++ b/sos/plugins/radius.py @@ -32,7 +32,7 @@ class RedHatRadius(Radius, RedHatPlugin): def setup(self): super(RedHatRadius, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/raddb", "/etc/pam.d/radiusd", "/var/log/radius" @@ -49,7 +49,7 @@ class DebianRadius(Radius, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianRadius, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/freeradius", "/etc/pam.d/radiusd", "/etc/default/freeradius", diff --git a/sos/plugins/s390.py b/sos/plugins/s390.py index 1e72ede8..9ffc2af7 100644 --- a/sos/plugins/s390.py +++ b/sos/plugins/s390.py @@ -32,7 +32,7 @@ class S390(Plugin, RedHatPlugin): # Gather s390 specific information def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/cio_ignore", "/proc/crypto", "/proc/dasd/devices", diff --git a/sos/plugins/samba.py b/sos/plugins/samba.py index d74b0435..e33876c0 100644 --- a/sos/plugins/samba.py +++ b/sos/plugins/samba.py @@ -23,7 +23,7 @@ class Samba(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('services',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/samba/smb.conf", "/etc/samba/lmhosts", "/var/log/samba/log.smbd", diff --git a/sos/plugins/satellite.py b/sos/plugins/satellite.py index 3eeaab83..feace668 100644 --- a/sos/plugins/satellite.py +++ b/sos/plugins/satellite.py @@ -41,7 +41,7 @@ class Satellite(Plugin, RedHatPlugin): def setup(self): self.rhn_package_check() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/httpd/conf*", "/etc/rhn", "/var/log/rhn*" @@ -51,14 +51,14 @@ class Satellite(Plugin, RedHatPlugin): self.add_copy_spec("/var/log/httpd") # all these used to go in $DIR/mon-logs/ - self.add_copy_specs([ + self.add_copy_spec([ "/opt/notification/var/*.log*", "/var/tmp/ack_handler.log*", "/var/tmp/enqueue.log*" ]) # monitoring scout logs - self.add_copy_specs([ + self.add_copy_spec([ "/home/nocpulse/var/*.log*", "/home/nocpulse/var/commands/*.log*", "/var/tmp/ack_handler.log*", @@ -75,7 +75,7 @@ class Satellite(Plugin, RedHatPlugin): root_symlink="database-character-sets") if self.satellite: - self.add_copy_specs([ + self.add_copy_spec([ "/etc/tnsnames.ora", "/etc/jabberd", "/etc/tomcat6/", @@ -86,6 +86,6 @@ class Satellite(Plugin, RedHatPlugin): % self.get_cmd_output_path(name="spacewalk-debug")) if self.proxy: - self.add_copy_specs(["/etc/squid", "/var/log/squid"]) + self.add_copy_spec(["/etc/squid", "/var/log/squid"]) # vim: et ts=4 sw=4 diff --git a/sos/plugins/scsi.py b/sos/plugins/scsi.py index b5724983..94520549 100644 --- a/sos/plugins/scsi.py +++ b/sos/plugins/scsi.py @@ -23,7 +23,7 @@ class Scsi(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): profiles = ('storage', 'hardware') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/scsi", "/etc/stinit.def", "/sys/bus/scsi", diff --git a/sos/plugins/sendmail.py b/sos/plugins/sendmail.py index 432f1704..e88d9782 100644 --- a/sos/plugins/sendmail.py +++ b/sos/plugins/sendmail.py @@ -34,7 +34,7 @@ class RedHatSendmail(Sendmail, RedHatPlugin): def setup(self): super(RedHatSendmail, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/mail/*", "/var/log/maillog" ]) @@ -47,7 +47,7 @@ class DebianSendmail(Sendmail, DebianPlugin, UbuntuPlugin): def setup(self): super(DebianSendmail, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/mail/*", "/var/log/mail.*" ]) diff --git a/sos/plugins/smartcard.py b/sos/plugins/smartcard.py index 9841d204..e92f1883 100644 --- a/sos/plugins/smartcard.py +++ b/sos/plugins/smartcard.py @@ -28,7 +28,7 @@ class Smartcard(Plugin, RedHatPlugin): packages = ('pam_pkcs11',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/reader.conf", "/etc/reader.conf.d/", "/etc/pam_pkcs11/"]) diff --git a/sos/plugins/soundcard.py b/sos/plugins/soundcard.py index 347dfc47..1ebde602 100644 --- a/sos/plugins/soundcard.py +++ b/sos/plugins/soundcard.py @@ -36,7 +36,7 @@ class RedHatSoundcard(Soundcard, RedHatPlugin): def setup(self): super(RedHatSoundcard, self).setup() - self.add_copy_specs([ + self.add_copy_spec([ "/etc/alsa/*", "/etc/asound.*" ]) diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py index b046a08b..0d596e5f 100644 --- a/sos/plugins/squid.py +++ b/sos/plugins/squid.py @@ -44,7 +44,7 @@ class DebianSquid(Squid, DebianPlugin, UbuntuPlugin): sizelimit=self.get_option('log_size')) self.add_copy_spec_limit("/var/log/squid3/*", sizelimit=self.get_option('log_size')) - self.add_copy_specs(['/etc/squid-deb-proxy']) + self.add_copy_spec(['/etc/squid-deb-proxy']) self.add_copy_spec_limit("/var/log/squid-deb-proxy/*", sizelimit=self.get_option('log_size')) # vim: et ts=4 sw=4 diff --git a/sos/plugins/ssh.py b/sos/plugins/ssh.py index f8f772ba..f5cd625c 100644 --- a/sos/plugins/ssh.py +++ b/sos/plugins/ssh.py @@ -25,7 +25,7 @@ class Ssh(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('services', 'security', 'identity') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ssh/ssh_config", "/etc/ssh/sshd_config" ]) diff --git a/sos/plugins/ssmtp.py b/sos/plugins/ssmtp.py index f0fa8bfa..14653e65 100644 --- a/sos/plugins/ssmtp.py +++ b/sos/plugins/ssmtp.py @@ -26,7 +26,7 @@ class Ssmtp(Plugin, RedHatPlugin): packages = ('ssmtp',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ssmtp/ssmtp.conf", "/etc/ssmtp/revaliases", "/etc/aliases" diff --git a/sos/plugins/sssd.py b/sos/plugins/sssd.py index 8888c5cf..25fe61d2 100644 --- a/sos/plugins/sssd.py +++ b/sos/plugins/sssd.py @@ -26,7 +26,7 @@ class Sssd(Plugin): packages = ('sssd',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/sssd/sssd.conf", "/var/log/sssd/*" ]) diff --git a/sos/plugins/startup.py b/sos/plugins/startup.py index afa0c9ed..4bf45111 100644 --- a/sos/plugins/startup.py +++ b/sos/plugins/startup.py @@ -26,7 +26,7 @@ class Startup(Plugin): "slow", False)] def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/inittab", "/etc/rc.d" ]) diff --git a/sos/plugins/symcli.py b/sos/plugins/symcli.py index 95ce79d0..fd9c896c 100644 --- a/sos/plugins/symcli.py +++ b/sos/plugins/symcli.py @@ -28,7 +28,7 @@ class Symcli(Plugin, RedHatPlugin): def get_symcli_files(self): """ EMC Solutions Enabler SYMCLI specific information - files """ - self.add_copy_specs([ + self.add_copy_spec([ "/var/symapi/db/symapi_db.bin", "/var/symapi/config/[a-z]*", "/var/symapi/log/[a-z]*" diff --git a/sos/plugins/systemd.py b/sos/plugins/systemd.py index cd8ac7fd..b2e50eec 100644 --- a/sos/plugins/systemd.py +++ b/sos/plugins/systemd.py @@ -46,7 +46,7 @@ class Systemd(Plugin, RedHatPlugin): if self.get_option("verify"): self.add_cmd_output("journalctl --verify") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/systemd", "/lib/systemd/system", "/lib/systemd/user", diff --git a/sos/plugins/sysvipc.py b/sos/plugins/sysvipc.py index fe989429..75b79b59 100644 --- a/sos/plugins/sysvipc.py +++ b/sos/plugins/sysvipc.py @@ -24,7 +24,7 @@ class SysVIPC(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system', 'services') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/sysvipc/msg", "/proc/sysvipc/sem", "/proc/sysvipc/shm" diff --git a/sos/plugins/teamd.py b/sos/plugins/teamd.py index cdd53b83..284d23e6 100644 --- a/sos/plugins/teamd.py +++ b/sos/plugins/teamd.py @@ -37,7 +37,7 @@ class Teamd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): return teams def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/dbus-1/system.d/teamd.conf", "/usr/lib/systemd/system/teamd@.service" ]) diff --git a/sos/plugins/tomcat.py b/sos/plugins/tomcat.py index e048aae9..b7aea2cb 100644 --- a/sos/plugins/tomcat.py +++ b/sos/plugins/tomcat.py @@ -25,7 +25,7 @@ class Tomcat(Plugin, RedHatPlugin): packages = ('tomcat6',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/tomcat6", "/var/log/tomcat6/catalina.out" ]) diff --git a/sos/plugins/tuned.py b/sos/plugins/tuned.py index 7b8c68a9..6e0394d4 100644 --- a/sos/plugins/tuned.py +++ b/sos/plugins/tuned.py @@ -30,7 +30,7 @@ class Tuned(Plugin, RedHatPlugin): "tuned-adm active", "tuned-adm recommend" ]) - self.add_copy_specs([ + self.add_copy_spec([ "/etc/tuned", "/usr/lib/tuned", "/var/log/tuned/tuned.log" diff --git a/sos/plugins/udev.py b/sos/plugins/udev.py index 62cdb27f..706c6719 100644 --- a/sos/plugins/udev.py +++ b/sos/plugins/udev.py @@ -23,7 +23,7 @@ class Udev(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): profiles = ('system', 'hardware', 'boot') def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/udev/udev.conf", "/lib/udev/rules.d", "/etc/udev/rules.d/*" diff --git a/sos/plugins/upstart.py b/sos/plugins/upstart.py index 01a02c1c..7b8b5c08 100644 --- a/sos/plugins/upstart.py +++ b/sos/plugins/upstart.py @@ -34,7 +34,7 @@ class Upstart(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): ]) # Job Configuration Files - self.add_copy_specs([ + self.add_copy_spec([ '/etc/init.conf', '/etc/event.d/*', '/etc/init/*.conf' diff --git a/sos/plugins/vmware.py b/sos/plugins/vmware.py index 6932ff7e..02c7c1e5 100644 --- a/sos/plugins/vmware.py +++ b/sos/plugins/vmware.py @@ -26,7 +26,7 @@ class VMWare(Plugin, RedHatPlugin): def setup(self): self.add_cmd_output("vmware -v") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/vmware/locations", "/etc/vmware/config", "/proc/vmmemctl" diff --git a/sos/plugins/vsftpd.py b/sos/plugins/vsftpd.py index 09760bf5..6c254e12 100644 --- a/sos/plugins/vsftpd.py +++ b/sos/plugins/vsftpd.py @@ -26,7 +26,7 @@ class Vsftpd(Plugin, RedHatPlugin): packages = ('vsftpd',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/ftp*", "/etc/vsftpd" ]) diff --git a/sos/plugins/x11.py b/sos/plugins/x11.py index bbf2970e..2a608507 100644 --- a/sos/plugins/x11.py +++ b/sos/plugins/x11.py @@ -25,7 +25,7 @@ class X11(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): files = ('/etc/X11',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/X11", "/var/log/Xorg.*.log", "/var/log/XFree86.*.log", diff --git a/sos/plugins/xen.py b/sos/plugins/xen.py index a0ce130a..284b079e 100644 --- a/sos/plugins/xen.py +++ b/sos/plugins/xen.py @@ -49,7 +49,7 @@ class Xen(Plugin, RedHatPlugin): return xs_pidnum.isdigit() def dom_collect_proc(self): - self.add_copy_specs([ + self.add_copy_spec([ "/proc/xen/balloon", "/proc/xen/capabilities", "/proc/xen/xsd_kva", @@ -72,7 +72,7 @@ class Xen(Plugin, RedHatPlugin): pass elif host_type == "dom0": # default of dom0, collect lots of system information - self.add_copy_specs([ + self.add_copy_spec([ "/var/log/xen", "/etc/xen", "/sys/hypervisor/version", diff --git a/sos/plugins/xinetd.py b/sos/plugins/xinetd.py index 7367c86e..fe39bc0b 100644 --- a/sos/plugins/xinetd.py +++ b/sos/plugins/xinetd.py @@ -28,7 +28,7 @@ class Xinetd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): packages = ('xinetd',) def setup(self): - self.add_copy_specs([ + self.add_copy_spec([ "/etc/xinetd.conf", "/etc/xinetd.d" ]) diff --git a/sos/plugins/yum.py b/sos/plugins/yum.py index 937bd9f6..7dac5e47 100644 --- a/sos/plugins/yum.py +++ b/sos/plugins/yum.py @@ -30,7 +30,7 @@ class Yum(Plugin, RedHatPlugin): def setup(self): # Pull all yum related information - self.add_copy_specs([ + self.add_copy_spec([ "/etc/yum", "/etc/yum.repos.d", "/etc/yum.conf", @@ -42,7 +42,7 @@ class Yum(Plugin, RedHatPlugin): # candlepin info self.add_forbidden_path("/etc/pki/entitlement/key.pem") self.add_forbidden_path("/etc/pki/entitlement/*-key.pem") - self.add_copy_specs([ + self.add_copy_spec([ "/etc/pki/product/*.pem", "/etc/pki/consumer/cert.pem", "/etc/pki/entitlement/*.pem", diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py index b7b13b22..817e4f23 100644 --- a/tests/plugin_tests.py +++ b/tests/plugin_tests.py @@ -235,15 +235,6 @@ class AddCopySpecTests(unittest.TestCase): self.mp.add_copy_spec_limit("tests/tail_test.txt", 1) self.assert_expect_paths() - # add_copy_specs() - - def test_add_copy_specs(self): - self.mp.add_copy_specs(["tests/tail_test.txt"]) - self.assert_expect_paths() - - def test_add_copy_spec_nostrings(self): - self.assertRaises(TypeError, self.mp.add_copy_specs,"stringsarebadmkay?") - # add_copy_spec_limit() def test_single_file_over_limit(self): -- cgit