B
    `                 @   sT   d Z ddlmZmZmZ eZddlZddlm	Z
 ddlmZmZ G dd	 d	eZdS )
z#Layout provider for Ansible source.    )absolute_importdivisionprint_functionN   )types   )ContentLayoutLayoutProviderc               @   s$   e Zd ZdZedd Zdd ZdS )AnsibleLayoutz#Layout provider for Ansible source.c             C   s,   t jt j| do*t jt j| dS )zBReturn True if the given path is a content root for this provider.zsetup.pyzbin/ansible-test)ospathexistsjoin)r    r   ]/home/dcms/DCMS/lib/python3.7/site-packages/ansible_test/_internal/provider/layout/ansible.pyis_content_root   s    zAnsibleLayout.is_content_rootc             C   sN   t dd | jD }|t ddd t|||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             s   s    | ]}|t jd |fV  qdS )zlib/ansible/pluginsN)r   r   r   ).0pr   r   r   	<genexpr>   s    z'AnsibleLayout.create.<locals>.<genexpr>zlib/ansible/moduleszlib/ansible/module_utils)modulesZmodule_utilsN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_pathsZ
collectionZ	test_pathZresults_pathZsanity_pathZsanity_messagesZintegration_pathZintegration_targets_pathZintegration_vars_pathZintegration_messagesZ	unit_pathZunit_module_pathZunit_module_utils_pathZunit_messages)dictZPLUGIN_TYPESupdater   )selfrootpathsr   r   r   r   create   s(    
zAnsibleLayout.createN)__name__
__module____qualname____doc__staticmethodr   r   r   r   r   r   r
      s   r
   )r!   
__future__r   r   r   type__metaclass__r    r   tr   r	   r
   r   r   r   r   <module>   s   