0b5880d Skip non-RPM advisory by checking advisory content_types

Authored and Committed by cqi 6 years ago
    Skip non-RPM advisory by checking advisory content_types
    
    Originally, freshmaker skips non-RPM advisory by checking `.tar.gz`
    extension in the builds. This way does not work in all cases. This
    patch checks advisory content_types instead. String "rpm" will be
    included in content_types if an erratum is a RPM advisory, otherwise
    skip that advisory.
    
    * ErrataAdvisoryRPMsSignedHandler._find_images_to_rebuild is updated.
      It does not check if the advisory being handled currently is a RPM
      advisory. This patch ensures only RPM advisory is handled.
    * ErrataAdvisoryStateChangedHandler.can_handle is updated. Only handle
      RPM advisory by checking if "rpm" exists in advisory content_types.
    * ErrataAdvisoryStateChangedEvent has a new attribute `content_types`
      to hold value of advisory content_types.
    * Manual trigger endpoint is updated as well. Stop and return error in
      response if advisory of given errata ID is not a RPM advisory.
    * Tests are updated and added.
    
    Signed-off-by: Chenxiong Qi <cqi@redhat.com>
    
        
file modified
+5 -1
file modified
+2 -1
file modified
+11 -3
file modified
+2 -1
file modified
+23 -2