
es.tid.netManager.uni.UniNetworkLSPManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of network-emulator Show documentation
Show all versions of network-emulator Show documentation
Emulator of GMPLS-controlled transport Network
The newest version!
package es.tid.netManager.uni;
import java.net.Inet4Address;
import java.util.LinkedList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import es.tid.ipnms.datamodel.router.LabelSwitchedPath.LabelSwitchedPathProperties;
import es.tid.ipnms.datamodel.router.LabelSwitchedPath.LabelSwitchedPathWithUnnumIf;
import es.tid.netManager.NetworkLSPManager;
import es.tid.netManager.NetworkLSPManagerTypes;
import es.tid.pce.pcep.objects.BandwidthRequestedGeneralizedBandwidth;
import es.tid.rsvp.objects.subobjects.EROSubobject;
import es.tid.rsvp.objects.subobjects.IPv4prefixEROSubobject;
import es.tid.rsvp.objects.subobjects.SubObjectValues;
public class UniNetworkLSPManager extends NetworkLSPManager {
private long id;
/**
* Logger
*/
Logger log =LoggerFactory.getLogger("UniNetworkLSPManager");
public UniNetworkLSPManager(){
this.setEmulatorType(NetworkLSPManagerTypes.UNI_NETWORK);
}
@Override
public boolean setLSP(LinkedList erolist, boolean bidirect, BandwidthRequestedGeneralizedBandwidth GB) {
// TODO Auto-generated method stub
return true;
}
@Override
public boolean setMLLSP(LinkedList erolist, boolean bidirect, BandwidthRequestedGeneralizedBandwidth GB) {
log.info("Reserving LSP and sending capacity update");
/* LabelSwitchedPathWithUnnumIf label=new LabelSwitchedPathWithUnnumIf();
LabelSwitchedPathProperties lspProperties= new LabelSwitchedPathProperties("gigether","lambda-switching","ethernet","grid");
label.setLspProperties(lspProperties);
label.setPathName("LSP"+String.valueOf(id));
label.setLspId("LSP"+String.valueOf(id));
label.setSource("192.168.8.3");
label.setDestination("192.168.8.1");
label.setPath(erolist);
NoIPNMSDispatcher noIPNMSDispatcher=new NoIPNMSDispatcher();
noIPNMSDispatcher.createLSP(label);
*/
NoIPNMSDispatcher disp = new NoIPNMSDispatcher();
disp.enableLSP("3to1");
return true;
}
public boolean delMLLSP(LinkedList erolist, boolean bidirect, BandwidthRequestedGeneralizedBandwidth GB) {
log.info("Reserving LSP and sending capacity update");
/* LabelSwitchedPathWithUnnumIf label=new LabelSwitchedPathWithUnnumIf();
LabelSwitchedPathProperties lspProperties= new LabelSwitchedPathProperties("gigether","lambda-switching","ethernet","grid");
label.setLspProperties(lspProperties);
label.setPathName("LSP"+String.valueOf(id));
label.setLspId("LSP"+String.valueOf(id));
label.setSource("192.168.8.3");
label.setDestination("192.168.8.1");
label.setPath(erolist);
NoIPNMSDispatcher noIPNMSDispatcher=new NoIPNMSDispatcher();
noIPNMSDispatcher.createLSP(label);
*/
NoIPNMSDispatcher disp = new NoIPNMSDispatcher();
disp.disableLSP("3to1");
return true;
}
@Override
public void removeLSP(LinkedList erolist, boolean bidirect, BandwidthRequestedGeneralizedBandwidth GB) {
// TODO Auto-generated method stub
}
@Override
public void removeMLLSP(LinkedList erolist, boolean bidirect, BandwidthRequestedGeneralizedBandwidth GB) {
/* log.info("Delete LSP");
LabelSwitchedPathWithUnnumIf label=new LabelSwitchedPathWithUnnumIf();
LabelSwitchedPathProperties lspProperties= new LabelSwitchedPathProperties("gigether","lambda-switching","ethernet","grid");
label.setLspProperties(lspProperties);
label.setPathName("LSP"+String.valueOf(id));
label.setLspId("LSP"+String.valueOf(id));
label.setSource("192.168.8.3");
label.setDestination("192.168.8.1");
label.setPath(erolist);
NoIPNMSDispatcher noIPNMSDispatcher=new NoIPNMSDispatcher();
noIPNMSDispatcher.deleteLSP(label);*/
NoIPNMSDispatcher disp = new NoIPNMSDispatcher();
disp.disableLSP("3to1");
}
private int createPathLSP(LinkedList eroSubObjList,LabelSwitchedPathWithUnnumIf label){
boolean layerInfoFound=false;
int numNewLinks=0;
LinkedList path= new LinkedList ();
LabelSwitchedPathProperties lspProperties= new LabelSwitchedPathProperties("gigether","lambda-switching","ethernet","grid");
label.setLspProperties(lspProperties);
for (int i=0;i eroSubObjList,LinkedList path){
boolean layerInfoFound=false;
int numNewLinks=0;
path=new LinkedList();
for (int i=0;i eROSubobjectList_IP, float bw,
boolean bidirect) {
// TODO Auto-generated method stub
return false;
}
@Override
public void removeLSP(LinkedList erolist, boolean bidirect,
BandwidthRequestedGeneralizedBandwidth GB, float bw) {
// TODO Auto-generated method stub
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy