ok

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/clcommon/cpapi/
Upload File :
Current File : //usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyc

�
b=0Yc	@sSdZddlZddlZddlmZddlmZmZddddd	d
ddd
g	ZedgZ	e	Z
d�Ze�Zd�Z
d�Zd�Zded�Zdd d�Zd�Zd�Zd�Zd�ZddlmZejeZxHeD]@Zeee�r2e ee�Z!n	d�Z!e"eee!�qWdS(!s<
CloudLinux control panel API
API for Hosting control panel
i����N(tNotSupported(tCACHE_CPNAMEtUNKNOWN_CP_NAMEtcpuserst	resellerst	db_accesstdblogin_cplogin_pairstcpinfotget_admin_emailtdocroottuserdomainsthomedirst	getCPNamecCsGt}tjjt�rCtt�}|j�j�}|j�n|S(N(	RtostpathtisfileRtopentreadlinetstriptclose(tcontrolpanelnametcache_stream((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyRs
cCsdS(s�
    Generates a list of cpusers registered in the control panel

    :return: list of cpusers registered in the control panel
    :rtype: tuple
    :raise: NotSupported
    N((((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR(scCsdS(s�
    Generates a list of resellers in the control panel

    :return: list of cpusers registered in the control panel
    :rtype: tuple
    :raise: NotSupported
    N((((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR3scCsdS(s�
    Getting root access to mysql database.
    For example {'login': 'root', 'db': 'mysql', 'host': 'localhost', 'pass': '9pJUv38sAqqW'}

    :return: root access to mysql database
    :rtype: dict
    :raises: NoDBAccessData, NotSupported
    N((((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR>s	cCsdS(s�
    Returs a list of pairs, the database user login - user login control panel
    For example:
        (('nata2_someuse', 'nata2'), ('testsome_dfrtbus', 'testsome'))
    :param list|tuple|None cplogin_lst: list of control panel users
    :param bool with_system_users: add system users to dbmapping
    :return: list of pairs, the database user login - user login control panel
    :rtype: tuple
    :raises: NotSupported, NoPackage
    N((tcplogin_lsttwith_system_users((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyRJstcplogintpackagetmailtresellertdnscCsdS(s�
    keyls a list of data which is necessary to obtain the user, the values ​​can be:
       cplogin - name/login user control panel
       mail - Email users
       reseller - name reseller/owner users
       locale - localization of the user account
       package - User name of the package
       dns - domain of the user
    :param str|unicode|list|tuple|None cpuser: user login
    :return: returns a tuple of tuples of data in the same sequence as specified keys in keylst
    :rtype: tuple
    (((tcpusertkeyls((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyRXs
cCsdS(s<
    Gets admin email
    :return: string - admin email
    t((((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyRhscCsdS(sr
    Return document root for domain
    :param str|unicode domain:
    :return str: document root for domain
    R((tdomain((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR	pscCsdgS(s�
    Return domain and document root pairs for control panel user
    first domain is main domain
    :param str|unicode cpuser: user login
    :return list of tuples (domain_name, documen_root)
    (((R((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR
yscCsgS(s�
    Returns list of users' home dirs for particular detected panel
    In case of no panel it returns empty list
    :return list of home dirs
    ((((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR�s(tapicOs-ttddttf�ttj��dS(Ntnot_supports,"%s" api not supported in "%s" control panel(tsetattrt	_api_funct	_api_nametCP_NAMERR"(targstkwargs((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyR$�s(RRRRR(#t__doc__R
tsystcpapiexceptionsRtconstRRt
_API_IMPORTEDt_API_SUPPORTEDt__all__RR&RRRtNonetFalseRRRR	R
RtapilinkR!t
_apiplugintmodulest__name__t_thismoduleR%thasattrtgetattrR$R#(((s;/usr/lib/python2.7/site-packages/clcommon/cpapi/__init__.pyt<module>s4
													

	

Zerion Mini Shell 1.0