sureshanaparti commented on a change in pull request #5873:
URL: https://github.com/apache/cloudstack/pull/5873#discussion_r795475131
##########
File path: server/src/main/java/com/cloud/network/NetworkServiceImpl.java
##########
@@ -2021,10 +2016,20 @@ public boolean deleteNetwork(long networkId, boolean
forced) {
@Override
@ActionEvent(eventType = EventTypes.EVENT_NETWORK_RESTART,
eventDescription = "restarting network", async = true)
public boolean restartNetwork(Long networkId, boolean cleanup, boolean
makeRedundant, User user) throws ConcurrentOperationException,
ResourceUnavailableException, InsufficientCapacityException {
+ NetworkVO network = getNetworkVO(networkId, "Network with specified id
doesn't exist", networkId.toString());
+ return restartNetwork(network, cleanup, makeRedundant, user);
+ }
+
+ private NetworkVO getNetworkVO(Long networkId, String errMsgFormat, String
objectId) {
Review comment:
In case objectId is network id always, no need of argument
`String objectId = String.valueOf(networkId)`
```suggestion
private NetworkVO getNetworkVO(Long networkId, String errMsgFormat) {
```
--
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]