use of org.onosproject.net.Element in project onos by opennetworkinglab.
the class SuppressionRules method isSuppressed.
public boolean isSuppressed(Port port) {
Element parent = port.element();
if (parent instanceof Device) {
if (isSuppressed((Device) parent)) {
return true;
}
}
final Annotations annotations = port.annotations();
if (containsSuppressionAnnotation(annotations)) {
return true;
}
return false;
}
use of org.onosproject.net.Element in project onos by opennetworkinglab.
the class DefaultPortSerializer method read.
@Override
public DefaultPort read(Kryo kryo, Input input, Class<DefaultPort> aClass) {
Element element = (Element) kryo.readClassAndObject(input);
PortNumber number = kryo.readObject(input, PortNumber.class);
boolean isEnabled = input.readBoolean();
Port.Type type = kryo.readObject(input, Port.Type.class);
long portSpeed = input.readLong();
Annotations annotations = (Annotations) kryo.readClassAndObject(input);
return new DefaultPort(element, number, isEnabled, type, portSpeed, annotations);
}
Aggregations