[ONOS-7410] DeviceManager.deviceConnected does not apply device annotations
Change-Id: Iafaa4bdc717d19052660ccf1c7455494ff95d22f
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
index f499d1b..068c676 100644
--- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -530,6 +530,11 @@
PortDescriptionsConfig portConfig = networkConfigService.getConfig(deviceId, PortDescriptionsConfig.class);
// Generate updated description and establish my Role
deviceDescription = BasicDeviceOperator.combine(cfg, deviceDescription);
+ DeviceAnnotationConfig annoConfig = networkConfigService.getConfig(deviceId, DeviceAnnotationConfig.class);
+ if (annoConfig != null) {
+ deviceDescription = deviceAnnotationOp.combine(deviceId, deviceDescription, Optional.of(annoConfig));
+ }
+
Futures.getUnchecked(mastershipService.requestRoleFor(deviceId)
.thenAccept(role -> {
log.info("Local role is {} for {}", role, deviceId);