sureshanaparti commented on code in PR #9873:
URL: https://github.com/apache/cloudstack/pull/9873#discussion_r1900339044


##########
plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/agent/OpenDaylightControllerResourceManagerImpl.java:
##########
@@ -106,11 +106,11 @@ public OpenDaylightControllerVO 
addController(AddOpenDaylightControllerCmd cmd)
         final PhysicalNetworkServiceProviderVO ntwkSvcProvider = 
physicalNetworkServiceProviderDao.findByServiceProvider(physicalNetwork.getId(),
                 networkDevice.getNetworkServiceProvder());
         if (ntwkSvcProvider == null) {
-            throw new CloudRuntimeException("Network Service Provider: " + 
networkDevice.getNetworkServiceProvder() + " is not enabled in the physical 
network: "
-                    + physicalNetworkId + "to add this device");
+            throw new CloudRuntimeException(String.format("Network Service 
Provider: %s is not enabled in the physical network: %sto add this device",
+                    networkDevice.getNetworkServiceProvder(), 
physicalNetwork));
         } else if (ntwkSvcProvider.getState() == 
PhysicalNetworkServiceProvider.State.Shutdown) {
-            throw new CloudRuntimeException("Network Service Provider: " + 
ntwkSvcProvider.getProviderName() + " is in shutdown state in the physical 
network: "
-                    + physicalNetworkId + "to add this device");
+            throw new CloudRuntimeException(String.format("Network Service 
Provider: %s is in shutdown state in the physical network: %sto add this 
device",

Review Comment:
   ```suggestion
               throw new CloudRuntimeException(String.format("Network Service 
Provider: %s is in shutdown state in the physical network: %s to add this 
device",
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to