

def main():
    config.init(sys.argv[1:])
    config.setup_logging()
    cxt = context.get_admin_context()
    plugin = manager.NeutronManager.get_plugin()
    l3_plugin = manager.NeutronManager.get_service_plugins().get(constants.L3_ROUTER_NAT)
    notifier = n_rpc.get_notifier('network')
    for network in plugin.get_networks(cxt):
        notifier.info(cxt, 'network.exists', {
            'network': network,
        })
    for subnet in plugin.get_subnets(cxt):
        notifier.info(cxt, 'subnet.exists', {
            'subnet': cxt,
        })
    for port in plugin.get_ports(cxt):
        notifier.info(cxt, 'port.exists', {
            'port': port,
        })
    for router in l3_plugin.get_routers(cxt):
        notifier.info(cxt, 'router.exists', {
            'router': router,
        })
    for floatingip in l3_plugin.get_floatingips(cxt):
        notifier.info(cxt, 'floatingip.exists', {
            'floatingip': floatingip,
        })

dataset/ETHPy150Open openstack/neutron/neutron/cmd/eventlet/usage_audit.py main/VarMisuse@127/168 `subnet`->`cxt`