'Subport data model change from the server.'

def handle_subports(self, context, resource_type, subports, event_type):

    affected_trunks = set()
    if (event_type == events.DELETED):
        method = self._tapi.delete_trunk_subport
    else:
        method = self._tapi.put_trunk_subport
    for s in subports:
        affected_trunks.add(s['trunk_id'])
        method(s['trunk_id'], s)
    for trunk_id in affected_trunks:
        trunk = self._tapi.get_trunk_by_id(context, trunk_id)
        if (not trunk):
            continue
        self.wire_trunk(context, trunk)
