sureshanaparti commented on code in PR #8462:
URL: https://github.com/apache/cloudstack/pull/8462#discussion_r1448316549
##########
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, updated the log and removed findById call @DaanHoogland
--
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]