You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/04/01 21:00:15 UTC
[GitHub] [cloudstack] DaanHoogland commented on a change in pull request
#4007: Restarting all networks that needs a restart in a VPC
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:
users@infra.apache.org
With regards,
Apache Git Services