Exemple #1
0
 def serialize_snapshot_diff(self, snap_before: dict,
                             snap_after: dict) -> str:
     """
     Override this method to add the prefix.
     """
     modif = rubydiff(snap_before, snap_after)
     modif = '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\n' + modif
     return modif
Exemple #2
0
 def serialize_snapshot_diff(self, snap_before: dict,
                             snap_after: dict) -> str:
     """
     Override this method to add the prefix.
     """
     modif = rubydiff(snap_before, snap_after)
     if snap_after is None:
         proper_mac = snap_before.get('mac').upper().replace(":", "-")
         return (
             "---\n"
             "portable: Suppression du portable {}\n".format(proper_mac))
     modif = 'portable: !ruby/hash:ActiveSupport::HashWithIndifferentAccess\n' + modif
     return modif