Package org.apache.avro.generic

Examples of org.apache.avro.generic.GenericRecordBuilder.build()


               instrSchema = protocol.getType("of12.ofp_instruction_clear_actions");
               instrRecord = new GenericData.Record(instrSchema);
            }
           
            GenericRecordBuilder instrHeaderBuilder = new GenericRecordBuilder(instrHeaderSchema);
            instrHeaderRecord = instrHeaderBuilder.build();
            instrRecord.put("header", instrHeaderRecord);
            instrRecord.put("actions", actionSetRecord);
           
            instrHeaderRecord.put("length", getUint16Fixed(calculateLength(instrSchema, instrRecord)));
            instrRecord.put("header", instrHeaderRecord);
View Full Code Here


      /*
       * Build match header
       */
      Schema matchHeaderSchema = protocol.getType("of12.match_header");
      GenericRecordBuilder matchHeaderBuilder = new GenericRecordBuilder(matchHeaderSchema);
      GenericRecord matchHeaderRecord = matchHeaderBuilder.build();
     
      /*
       * Calculating oxm_tlvs length
       */
      ByteArrayOutputStream oxmOut = new ByteArrayOutputStream();
View Full Code Here

/* F L O W  M O D  M E S S A G E */ 
      /*
       * Create FlowMod Header
       */
      GenericRecordBuilder flowModHeaderBuilder = new GenericRecordBuilder(flowModHeaderSchema);
      GenericRecord flowModHeaderRecord = flowModHeaderBuilder.build();
     
      /*
       * Assemble Flow_mod message
       */
      ofpFlowModRecord.put("header", flowModHeaderRecord);     
View Full Code Here

      GenericRecord ofpActionBaseRecord = new GenericData.Record(ofpActionSchema);
       
   
      Schema ofpActionOutSchema = protocol.getType("of12.ofp_action_output");
      GenericRecordBuilder actionBuilder = new GenericRecordBuilder(ofpActionOutSchema);
      GenericRecord ofpActionOutRecord = actionBuilder.build();
     
      n = Pattern.compile("output=(?:((?:0x)?\\d+)|(all)|(controller)|(local)|(ingress-port)|(normal)|(flood))").matcher(subaction);
      if (n.matches()) {

//          int port = OFPort.OFPP_NONE.getValue();
View Full Code Here

      GenericRecord ofpActionRecord = new GenericData.Record(ofpActionSchema);
     
      Schema ofpActionSetQueueHeaderSchema = protocol.getType("of12.action_set_queue_header");

      GenericRecordBuilder headerBuilder = new GenericRecordBuilder(ofpActionSetQueueHeaderSchema);
      GenericRecord actionSetQueueHeaderRecord = headerBuilder.build();
     
      Schema ofpActionSetQueueSchema = protocol.getType("of12.ofp_action_set_queue");
      GenericRecord ofpActionSetQueueRecord = new GenericData.Record(ofpActionSetQueueSchema);
     
      n = Pattern.compile("set_queue=(?:((?:0x)?\\d+))").matcher(subaction);
View Full Code Here

      GenericRecord ofpActionRecord = new GenericData.Record(ofpActionSchema);
      List <GenericRecord> matches = new ArrayList<>();
     
      Schema actionSetFieldHeaderSchema = protocol.getType("of12.action_set_field_header");
      GenericRecordBuilder headerBuilder = new GenericRecordBuilder(actionSetFieldHeaderSchema);
      GenericRecord actionSetFieldHeaderRecord = headerBuilder.build();
   
      Schema ofpActionSetFieldSchema = protocol.getType("of12.ofp_action_set_field");
      GenericRecord ofpActionSetFieldRecord = new GenericData.Record(ofpActionSetFieldSchema);

      n = Pattern.compile("set_field_eth_dst=(?:((?:0x)?\\d+))").matcher(subaction);
View Full Code Here

      GenericRecord ofpActionRecord = new GenericData.Record(ofpActionSchema);
      List <GenericRecord> matches = new ArrayList<>();
     
      Schema actionSetFieldHeaderSchema = protocol.getType("of12.action_set_field_header");
      GenericRecordBuilder headerBuilder = new GenericRecordBuilder(actionSetFieldHeaderSchema);
      GenericRecord actionSetFieldHeaderRecord = headerBuilder.build();
   
      Schema ofpActionSetFieldSchema = protocol.getType("of12.ofp_action_set_field");
      GenericRecord ofpActionSetFieldRecord = new GenericData.Record(ofpActionSetFieldSchema);

      //TODO implement format XX:XX:XX:XX:XX:XX using the precious get_mac_addr()
View Full Code Here

     Schema ofpActionSchema = protocol.getType("of12.ofp_action");
     GenericRecord ofpActionRecord = new GenericData.Record(ofpActionSchema);
    
     Schema actionPushMplsHeaderSchema = protocol.getType("of12.action_push_mpls_header");
     GenericRecordBuilder headerBuilder = new GenericRecordBuilder(actionPushMplsHeaderSchema);
     GenericRecord actionPushMplsHeaderRecord = headerBuilder.build();
    
     Schema ofpActionPushMplsSchema = protocol.getType("of12.ofp_action_push_mpls");
     GenericRecord ofpActionPushMplsRecord = new GenericData.Record(ofpActionPushMplsSchema);

     ofpActionPushMplsRecord.put("header", actionPushMplsHeaderRecord);
View Full Code Here

     Schema ofpActionSchema = protocol.getType("of12.ofp_action");
     GenericRecord ofpActionRecord = new GenericData.Record(ofpActionSchema);
    
     Schema actionPopVlanHeaderSchema = protocol.getType("of12.action_pop_vlan_header");
     GenericRecordBuilder headerBuilder = new GenericRecordBuilder(actionPopVlanHeaderSchema);
     GenericRecord actionPopVlanHeaderRecord = headerBuilder.build();
    
     Schema ofpActionPopVlanSchema = protocol.getType("of12.ofp_action_pop_vlan");
     GenericRecord ofpActionPopVlanRecord = new GenericData.Record(ofpActionPopVlanSchema);
    
     ofpActionPopVlanRecord.put("header", actionPopVlanHeaderRecord);
View Full Code Here

      GenericRecord ofpActionRecord = new GenericData.Record(ofpActionSchema);
      List <GenericRecord> matches = new ArrayList<>();
     
      Schema actionSetFieldHeaderSchema = protocol.getType("of12.action_set_field_header");
      GenericRecordBuilder headerBuilder = new GenericRecordBuilder(actionSetFieldHeaderSchema);
      GenericRecord actionSetFieldHeaderRecord = headerBuilder.build();
   
      Schema ofpActionSetFieldSchema = protocol.getType("of12.ofp_action_set_field");
      GenericRecord ofpActionSetFieldRecord = new GenericData.Record(ofpActionSetFieldSchema);

      n = Pattern.compile("set_field_vlan_vid=(?:((?:0x)?\\d+))").matcher(subaction);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.