DaanHoogland commented on code in PR #8462:
URL: https://github.com/apache/cloudstack/pull/8462#discussion_r1447363589


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java:
##########
@@ -3018,13 +3018,8 @@ protected void checkL2OfferingServices(NetworkOfferingVO 
ntwkOff) {
     @DB
     public boolean shutdownNetwork(final long networkId, final 
ReservationContext context, final boolean cleanupElements) {
         NetworkVO network = _networksDao.findById(networkId);
-        if (network.getState() == Network.State.Allocated) {
-            s_logger.debug("Network is already shutdown: " + network);
-            return true;
-        }
-
-        if (network.getState() != Network.State.Implemented && 
network.getState() != Network.State.Shutdown) {
-            s_logger.debug("Network is not implemented: " + network);
+        if (network == null) {
+            s_logger.debug("Network with id: " + networkId + " doesn't 
exists");

Review Comment:
   ok, but it adds the need for the findById call. no big issue either way



-- 
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