3 ܓi @shddlZddlZddlmZmZddlmZddlmZddl m Z GdddeZ Gdd d e Z dS) N) RedHatPlugin SuSEPlugin) LinuxPolicy)RpmPackageManager)_soscsNeZdZdZdZdgZdZdfdd Zedd d Z d d Z ddZ Z S) SuSEPolicySuSEDistribution Websitehttps://www.suse.com/z/var/tmpNTcstj||||d|jttg7_d|_t|_|jjsR|j j dt j dd|_ |j tjd7_ |j tjd7_ |jdS)N)sysrootinit 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_path)selfr r r r) __class__/usr/lib/python3.6/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|S)N)_tmp_dir)rZ opt_tmp_dirrrr get_tmp_dir4szSuSEPolicy.get_tmp_dircCs|jS)N)Z host_name)rrrrget_local_name9szSuSEPolicy.get_local_name)r r )NNTN)r) __name__ __module__ __qualname__os_release_namevendor vendor_urlsrr classmethodrr r! __classcell__rr)rrrs rcs8eZdZdZd gZdZdZedZd fd d Z Z S) OpenSuSEPolicyrCommunity Websitehttps://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)N)r r r r)rr)rr r r r)rrrrOs zOpenSuSEPolicy.__init__)r+r,)NNTN) r"r#r$r&r'r%Zos_release_file_msgrr)rr)rrr*=s r*)rrZsos.report.pluginsrrZsos.policies.distrosrZ!sos.policies.package_managers.rpmrZsosrr-rr*rrrr s   *