'Convert a layer2 scan_filter parameter into the
structure required by Layer1.'

def dynamize_scan_filter(self, scan_filter):

    d = None
    if scan_filter:
        d = {}
        for attr_name in scan_filter:
            condition = scan_filter[attr_name]
            d[attr_name] = condition.to_dict()
    return d
