[ONOS-4513] decouple optical-model from CLI
- core/cli is now optical-model clean
- Add command for pretty printing optical-ports
Change-Id: I2926ef6d52971d1a7f6642dfe4098d7ed2422363
diff --git a/apps/optical-model/src/main/java/org/onosproject/net/optical/device/OduCltPortHelper.java b/apps/optical-model/src/main/java/org/onosproject/net/optical/device/OduCltPortHelper.java
index efda401..380b8fe 100644
--- a/apps/optical-model/src/main/java/org/onosproject/net/optical/device/OduCltPortHelper.java
+++ b/apps/optical-model/src/main/java/org/onosproject/net/optical/device/OduCltPortHelper.java
@@ -33,6 +33,7 @@
import org.slf4j.Logger;
import com.google.common.annotations.Beta;
+import com.google.common.collect.ImmutableSet;
/**
* ODU client port related helpers.
@@ -122,6 +123,16 @@
}
}
+ /**
+ * Returns {@link Annotations} not used by the port type projection.
+ *
+ * @param input {@link Annotations}
+ * @return filtered view of given {@link Annotations}
+ */
+ public static Annotations stripHandledAnnotations(Annotations input) {
+ return new FilteredAnnotation(input, ImmutableSet.of(SIGNAL_TYPE));
+ }
+
// not meant to be instantiated
private OduCltPortHelper() {}
}