
    Vh                    R    d Z ddlmZ ddlZddlmZmZ ddlmZm	Z	  G d d	e      Z
y)
#Layout provider for Ansible source.    )annotationsN   )ContentLayoutLayoutProvider   )ANSIBLE_SOURCE_ROOTANSIBLE_TEST_ROOTc                  *    e Zd ZdZedd       ZddZy)AnsibleLayoutr   c                    t         j                  j                  t         j                  j                  | d            xr= t         j                  j	                  t         j                  j                  | d            S )zBReturn True if the given path is a content root for this provider.zpyproject.tomlztest/lib/ansible_test)ospathisfilejoinisdir)r   s    ^/home/dcms/DCMS/lib/python3.12/site-packages/ansible_test/_internal/provider/layout/ansible.pyis_content_rootzAnsibleLayout.is_content_root   sa     ww~~bggll41ABC  CVXV]V]VbVbcg  jA  WB  IC  	C    c                    t        d | j                  D              }|j                  dd       g }|t        k7  r#|j	                  d| dt
         ddd	| d
f       t        ||f|ddddddddddddd|dS )z/Create a Layout using the given root and paths.c              3  `   K   | ]&  }|t         j                  j                  d |      f ( yw)zlib/ansible/pluginsN)r   r   r   ).0ps     r   	<genexpr>z'AnsibleLayout.create.<locals>.<genexpr>   s%     cAQ-BA FGcs   ,.zlib/ansible/moduleszlib/ansible/module_utils)modulesmodule_utilszCannot test "z" with ansible-test from "z". zDid you intend to run "z/bin/ansible-test" instead?Ntestztest/resultsztest/sanityztest/integrationztest/integration/targetsz'test/integration/integration_config.ymlz
test/unitsztest/units/modulesztest/units/module_utils)plugin_paths
collection	test_pathresults_pathsanity_pathsanity_messagesintegration_pathintegration_targets_pathintegration_vars_pathintegration_messages	unit_pathunit_module_pathunit_module_utils_pathunit_messagesunsupported)dictPLUGIN_TYPESupdater	   extendr
   r   )selfrootpathsr   errorss        r   createzAnsibleLayout.create   s    cQUQbQbcc)3 	 	

 &&MMv%?@Q?RRTU)$/JK  
 &'% /%?"K!%"1#<#
 	
r   N)r   strreturnbool)r3   r7   r4   z	list[str]r8   r   )__name__
__module____qualname____doc__staticmethodr   r6    r   r   r   r      s    -C C$
r   r   )r=   
__future__r   r   r   r   r   utilr	   r
   r   r?   r   r   <module>rB      s$    ) " 	
,
N ,
r   