def normalize_nova_secgroup_rules(rules):
    ret = [{'id': r['id'],
            'direction': 'ingress',
            'ethertype': 'IPv4',
            'port_range_min':
                None if r['from_port'] == -1 else r['from_port'],
            'port_range_max':
                None if r['to_port'] == -1 else r['to_port'],
            'protocol': r['ip_protocol'],
            'remote_ip_prefix': r['ip_range'].get('cidr', None),
            'security_group_id': r['parent_group_id']
            } for r in rules]
    return meta.obj_list_to_dict(ret)
Syncronizes a transfer from the Stripe API
dataset/ETHPy150Open openstack-infra/shade/shade/_utils.py/normalize_nova_secgroup_rules--crossover with--dataset/ETHPy150Open pinax/pinax-stripe/pinax/stripe/actions/transfers.py/sync_transfer