DaanHoogland commented on a change in pull request #4007: Restarting all 
networks that needs a restart in a VPC
URL: https://github.com/apache/cloudstack/pull/4007#discussion_r401906143
 
 

 ##########
 File path: server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java
 ##########
 @@ -1747,6 +1747,14 @@ public boolean restartVpc(final long vpcId, final 
boolean cleanUp, final boolean
                 return true;
             }
 
+            // Restart all networks in this VPC that needs a restart
+            List<? extends Network> networks = 
_ntwkModel.listNetworksByVpc(vpcId);
+            for (Network network: networks){
+                if (network.isRestartRequired()){
+                    _ntwkMgr.restartNetwork(network.getId(), callerAccount, 
callerUser, cleanUp);
+                }
+            }
 
 Review comment:
   instead of a comment can you extract this into a method with good name, 
please?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to