Added getter needed for a usage in onos-app-samples
Change-Id: Idd5b2102d96a6a526bd08eb12de6edc64efcb443
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java
index 0fdf25a..7d11a76 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/domain/DomainVertex.java
@@ -33,6 +33,7 @@
// A domain vertex is either an intent domain or a device:
private final IntentDomainId domainId;
// ----- or -----
+
private final DeviceId deviceId;
// Serialization constructor
@@ -66,4 +67,22 @@
.toString();
}
}
+
+ /**
+ * Returns the device ID of this vertex if it is a device, returns null if it is a domain.
+ *
+ * @return the device ID of this vertex if applicable, else null
+ */
+ public DeviceId deviceId() {
+ return deviceId;
+ }
+
+ /**
+ * Returns the domain ID of this vertex if it is a domain, returns null if it is a device.
+ *
+ * @return the domain ID of this vertex if applicable, else null
+ */
+ public IntentDomainId domainId() {
+ return domainId;
+ }
}