
    >Tf                     8    d dl Z d dlmZ dZ G d d          ZdS )    N)SourceFileLoader)PythonModuleMixinc                   F    e Zd Zd Zed             Zed             Zd ZdS )r   c                 8    | j                             |          S )z
        Returns a list of Jobs associated with this specific script or report module
        :param name: The class name of the script or report
        :return: List of Jobs associated with this
        )name)jobsfilter)selfr   s     9/var/www/html/netbox-4.1.3/netbox/extras/models/mixins.pyget_jobszPythonModuleMixin.get_jobs   s&     y   
 
 	
    c                 V    t           j                            | j                  d         S )Nr   )ospathsplitext	file_path)r
   s    r   r   zPythonModuleMixin.path   s    w//22r   c                     t           j                            | j                  \  }}t           j                            |          d         }|dk    rt           j                            |          S |S )Nr   __init__)r   r   split	full_pathr   basename)r
   r   filenamer   s       r   python_namezPythonModuleMixin.python_name   s[    t~66hw))!,:7##D)))Kr   c                 b    t          | j        | j                  }|                                }|S )N)r   r   r   load_module)r
   loadermodules      r   
get_modulezPythonModuleMixin.get_module#   s,    !$"2DNCC##%%r   N)__name__
__module____qualname__r   propertyr   r   r    r   r   r   r   	   sh        
 
 
 3 3 X3   X    r   r   )r   importlib.machineryr   __all__r   r#   r   r   <module>r&      sY    				 0 0 0 0 0 0
         r   