commit | a06a61694c86c889a48427c4c7b5742f01e2466b | [log] [tgz] |
---|---|---|
author | Palash Kala <palash.kala@samsung.com> | Wed Nov 15 20:42:40 2017 +0900 |
committer | Yuta HIGUCHI <y-higuchi@opennetworking.org> | Tue Nov 28 18:02:40 2017 +0000 |
tree | 19209dd89fbde645f49aed877eab217b4d4fa453 | |
parent | bd0e720a4a3b52e569ed6adb871fd8f989e7817a [diff] [blame] |
ONOS-6950 Annotate device through network configuration Change-Id: I39d5ca39667bb1478a090408ff3c1af33220a0b2
diff --git a/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java b/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java index 577a2ec..a331f69 100644 --- a/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java +++ b/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java
@@ -154,6 +154,18 @@ base.chassisId(), defaultAvailable, annotations); } + /** + * Creates a device description using the supplied information. + * + * @param base base + * @param annotations annotations + * @return device description + */ + public static DefaultDeviceDescription copyReplacingAnnotation(DeviceDescription base, + SparseAnnotations annotations) { + return new DefaultDeviceDescription(base, annotations); + } + @Override public URI deviceUri() { return uri;