I am trying to collect data from a log file. The data will collected into records based on policy number. I have created an object describing the data below:
class fwpolicy:
def __init__(self, policy_id, fr_zone, to_zone, src,dest,serv):
self.policy_id = policy_id
self.fr_zone = fr_zone
self.to_zone = to_zone
self.src = src
self.dest = dest
self.serv = serv
The problem I am having is that some of the data , namely src, dest & serv may have multiple entries per policy.
questions:
1. Do I create these data types as lists in the object.
2. how do I add additional record to these dtat types? do i define a function within the fwpolicy class to do this?