def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.standalone.pass_through_2ports")
    event.connection.send(msg)

    log.info("netasm.examples.netasm.standalone.pass_through_2ports for %s", dpidToStr(event.dpid))
Esempio n. 2
0
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.controller_assisted.table_based_simple")
    event.connection.send(msg)

    log.info("netasm.examples.netasm.controller_assisted.table_based_simple (learning) for %s", dpidToStr(event.dpid))
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.controller_assisted.send_to_controller")
    event.connection.send(msg)

    log.info("netasm.examples.netasm.controller_assisted.send_to_controller (hub) for %s", dpidToStr(event.dpid))
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.controller_assisted.table_based_simple")
    event.connection.send(msg)

    log.info("netasm.examples.netasm.controller_assisted.table_based_simple (learning) for %s", dpidToStr(event.dpid))
Esempio n. 5
0
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.standalone.hub")
    event.connection.send(msg)

    log.info("netasm.examples.netasm.standalone.hub for %s", dpidToStr(event.dpid))
Esempio n. 6
0
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.standalone.learning_switch")
    event.connection.send(msg)

    log.info("netasm.examples.netasm.standalone.learning_switch for %s", dpidToStr(event.dpid))
Esempio n. 7
0
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy(
        "netasm.examples.netasm.controller_assisted.send_to_controller")
    event.connection.send(msg)

    log.info(
        "netasm.examples.netasm.controller_assisted.send_to_controller (hub) for %s",
        dpidToStr(event.dpid))
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.learning_switch_acl.learning_switch_acl_netasm")
    event.connection.send(msg)

    msg.add_table_entry('acl_match_table', 0,
                        {'ipv4_src': (0x0A000001, 0xFFFFFFFF),
                         'ipv4_dst': (0x0A000002, 0xFFFFFFFF)})
    event.connection.send(msg)

    msg.add_table_entry('acl_match_table', 1,
                        {'ipv4_src': (0x0A000002, 0xFFFFFFFF),
                         'ipv4_dst': (0x0A000001, 0xFFFFFFFF)})
    event.connection.send(msg)

    log.info("netasm.examples.learning_switch_acl.learning_switch_acl_netasm for %s",
             dpidToStr(event.dpid))
Esempio n. 9
0
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy(
        "netasm.examples.learning_switch_acl.learning_switch_acl_netasm")
    event.connection.send(msg)

    msg.add_table_entry('acl_match_table', 0, {
        'ipv4_src': (0x0A000001, 0xFFFFFFFF),
        'ipv4_dst': (0x0A000002, 0xFFFFFFFF)
    })
    event.connection.send(msg)

    msg.add_table_entry('acl_match_table', 1, {
        'ipv4_src': (0x0A000002, 0xFFFFFFFF),
        'ipv4_dst': (0x0A000001, 0xFFFFFFFF)
    })
    event.connection.send(msg)

    log.info(
        "netasm.examples.learning_switch_acl.learning_switch_acl_netasm for %s",
        dpidToStr(event.dpid))
Esempio n. 10
0
def _handle_ConnectionUp(event):
    msg = OutMessage()

    msg.set_policy("netasm.examples.netasm.controller_assisted.table_based_simple")
    event.connection.send(msg)

    msg.add_table_entry('match_table', 0,
                        {'eth_src': (0x000000000001, 0xFFFFFFFFFFFF)})
    event.connection.send(msg)
    msg.add_table_entry('params_table', 0,
                        {'outport_bitmap': ports_to_bitmap(2)})
    event.connection.send(msg)

    msg.add_table_entry('match_table', 1,
                        {'eth_src': (0x000000000002, 0xFFFFFFFFFFFF)})
    event.connection.send(msg)
    msg.add_table_entry('params_table', 1,
                        {'outport_bitmap': ports_to_bitmap(1)})
    event.connection.send(msg)

    msg = QueryMessage()

    msg.table_entry('match_table', 0)
    event.connection.send(msg)
    msg.table_entry('params_table', 0)
    event.connection.send(msg)

    msg.table_entry('match_table', 1)
    event.connection.send(msg)
    msg.table_entry('params_table', 1)
    event.connection.send(msg)

    msg.table_list()
    event.connection.send(msg)

    log.info("netasm.examples.netasm.controller_assisted.table_based_simple (pass through) for %s",
             dpidToStr(event.dpid))