Esempio n. 1
0
def loxi_goto_table_to_ofp_instruction(lo):
    return pb2.ofp_instruction(
        type=pb2.OFPIT_GOTO_TABLE,
        goto_table=pb2.ofp_instruction_goto_table(table_id=lo.table_id))
Esempio n. 2
0
def loxi_apply_actions_to_ofp_instruction(lo):
    return pb2.ofp_instruction(type=pb2.OFPIT_APPLY_ACTIONS,
                               actions=pb2.ofp_instruction_actions(
                                   actions=[to_grpc(a) for a in lo.actions]))
Esempio n. 3
0
def loxi_clear_actions_to_ofp_instruction(lo):
    return pb2.ofp_instruction(type=pb2.OFPIT_CLEAR_ACTIONS)
Esempio n. 4
0
def loxi_goto_table_to_ofp_instruction(lo):
    return pb2.ofp_instruction(
        type=pb2.OFPIT_GOTO_TABLE,
        goto_table=pb2.ofp_instruction_goto_table(table_id=lo.table_id))
Esempio n. 5
0
def loxi_apply_actions_to_ofp_instruction(lo):
    return pb2.ofp_instruction(
        type=pb2.OFPIT_APPLY_ACTIONS,
        actions=pb2.ofp_instruction_actions(
            actions=[to_grpc(a) for a in lo.actions]))
Esempio n. 6
0
def loxi_write_actions_to_ofp_instruction(lo):
    return pb2.ofp_instruction(type=pb2.OFPIT_WRITE_ACTIONS,
                               actions=pb2.ofp_instruction_actions(
                                   actions=[to_grpc(a) for a in lo.actions]))
Esempio n. 7
0
def loxi_meter_to_ofp_instruction(lo):
    return pb2.ofp_instruction(
        type=pb2.OFPIT_METER,
        meter=pb2.ofp_instruction_meter(meter_id=lo.meter_id))
Esempio n. 8
0
def loxi_write_metadata_to_ofp_instruction(lo):
    return pb2.ofp_instruction(
        type=pb2.OFPIT_WRITE_METADATA,
        write_metadata=pb2.ofp_instruction_write_metadata(
            metadata=lo.metadata, metadata_mask=lo.metadata_mask))