o idy @shddlZddlZddlmZmZddlmZddlmZddl m Z GdddeZ Gdd d e Z dS) N) RedHatPlugin SuSEPlugin) LinuxPolicy)RpmPackageManager)_soscsReZdZdZdZdgZdZ  dfdd Zedd d Z d d Z d dZ Z S) SuSEPolicySuSE)zDistribution Websitezhttps://www.suse.com/z/var/tmpNTcstt|j||||d|jttg7_d|_t|_|jj s+|j dt dd|_|jtjd7_|jtjd7_|dS)Nsysrootinit probe_runtime remote_execFz(Could not obtain installed package list.z"/usr/sbin:/usr/bin:/root/bin:/sbinz/usr/local/binz/usr/local/sbin)superr__init__valid_subclassesrrusrmoverpackage_managerpackagesui_logerrorsysexitPATHospathsep set_exec_pathselfr r r r  __class__;/usr/lib/python3/dist-packages/sos/policies/distros/suse.pyrs   zSuSEPolicy.__init__cCsdS)zThis method checks to see if we are running on SuSE. It must be overriden by concrete subclasses to return True when running on an OpenSuSE, SLES or other Suse distribution and False otherwise.Fr!clsremoter!r!r"check-szSuSEPolicy.checkcCs|s|jS|SN)_tmp_dir)r opt_tmp_dirr!r!r" get_tmp_dir4szSuSEPolicy.get_tmp_dircCs|Sr() host_name)rr!r!r"get_local_name9szSuSEPolicy.get_local_nameNNTN)r#) __name__ __module__ __qualname__distrovendor vendor_urlsr)r classmethodr'r+r- __classcell__r!r!rr"rs rcsDeZdZdZdZdgZedZ  d fdd Ze d d Z Z S) OpenSuSEPolicyOpenSuSEr)zCommunity Websitezhttps://www.opensuse.org/aJThis command will collect diagnostic and configuration information from this %(distro)s system and installed applications. An archive containing the collected information will be generated in %(tmpdir)s and may be provided to a %(vendor)s support representative. No changes will be made to system configuration. %(vendor_text)s NTcstt|j||||ddS)Nr )rr7rrrr!r"rNs zOpenSuSEPolicy.__init__cCs|r|j|vStjdS)z=This method checks to see if we are running on SuSE. z/etc/SUSE-brand)r2rpathisfiler$r!r!r"r'Ts  zOpenSuSEPolicy.checkr.) r/r0r1r2r3r4_msgrr5r'r6r!r!rr"r7=s r7)rrsos.report.pluginsrrsos.policies.distrosr!sos.policies.package_managers.rpmrsosrr;rr7r!r!r!r"s    *