use of org.projectfloodlight.openflow.types.DatapathId in project open-kilda by telstra.
the class MeterVerifyCommand method validateMeterConfig.
private void validateMeterConfig(MeterSchema actualSchema, boolean isInaccurate) {
DatapathId datapathId = getSw().getId();
MeterSchema expectedSchema = MeterSchemaMapper.INSTANCE.map(datapathId, makeMeterAddMessage());
if (!expectedSchema.equals(actualSchema)) {
throw maskCallbackException(new SwitchIncorrectMeterException(datapathId, meterConfig, expectedSchema, actualSchema, isInaccurate));
}
}
use of org.projectfloodlight.openflow.types.DatapathId in project open-kilda by telstra.
the class OfBatchHolder method addDeleteGroup.
@Override
public void addDeleteGroup(GroupSpeakerData data, SwitchId switchId) {
DatapathId dpId = DatapathId.of(switchId.toLong());
OFFactory factory = iofSwitchService.getSwitch(dpId).getOFFactory();
OFMessage message = OfGroupConverter.INSTANCE.convertDeleteGroupCommand(data, factory);
xidMapping.put(message.getXid(), data.getUuid());
commandMap.put(data.getUuid(), BatchData.builder().group(true).message(message).build());
groupsMap.put(data.getGroupId(), data);
executionGraph.add(data.getUuid(), data.getDependsOn());
}
use of org.projectfloodlight.openflow.types.DatapathId in project open-kilda by telstra.
the class OfBatchHolder method addDeleteMeter.
@Override
public void addDeleteMeter(MeterSpeakerData data, SwitchId switchId) {
DatapathId dpId = DatapathId.of(switchId.toLong());
OFFactory factory = iofSwitchService.getSwitch(dpId).getOFFactory();
OFMessage message = OfMeterConverter.INSTANCE.convertDeleteMeterCommand(data, factory);
xidMapping.put(message.getXid(), data.getUuid());
commandMap.put(data.getUuid(), BatchData.builder().meter(true).message(message).build());
metersMap.put(data.getMeterId(), data);
executionGraph.add(data.getUuid(), data.getDependsOn());
}
use of org.projectfloodlight.openflow.types.DatapathId in project open-kilda by telstra.
the class OfBatchHolder method addInstallGroup.
@Override
public void addInstallGroup(GroupSpeakerData data, SwitchId switchId) {
DatapathId dpId = DatapathId.of(switchId.toLong());
OFFactory factory = iofSwitchService.getSwitch(dpId).getOFFactory();
OFMessage message = OfGroupConverter.INSTANCE.convertInstallGroupCommand(data, factory);
xidMapping.put(message.getXid(), data.getUuid());
commandMap.put(data.getUuid(), BatchData.builder().group(true).message(message).build());
groupsMap.put(data.getGroupId(), data);
executionGraph.add(data.getUuid(), data.getDependsOn());
}
use of org.projectfloodlight.openflow.types.DatapathId in project open-kilda by telstra.
the class OfBatchHolder method addInstallFlow.
@Override
public void addInstallFlow(FlowSpeakerData data, SwitchId switchId) {
DatapathId dpId = DatapathId.of(switchId.toLong());
OFFactory factory = iofSwitchService.getSwitch(dpId).getOFFactory();
OFMessage message = OfFlowConverter.INSTANCE.convertInstallFlowCommand(data, factory);
xidMapping.put(message.getXid(), data.getUuid());
commandMap.put(data.getUuid(), BatchData.builder().flow(true).message(message).build());
flowsMap.put(data.getCookie(), data);
executionGraph.add(data.getUuid(), data.getDependsOn());
}
Aggregations