Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/module_utils/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/module_utils/manageiq.pyo

�
�Udac@s�ddlZddlZddlmZdZyddlmZeZ	Wn#e
k
rmej�ZeZ	nXd�Z
d�Zd�Zd�Zdefd	��YZdS(
i����N(tmissing_required_lib(tManageIQClientcCs�tdtdtjjdd��dtdtjjdd��dtdtjjdd�dt�d	tdtjjd
d�dt�dtdtdd
ddg�dtdtddddg��}tdtdddtd|��S(NturltdefaulttMIQ_URLtusernametMIQ_USERNAMEtpasswordtMIQ_PASSWORDtno_logttokent	MIQ_TOKENtvalidate_certsttypetbooltaliasest
verify_ssltca_certtrequiredtca_bundle_pathtmanageiq_connectiontdicttapply_defaultstoptions(RtostenvirontgettNonetTruetFalse(R((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytmanageiq_argument_spec,s$$!cCs)ts%|jdtd�dt�ndS(Ntmsgsmanageiq-clientt	exception(t
HAS_CLIENTt	fail_jsonRtCLIENT_IMP_ERR(tmodule((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytcheck_client=sc	Cs�|jd}d}|d}|d}|d}|d}|rM|rM|sY|r]|r]|SxCdddgD]2}||d	krm|jd|j|��qmqmWdS(
NRs2missing required argument: manageiq_connection[{}]RR
RRtR(NR&(tparamsRR"tformat(R$R't	error_strRR
RRtarg((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytvalidate_connection_paramsBs




cCsfidd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6S(Nt	providerstproviderthoststhosttvmstvmt
categoriestcategorytclusterstclustertdata_storess
data storetgroupstgrouptresource_poolss
resource pooltservicestservicetservice_templatessservice templatet	templatesttemplatettenantsttenanttuserstusert
blueprintst	blueprint((((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytmanageiq_entitiesQstManageIQcBsVeZdZd�Zed��Zed��Zed��Zd�Zd�Z	RS(s6
        class encapsulating ManageIQ API client.
    c
Cs�t|�t|�}|d}|d}|d}|d}|d}|d}||_|d|_td|d|d|�|_y(t|j|jd	|d
|�|_Wn6tk
r�}	|j	j
dd|t|	�f�nXdS(
NRRRR
RRs/apiRBRRRs"failed to open connection (%s): %s(R%R+t_modulet_api_urlRt_authRt_clientt	ExceptionR$R"tstr(
tselfR$R'RRRR
RRte((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pyt__init__`s






	
(cCs|jS(sP Ansible module module

        Returns:
            the ansible module
        (RG(RM((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pyR$uscCs|jS(sO Base ManageIQ API

        Returns:
            the base ManageIQ API
        (RH(RM((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytapi_url~scCs|jS(sK ManageIQ client

        Returns:
            the ManageIQ client
        (RJ(RM((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytclient�scKsry"|jjj|�j|�}WnCtk
r6dStk
rg}|jjddj	d|��nXt
|�S(s� Searches the collection resource by the collection name and the param passed.

        Returns:
            the resource as an object if it exists in manageiq, None otherwise.
        Rsfailed to find resource {error}terrorN(RQtcollectionst__getattribute__Rt
ValueErrorRRKR$R"R(tvars(RMtcollection_nameR'tentityRN((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pytfind_collection_resource_by�s"
#cKsQ|j||�}|r|Sdjd|dt|��}|jjd|�dS(s� Searches the collection resource by the collection name and the param passed.

        Returns:
            the resource as an object if it exists in manageiq, Fail otherwise.
        s;{collection_name} where {params} does not exist in manageiqRWR'RN(RYR(RLR$R"(RMRWR'tresourceR((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pyt find_collection_resource_or_fail�s	(
t__name__t
__module__t__doc__ROtpropertyR$RPRQRYR[(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pyRF[s					(Rt	tracebacktansible.module_utils.basicRRR#tmanageiq_client.apiRRR!tImportErrort
format_excRRR%R+REtobjectRF(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/manageiq.pyt<module>s


				

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]