use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FeatureCapability in project openflowplugin by opendaylight.
the class BuildSwitchCapabilitiesOF13 method build.
@Override
public SwitchFeatures build(GetFeaturesOutput features) {
SwitchFeaturesBuilder builderSwFeatures = new SwitchFeaturesBuilder();
builderSwFeatures.setMaxBuffers(features.getBuffers());
builderSwFeatures.setMaxTables(features.getTables());
List<Class<? extends FeatureCapability>> capabilities = new ArrayList<>();
if (features.getCapabilities().isOFPCFLOWSTATS()) {
capabilities.add(FlowFeatureCapabilityFlowStats.class);
}
if (features.getCapabilities().isOFPCGROUPSTATS()) {
capabilities.add(FlowFeatureCapabilityGroupStats.class);
}
if (features.getCapabilities().isOFPCIPREASM()) {
capabilities.add(FlowFeatureCapabilityIpReasm.class);
}
if (features.getCapabilities().isOFPCPORTBLOCKED()) {
capabilities.add(FlowFeatureCapabilityPortBlocked.class);
}
if (features.getCapabilities().isOFPCPORTSTATS()) {
capabilities.add(FlowFeatureCapabilityPortStats.class);
}
if (features.getCapabilities().isOFPCQUEUESTATS()) {
capabilities.add(FlowFeatureCapabilityQueueStats.class);
}
if (features.getCapabilities().isOFPCTABLESTATS()) {
capabilities.add(FlowFeatureCapabilityTableStats.class);
}
builderSwFeatures.setCapabilities(capabilities);
return builderSwFeatures.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FeatureCapability in project openflowplugin by opendaylight.
the class BuildSwitchCapabilitiesOF10 method build.
@Override
public SwitchFeatures build(GetFeaturesOutput features) {
SwitchFeaturesBuilder builderSwFeatures = new SwitchFeaturesBuilder();
builderSwFeatures.setMaxBuffers(features.getBuffers());
builderSwFeatures.setMaxTables(features.getTables());
List<Class<? extends FeatureCapability>> capabilities = new ArrayList<>();
if (features.getCapabilitiesV10().isOFPCARPMATCHIP()) {
capabilities.add(FlowFeatureCapabilityArpMatchIp.class);
}
if (features.getCapabilitiesV10().isOFPCFLOWSTATS()) {
capabilities.add(FlowFeatureCapabilityFlowStats.class);
}
if (features.getCapabilitiesV10().isOFPCIPREASM()) {
capabilities.add(FlowFeatureCapabilityIpReasm.class);
}
if (features.getCapabilitiesV10().isOFPCPORTSTATS()) {
capabilities.add(FlowFeatureCapabilityPortStats.class);
}
if (features.getCapabilitiesV10().isOFPCQUEUESTATS()) {
capabilities.add(FlowFeatureCapabilityQueueStats.class);
}
if (features.getCapabilitiesV10().isOFPCRESERVED()) {
capabilities.add(FlowFeatureCapabilityReserved.class);
}
if (features.getCapabilitiesV10().isOFPCSTP()) {
capabilities.add(FlowFeatureCapabilityStp.class);
}
if (features.getCapabilitiesV10().isOFPCTABLESTATS()) {
capabilities.add(FlowFeatureCapabilityTableStats.class);
}
builderSwFeatures.setCapabilities(capabilities);
return builderSwFeatures.build();
}
Aggregations