a >h @shddlZddlZddlmZmZddlmZddlmZddl m Z GdddeZ Gdd d e Z dS) N) RedHatPlugin SuSEPlugin) LinuxPolicy)RpmPackageManager)_soscsNeZdZdZdZdgZdZdfdd Zedd d Z d d Z d dZ Z S) SuSEPolicySuSE)zDistribution Websitezhttps://www.suse.com/z/var/tmpNTcstj||||d|jttg7_d|_t|_|jjsR|j dt dd|_ |j tjd7_ |j tjd7_ |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)super__init__Zvalid_subclassesrrZusrmoverZpackage_managerZpackagesZui_logerrorsysexitPATHospathsepZ set_exec_pathselfr r r r  __class__=/usr/lib/python3.9/site-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)clsZremoterrrcheck-szSuSEPolicy.checkcCs|s |jS|SN)_tmp_dir)rZ opt_tmp_dirrrr get_tmp_dir4szSuSEPolicy.get_tmp_dircCs|Sr )Z host_name)rrrrget_local_name9szSuSEPolicy.get_local_name)NNTN)r) __name__ __module__ __qualname__os_release_namevendor vendor_urlsr!r classmethodrr"r# __classcell__rrrrrs rcs8eZdZdZdgZdZdZedZd fdd Z Z S) OpenSuSEPolicyr)zCommunity Websitezhttps://www.opensuse.org/ZOpenSuSEz/etc/SUSE-brandaSThis command will collect diagnostic and configuration information from this %(os_release_name)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 NTcstj||||ddS)Nr )rrrrrrrOs zOpenSuSEPolicy.__init__)NNTN) r$r%r&r(r)r'Zos_release_file_msgrr+rrrrr,=s r,)rrZsos.report.pluginsrrZsos.policies.distrosrZ!sos.policies.package_managers.rpmrZsosrr-rr,rrrr s   *