File: //lib/python2.7/site-packages/leapp/utils/report.pyo
�
g��fc @ s d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z m Z m Z m Z m
Z
m Z m Z m
Z
d d l m Z m Z d � Z d � Z i d e j 6d e j 6d e j 6d e j 6Z d
� Z d � Z d � Z d
� Z d � Z d d � Z d S( i����N( t _DEPRECATION_FLAGSt _UPCOMING_DEPRECATION_FLAGSt ExternalLinkt Groupst Remediationt Severityt create_report_from_errort create_report_from_deprecation( t get_messagest get_audit_entryc
C s1 g } t � } xt d d d | � D]} t j | d � } t j | d t �j d � } t j | � j � } | | k r� q% n | j
| � t | � } t j � } | j | j d � � | j | d j d � � i | d d 6t
j d d
6| d d 6| j � d 6} | j | � | j | � q% W| S(
Nt eventt deprecationt contextt datat sort_keyss utf-8t stampt timeStampt LEAPP_HOSTNAMEt hostnamet actort id( t setR t jsont loadst dumpst Truet encodet hashlibt sha256t hexdigestt addR t updatet ost environt append(
t
context_idt reportst cachet entryR
t
_data_dumpt data_hasht reportR t envelope( ( s6 /usr/lib/python2.7/site-packages/leapp/utils/report.pyt! _create_reports_from_deprecations s*
c C sN t d d d g d | � p g } g } x
| D]} | d d } t j � } | j | d d j d � � | j | d j d � � | j t | d � j d � � i | d
d 6| d d 6| d
d
6| j � d 6} t j | � } t j | j d d � � } | st
| � } n | j | � | j | � q. W| j t
| � � | S( s�
:param context_id: ID to identify the needed messages
:type context_id: str
:return: All upgrade messages of type "Report" within the given context
t namest Reportt
ErrorModelR t messageR
t hashs utf-8R R R R R R) s {}( R R R R R t strR R R t getR R"