@@ -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):
destination interface information.
The method is useful where the source context is well known.
the destination interface.
return "%s - %s: %d" % (self.destination, self.protocol, self.port)