HEX
Server: LiteSpeed
System: Linux oxygen.shetabanhost.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: rasapedi (1695)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/site-packages/leapp/repository/scan.pyc
�
�S4bc@s�ddlZddlmZmZddlmZddlmZddlm	Z	ddl
mZmZm
Z
d�Zd�Zded	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS(i����N(t
RepositorytDefinitionKind(tRepositoryManager(tActorDefinition(tRepositoryConfigurationError(tget_global_repositories_datatget_user_config_repo_datat
find_reposcCsxi}xFt�j�D]5\}}|dr|ji|d|d6�qqW|rt|jt�jdi��n|S(Ntenabledtpathtidtrepos(RtitemstupdateRtget(tinclude_localstdatatrepo_idtentry((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyt_make_repo_lookup
s
#cCs�td|�}|r1|j�r1td��nt}xT|s�|j�}x;|D]-}||krS|jt||��PqSqSWt}q:W|j�r�tdjdj|����ndS(NRs=No repos configured? Try adding some with "snactor repo find"s!Missing repositories detected: {}s, (	Rtget_missing_repo_linksRtFalsetadd_repot	scan_repotTruetformattjoin(tmanagerRtrepo_lookuptfinishedtmissingR((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyt_resolve_repository_linkss	

cCsetjj|�ra|pt�}x't|�D]}|jt|��q.Wtd|d|�n|S(s.
    Finds and scans all repositories found in the path and it will also resolve linked repositories.
    Using include_locals=True will additionally include user local repositories to be considered for
    resolving linked repositories.

    :param path: Path to scan for repositories
    :param manager: Optional repository manager to add found repos too
    :param include_locals: Should repositories linked be searched from the user local registry
    :return: repository manager instance (either passed through or a new instance if none was passed)
    RR(tosR	texistsRRRRR(R	RRt
repository((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pytfind_and_scan_repositories*scCs%tjj|�}tt|�|�S(sn
    Scans all related repository resources

    :param path:
    :type path: str
    :return: repository
    (R R	tabspathtscanR(R	((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR=scCs�|jjd|�dtfdtfdtfdtfdtfdtfdtfd	t	fd
t
fdtff
}gtj
|�D]-}tjjtjj||��r�|^q�}xB|D]:\}}||kr�||tjj||�|�q�q�W|S(s�
    Scans all repository resources

    :param repository:
    :type repository: :py:class:`leapp.repository.Repository`
    :param path: path to the repository
    :type path: str
    :return: instance of :py:class:`leapp.repository.Repository`
    sScanning path %sttopicstmodelstactorsttagst	workflowstfilest	librariestteststtoolstapis(tlogtdebugtscan_topicstscan_modelstscan_actorst	scan_tagstscan_workflowst
scan_filestscan_librariest
scan_testst
scan_toolst	scan_apisR tlistdirR	tisdirR(R"R	t
scan_taskstetdirstnamettask((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR%Is 
									C&cCs�x�tj|�D]~\}}}xl|D]d}tjj|�\}}|dkr&tjj||�}|jtjtjj||��q&q&WqWdS(s
    Scans topics and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the topics
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    s.pyN(	R twalkR	tsplitextRtaddRtTOPICtrelpath(trepoR	t	repo_pathtroottunusedR+tmoduletext((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR2gs
c
Cs�x�tj|�D]r\}}}x`|D]X}|dkr&tjj||�}|jtjtt||d|j	�|��q&q&WqWdS(s
    Scans actors and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the actors
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    sactor.pyR0N(
R RCR	RGRERtACTORR%RR0(RHR	RIRJRKR+RLtrel_path((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR4zs

cCs�x�tj|�D]~\}}}xl|D]d}tjj|�\}}|dkr&tjj||�}|jtjtjj||��q&q&WqWdS(s
    Scans tags and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the tags
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    s.pyN(	R RCR	RDRRERtTAGRG(RHR	RIRJRKR+RLRM((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR5�s
cCs�x�tj|�D]~\}}}xl|D]d}tjj|�\}}|dkr&tjj||�}|jtjtjj||��q&q&WqWdS(s
    Scans models and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the models
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    s.pyN(	R RCR	RDRRERtMODELRG(RHR	RIRJRKR+RLRM((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR3�s
cCs�x�tj|�D]~\}}}xl|D]d}tjj|�\}}|dkr&tjj||�}|jtjtjj||��q&q&WqWdS(s 
    Scans workflows and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the workflows
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    s.pyN(	R RCR	RDRRERtWORKFLOWRG(RHR	RIRJRKR+RLRM((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR6�s
cCs8tj|�r4|jtjtjj||��ndS(s
    Scans files and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the files
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    N(R R<RERtFILESR	RG(RHR	RI((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR7�scCs8tj|�r4|jtjtjj||��ndS(s 
    Scans libraries and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the libraries
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    N(R R<RERt	LIBRARIESR	RG(RHR	RI((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR8�scCs8tj|�r4|jtjtjj||��ndS(s
    Scans tools and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the tools
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    N(R R<RERtTOOLSR	RG(RHR	RI((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR:�scCs8tj|�r4|jtjtjj||��ndS(s
    Scans tests and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the tests
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    N(R R<RERtTESTSR	RG(RHR	RI((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR9�scCs8tj|�r4|jtjtjj||��ndS(s
    Scans apis and adds them to the repository.

    :param repo: Instance of the repository
    :type repo: :py:class:`leapp.repository.Repository`
    :param path: path to the apis
    :type path: str
    :param repo_path: path to the repository
    :type repo_path: str
    N(R R<RERtAPIR	RG(RHR	RI((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyR;s(R tleapp.repositoryRRtleapp.repository.managerRt!leapp.repository.actor_definitionRtleapp.exceptionsRtleapp.utils.repositoryRRRRRtNoneRR#RR%R2R4R5R3R6R7R8R:R9R;(((s9/usr/lib/python2.7/site-packages/leapp/repository/scan.pyt<module>s(