3
^ @ sh d dl mZ ddlmZ ddlmZ ddlmZmZ edddd gZ G d
d deZ
G dd
d
eZdS ) )
namedtuple )ContextWrapper)DiffResultDescriptor)
DifferenceWrapperZmodified_portconZruleZ
added_contextZremoved_contextc @ s8 e Zd ZdZedZedZedZdd Zdd Z dS )PortconsDifferencez:Determine the difference in portcons between two policies.
diff_portconsc C s | j jdj| | jdd | jj D dd | jj D \| _| _}g | _ x<|D ]4\}}t
|jt
|jkrT| j jt
||j|j qTW dS )z9Generate the difference in portcons between the policies.zGGenerating portcon differences from {0.left_policy} to {0.right_policy}c s s | ]}t |V qd S )N)PortconWrapper).0n r
/usr/lib64/python3.6/portcon.py