More documentation clean-up.
diff --git a/net/api/src/main/java/org/onlab/onos/event/EventDispatcher.java b/net/api/src/main/java/org/onlab/onos/event/EventDispatcher.java
index a9db575..8236d899 100644
--- a/net/api/src/main/java/org/onlab/onos/event/EventDispatcher.java
+++ b/net/api/src/main/java/org/onlab/onos/event/EventDispatcher.java
@@ -1,9 +1,10 @@
package org.onlab.onos.event;
/**
- * Abstraction of a mechanism capable of accepting and dispatching events.
- * Whether the events are accepted and the dispatched synchronously or
- * asynchronously is unspecified.
+ * Abstraction of a mechanism capable of accepting and dispatching events to
+ * appropriate event sinks. Where the event sinks are obtained is unspecified.
+ * Similarly, whether the events are accepted and dispatched synchronously
+ * or asynchronously is unspecified as well.
*/
public interface EventDispatcher<E extends Event> {
diff --git a/net/api/src/main/java/org/onlab/onos/net/Device.java b/net/api/src/main/java/org/onlab/onos/net/Device.java
index 8b6368d..700654f 100644
--- a/net/api/src/main/java/org/onlab/onos/net/Device.java
+++ b/net/api/src/main/java/org/onlab/onos/net/Device.java
@@ -3,14 +3,63 @@
import org.onlab.onos.net.provider.Provided;
/**
- * Representation of an network infrastructure device.
+ * Representation of a network infrastructure device.
*/
public interface Device extends Provided {
- // type, e.g. switch, router, firewall, ips, controller
+ /**
+ * Coarse classification of the type of the infrastructure device.
+ */
+ public enum Type {
+ SWITCH, ROUTER, FIREWALL, BALANCER, IPS, IDS, CONTROLLER, OTHER
+ }
- // id (uri within)
+ /**
+ * Returns the device identifier.
+ *
+ * @return device id
+ */
+ DeviceId id();
- // ports
+ /**
+ * Returns the type of the infrastructure device.
+ *
+ * @return type of the device
+ */
+ Type type();
+
+ /**
+ * Returns the device manufacturer name.
+ *
+ * @return manufacturer name
+ */
+ String manufacturer();
+
+ /**
+ * Returns the device hardware version.
+ *
+ * @return hardware version
+ */
+ String hwVersion();
+
+ /**
+ * Returns the device software version.
+ *
+ * @return software version
+ */
+ String swVersion();
+
+ /**
+ * Returns the device serial number.
+ *
+ * @return serial number
+ */
+ String serialNumber();
+
+ // Device realizedBy(); ?
+
+ // ports are not provided directly, but rather via DeviceService.getPorts(Device device);
+
+ // Set<Behavior> behaviours(); // set of supported behaviours
}
diff --git a/net/api/src/main/java/org/onlab/onos/net/Link.java b/net/api/src/main/java/org/onlab/onos/net/Link.java
index 2087377..62fc9f8 100644
--- a/net/api/src/main/java/org/onlab/onos/net/Link.java
+++ b/net/api/src/main/java/org/onlab/onos/net/Link.java
@@ -5,7 +5,24 @@
/**
* Abstraction of a network infrastructure link.
*/
-public interface Link extends Provided { // TODO: Also should extend graph Edge
+public interface Link extends Provided { // TODO: Also should extend graph Edge once the graph module is checked in
+
+ /**
+ * Coarse representation of the link type.
+ */
+ public enum Type {
+ /**
+ * Signifies that this is a direct single-segment link.
+ */
+ DIRECT,
+
+ /**
+ * Signifies that this link is potentially comprised from multiple
+ * underlying segments or hops, e.g. optical links, tunnel links,
+ * multi-hop links spanning 'dark' switches
+ */
+ INDIRECT
+ }
/**
* Returns the link source connection point.
@@ -21,4 +38,6 @@
*/
ConnectPoint dst();
+ // LinkInfo info(); // Additional link information / decorations
+
}
diff --git a/net/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java b/net/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java
new file mode 100644
index 0000000..d1c992f
--- /dev/null
+++ b/net/api/src/main/java/org/onlab/onos/net/provider/AbstractProvider.java
@@ -0,0 +1,24 @@
+package org.onlab.onos.net.provider;
+
+/**
+ * Base provider implementation.
+ */
+public abstract class AbstractProvider implements Provider {
+
+ private final ProviderId providerId;
+
+ /**
+ * Creates a provider with the supplier identifier.
+ *
+ * @param id provider id
+ */
+ protected AbstractProvider(ProviderId id) {
+ this.providerId = id;
+ }
+
+ @Override
+ public ProviderId id() {
+ return providerId;
+ }
+
+}
diff --git a/net/api/src/main/java/org/onlab/onos/net/provider/Provided.java b/net/api/src/main/java/org/onlab/onos/net/provider/Provided.java
index 71e670a..89364c2 100644
--- a/net/api/src/main/java/org/onlab/onos/net/provider/Provided.java
+++ b/net/api/src/main/java/org/onlab/onos/net/provider/Provided.java
@@ -10,6 +10,6 @@
*
* @return provider identification
*/
- ProviderId id();
+ ProviderId providerId();
}