commit | 642bc456a4b14c28a0e0efb42de148792fa8e80d | [log] [tgz] |
---|---|---|
author | Simon Hunt <simon@onlab.us> | Wed May 04 19:34:45 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu May 05 22:49:53 2016 +0000 |
tree | 9c6dc536433d3b15d66bdc21f8c0590e130d5fb5 | |
parent | e4da9096a746aa3fee894b4acc9e5b3ea0996e27 [diff] [blame] |
ONOS-4326: Focusing on add/remove cluster member. (WIP). If reviewing this, please refer to http://tinyurl.com/onos-ui-topo-model Change-Id: Ic6568074ac768ec828f9103e92caab5e9a06ade6
diff --git a/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java b/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java index 78f9d47..88d86d0 100644 --- a/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java +++ b/core/api/src/main/java/org/onosproject/ui/model/topo/UiDevice.java
@@ -17,6 +17,7 @@ package org.onosproject.ui.model.topo; import org.onosproject.net.Device; +import org.onosproject.net.DeviceId; /** * Represents a device. @@ -29,4 +30,18 @@ protected void destroy() { device = null; } + + /** + * Returns the identity of the device. + * + * @return device ID + */ + public DeviceId id() { + return device.id(); + } + + @Override + public String idAsString() { + return id().toString(); + } }