예제 #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))
예제 #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]))
예제 #3
0
def loxi_clear_actions_to_ofp_instruction(lo):
    return pb2.ofp_instruction(type=pb2.OFPIT_CLEAR_ACTIONS)
예제 #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))
예제 #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]))
예제 #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]))
예제 #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))
예제 #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))