Parse all secondary IP addresses found under interface configs into a list and change IP address notation to cidr instead of ip address mask subnet. This can be implemented by introducing a macro to the interfaces group and using the inbuilt to_cidr method to convert the masks.
def parse_ip(data):
if data.get('primary_ip') and data.get('primary_mask'):
data['primary_ip'] = data['primary_ip'] + '/' + str(data['primary_mask'])
data.pop('primary_mask')
if data.get('secondary_ips') and data.get('secondary_masks'):
data['secondary_ips'] = [f"{ip}/{mask}" for ip, mask in zip(data['secondary_ips'], data['secondary_masks'])]
data.pop('secondary_masks')
</macro>
I can submit a PR for this also.