File diff 40cc47b13d9b → 744593ed423d
conntrackt/models.py
Show inline comments
 
@@ -298,6 +298,34 @@ class Communication(models.Model):
 

	
 
        This provides ability to let all of the other fields of a communication
 
        instance to be editable.
 
        """
 

	
 
        return "Edit"
 

	
 
    def source_representation(self):
 
        """
 
        Produces string representation of communication that includes only the
 
        source interface information.
 

	
 
        The method is useful where the destination context is well known.
 

	
 
        Returns:
 
            Communication representation that includes only information about
 
            the source interface.
 
        """
 

	
 
        return "%s - %s: %d" % (self.source, self.protocol, self.port)
 

	
 
    def destination_representation(self):
 
        """
 
        Produces string representation of communication that includes only the
 
        destination interface information.
 

	
 
        The method is useful where the source context is well known.
 

	
 
        Returns:
 
            Communication representation that includes only information about
 
            the destination interface.
 
        """
 

	
 
        return "%s - %s: %d" % (self.destination, self.protocol, self.port)