
    d-                          G d  de       Z G d de       Z G d de      Z G d de      Zej
                   e       iZej                   e       iZd Z	d	 Z
d
 Zy)c                       e Zd ZdZdZdZdZy)SupportedFeatureNameszY
    Enum for defining the Feature Names for all features that we the agent supports
    MultipleExtensionsPerHandlerExtensionTelemetryPipeline	FastTrackN)__name__
__module____qualname____doc__MultiConfigr   r        P/usr/lib/python3/dist-packages/azurelinuxagent/common/agent_supported_feature.pyr   r      s     1K!=Ir   r   c                   H    e Zd ZdZddZed        Zed        Zed        Zy)AgentSupportedFeaturez|
    Interface for defining all features that the Linux Guest Agent supports and reports their if supported back to CRP
    c                 .    || _         || _        || _        y N)_AgentSupportedFeature__name_AgentSupportedFeature__version!_AgentSupportedFeature__supported)selfnameversion	supporteds       r   __init__zAgentSupportedFeature.__init__!   s     $r   c                     | j                   S r   )r   r   s    r   r   zAgentSupportedFeature.name&   s    {{r   c                     | j                   S r   )r   r   s    r   r   zAgentSupportedFeature.version*   s    ~~r   c                     | j                   S r   )r   r   s    r   is_supportedz"AgentSupportedFeature.is_supported.   s    r   N)1.0F)	r   r   r	   r
   r   propertyr   r   r   r   r   r   r   r      sH    %
        r   r   c                   >     e Zd Zej                  ZdZdZ fdZ xZ	S )_MultiConfigFeaturer    Tc                     t         t        |   t        j                  t        j                  t        j
                         y N)r   r   r   )superr#   r   _MultiConfigFeature__NAME_MultiConfigFeature__VERSION_MultiConfigFeature__SUPPORTEDr   	__class__s    r   r   z_MultiConfigFeature.__init__9   s4    !417J7Q7Q:M:W:W<O<[<[ 	2 	]r   )
r   r   r	   r   r   r'   r(   r)   r   __classcell__r+   s   @r   r#   r#   3   s$    "..FIK] ]r   r#   c                   >     e Zd Zej                  ZdZdZ fdZ xZ	S )_ETPFeaturer    Tc                 n    t         t        |   | j                  | j                  | j
                         y r%   )r&   r/   r   _ETPFeature__NAME_ETPFeature__VERSION_ETPFeature__SUPPORTEDr*   s    r   r   z_ETPFeature.__init__E   s.    k4)t{{26..484D4D 	* 	Fr   )
r   r   r	   r   r   r1   r2   r3   r   r,   r-   s   @r   r/   r/   ?   s$    "==FIKF Fr   r/   c                 z    | t         v r	t         |    S | t        v r	t        |    S t        dj                  |             )Nz Feature with Name: {0} not found)__CRP_ADVERTISED_FEATURES__EXTENSION_ADVERTISED_FEATURESNotImplementedErrorformat)feature_names    r   get_supported_feature_by_namer:   W   sA    00(6666.|<<
@GGU
VVr   c                  J    t        d t        j                         D              S )a  
    List of features that the GuestAgent currently supports (like FastTrack, MultiConfig, etc).
    We need to send this list as part of Status reporting to inform CRP of all the features the agent supports.
    :return: Dict containing all CRP supported features with the key as their names and the AgentFeature object as
             the value if they are supported by the Agent
        Eg: {
                MultipleExtensionsPerHandler: _MultiConfigFeature()
            }
    c              3   D   K   | ]  \  }}|j                   s||f  y wr   r   .0r   features      r   	<genexpr>z<get_agent_supported_features_list_for_crp.<locals>.<genexpr>l   s!     oMD'ZaZnZnwo    	 )dictr5   itemsr   r   r   )get_agent_supported_features_list_for_crprE   a   s     o5N5T5T5Vooor   c                  J    t        d t        j                         D              S )aA  
    List of features that the GuestAgent currently supports (like Extension Telemetry Pipeline, etc) needed by Extensions.
    We need to send this list as environment variables when calling extension commands to inform Extensions of all the
    features the agent supports.
    :return: Dict containing all Extension supported features with the key as their names and the AgentFeature object as
             the value if the feature is supported by the Agent.
        Eg: {
                CRPSupportedFeatureNames.ExtensionTelemetryPipeline: _ETPFeature()
            }
    c              3   D   K   | ]  \  }}|j                   s||f  y wr   r=   r>   s      r   rA   zCget_agent_supported_features_list_for_extensions.<locals>.<genexpr>z   s!     uMD'`g`t`twurB   )rC   r6   rD   r   r   r   0get_agent_supported_features_list_for_extensionsrH   o   s     u5T5Z5Z5\uuur   N)objectr   r   r#   r/   r   r5   r   r6   r:   rE   rH   r   r   r   <module>rJ      s}   &F  F  .	]/ 	]	F' 	F %%':'<  44km# 
Wpvr   