Changes between Version 11 and Version 12 of VLANQoS

Show
Ignore:
Timestamp:
05/07/10 11:22:42 (9 years ago)
Author:
yxin (IP: 152.54.8.156)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VLANQoS

    v11 v12  
    429429{{ 
    430430    private String reservationId; 
     431 
    431432    private Date activationTime; 
     433 
    432434    private Integer duration; 
     435 
    433436    private Integer bandwidth; 
     437 
    434438    private String srcEndpoint; 
     439 
    435440    private String dstEndpoint; 
     441 
    436442    private String status; 
     443 
    437444    private String vlanTag; 
    438  
    439445}} 
    440446 
     447== GLambda == 
     448{{{ 
     449        Calendar startTime = Calendar.getInstance(); 
     450        startTime.setTime(activationTime); 
     451        startTime.set(Calendar.MILLISECOND, 0); 
     452        if (adjustTime != 0) { 
     453            startTime.add(Calendar.HOUR_OF_DAY, adjustTime); 
     454        } 
     455        Calendar endTime = (Calendar) startTime.clone(); 
     456        endTime.set(Calendar.MILLISECOND, 0); 
     457        endTime.add(Calendar.SECOND, duration); 
     458        ExactTimeframe_Type etf = new ExactTimeframe_Type(startTime, endTime); 
     459         
     460        CoallocationTimeframe_Type[] ctf = new CoallocationTimeframe_Type[1]; 
     461        ctf[0] = new CoallocationTimeframe_Type(coid, (Timeframe_Type) etf); 
     462         
     463        CoallocationTimeSpecification_Type cts = 
     464            new CoallocationTimeSpecification_Type(coid); 
     465        TimeSpecification_Type ts = (TimeSpecification_Type) cts; 
     466 
     467        MediaType_Type media = null; 
     468        TerminationPoint_Type[] a_tp = new TerminationPoint_Type[1]; 
     469        a_tp[0] = new TerminationPoint_Type(srcEndpoint, media); 
     470        TerminationPoint_Type[] z_tp = new TerminationPoint_Type[1]; 
     471        z_tp[0] = new TerminationPoint_Type(dstEndpoint, media); 
     472        Endpoint_Type a_ep = new Endpoint_Type(domain, a_tp); 
     473        Endpoint_Type z_ep = new Endpoint_Type(domain, z_tp); 
     474             
     475        Route_Type route = null; 
     476 
     477        GeneralBW_Type minbw = new GeneralBW_Type(bandwidth, BWUnit_Type.bps); 
     478        GeneralBW_Type maxbw = new GeneralBW_Type(bandwidth, BWUnit_Type.bps); 
     479        GeneralBW_Type peakbw = new GeneralBW_Type(bandwidth, BWUnit_Type.bps); 
     480        GeneralBW_Type guardbw = new GeneralBW_Type(bandwidth, BWUnit_Type.bps); 
     481        Bandwidth_Type bw = new Bandwidth_Type(minbw, maxbw, peakbw, guardbw); 
     482 
     483        Float avail = new Float(0); 
     484        Integer delay = new Integer(10); 
     485        SwitchingScheme_Type sw = SwitchingScheme_Type.ETHERNET; 
     486        EthernetParameters_Type ether = new EthernetParameters_Type 
     487            (new Integer(1500),   vlan,        new Integer(0)); 
     488        /*        MTU             VLAN ID           COS      */ 
     489 
     490        MPLSParameters_Type mpls = null; 
     491        IPParameters_Type ip = null; 
     492        PathProperties_Type prop = new PathProperties_Type 
     493            (avail, delay, sw, ether, mpls, ip); 
     494        Path_Type path = new Path_Type(a_ep, z_ep, route, bw, prop); 
     495 
     496        NetworkResourceSLADocument_Type slad = null; 
     497        ReservationStatus_Type rstatus = null; 
     498        ResourceAttribute_Type[] attr = null; 
     499 
     500        ReservationResources_Type[] rr = new ReservationResources_Type[1]; 
     501NetworkResources_Type nr1 = new NetworkResources_Type(null, rstatus, ts, attr, path, slad); 
     502 
     503rr[0] = (ReservationResources_Type) nr1; 
     504ResourceRequirements_Type request = new ResourceRequirements_Type(ctf, rr); 
     505 
     506 
     507}}} 
     508