Skip to content

Commit f0ee884

Browse files
committed
Address comments
1 parent 1cb1962 commit f0ee884

File tree

20 files changed

+34
-34
lines changed

20 files changed

+34
-34
lines changed

plugins/backup/networker/src/main/java/org/apache/cloudstack/backup/NetworkerBackupProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public boolean restoreVMFromBackup(VirtualMachine vm, Backup backup) {
359359
script.add("-v");
360360

361361
Date restoreJobStart = new Date();
362-
LOG.debug(String.format("Starting Restore for VM ID %s and %s at %s", vm, SSID, restoreJobStart));
362+
LOG.debug(String.format("Starting Restore for VM %s and %s at %s", vm, SSID, restoreJobStart));
363363

364364
if ( executeRestoreCommand(hostVO, credentials.first(), credentials.second(), script.toString()) ) {
365365
Date restoreJobEnd = new Date();

plugins/dedicated-resources/src/main/java/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public List<DedicatedResourceVO> dedicatePod(final Long podId, final Long domain
302302
if (dedicatedZoneOfPod.getAccountId() != null || (accountId == null && !domainIdInChildreanList) ||
303303
(accountId != null && !(dedicatedZoneOfPod.getDomainId().equals(domainId) || domainIdInChildreanList))) {
304304
DataCenterVO zone = _zoneDao.findById(pod.getDataCenterId());
305-
logger.error(String.format("Cannot dedicate Pod. Its zone%s is already dedicated", zone));
305+
logger.error(String.format("Cannot dedicate Pod. Its zone %s is already dedicated", zone));
306306
throw new CloudRuntimeException("Pod's Zone " + zone.getName() + " is already dedicated");
307307
}
308308
}

plugins/integrations/kubernetes-service/src/main/java/org/apache/cloudstack/api/command/user/kubernetes/cluster/StopKubernetesClusterCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void execute() throws ServerApiException, ConcurrentOperationException {
101101
try {
102102
if (!kubernetesClusterService.stopKubernetesCluster(this)) {
103103
KubernetesCluster cluster = kubernetesClusterService.findById(getId());
104-
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to start Kubernetes cluster %s with id %d", cluster, getId()));
104+
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to stop Kubernetes cluster %s with id %d", cluster, getId()));
105105
}
106106
final SuccessResponse response = new SuccessResponse(getCommandName());
107107
setResponseObject(response);

plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/agent/OpenDaylightControllerResourceManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ public OpenDaylightControllerVO addController(AddOpenDaylightControllerCmd cmd)
106106
final PhysicalNetworkServiceProviderVO ntwkSvcProvider = physicalNetworkServiceProviderDao.findByServiceProvider(physicalNetwork.getId(),
107107
networkDevice.getNetworkServiceProvder());
108108
if (ntwkSvcProvider == null) {
109-
throw new CloudRuntimeException(String.format("Network Service Provider: %s is not enabled in the physical network: %sto add this device",
109+
throw new CloudRuntimeException(String.format("Network Service Provider: %s is not enabled in the physical network: %s to add this device",
110110
networkDevice.getNetworkServiceProvder(), physicalNetwork));
111111
} else if (ntwkSvcProvider.getState() == PhysicalNetworkServiceProvider.State.Shutdown) {
112-
throw new CloudRuntimeException(String.format("Network Service Provider: %s is in shutdown state in the physical network: %sto add this device",
112+
throw new CloudRuntimeException(String.format("Network Service Provider: %s is in shutdown state in the physical network: %s to add this device",
113113
ntwkSvcProvider.getProviderName(), physicalNetwork));
114114
}
115115

plugins/storage/volume/adaptive/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle/AdaptiveDataStoreLifeCycleImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,19 +278,19 @@ public boolean attachCluster(DataStore store, ClusterScope scope) {
278278

279279
if (dataStoreVO.isManaged()) {
280280
//boolean success = false;
281-
for (HostVO h : allHosts) {
282-
logger.debug("adding host {} to storage pool {}", h, store);
281+
for (HostVO host : allHosts) {
282+
logger.debug("adding host {} to storage pool {}", host, store);
283283
}
284284
}
285285

286286
logger.debug("In createPool Adding the pool to each of the hosts");
287287
List<HostVO> poolHosts = new ArrayList<HostVO>();
288-
for (HostVO h : allHosts) {
288+
for (HostVO host : allHosts) {
289289
try {
290-
_storageMgr.connectHostToSharedPool(h, primarystore.getId());
291-
poolHosts.add(h);
290+
_storageMgr.connectHostToSharedPool(host, primarystore.getId());
291+
poolHosts.add(host);
292292
} catch (Exception e) {
293-
logger.warn("Unable to establish a connection between " + h + " and " + primarystore, e);
293+
logger.warn("Unable to establish a connection between {} and {}", host, primarystore, e);
294294
}
295295
}
296296

server/src/main/java/com/cloud/ha/AbstractInvestigatorImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ protected List<HostVO> findHostByPod(long podId, Long excludeHostId) {
7272
List<HostVO> hosts = sc.list();
7373

7474
List<HostVO> hostList = new ArrayList<>(hosts.size());
75-
for (HostVO h : hosts) {
76-
if (excludeHostId != null && h.getId() == excludeHostId) {
75+
for (HostVO host : hosts) {
76+
if (excludeHostId != null && host.getId() == excludeHostId) {
7777
continue;
7878
}
79-
hostList.add(h);
79+
hostList.add(host);
8080
}
8181

8282
return hostList;

server/src/main/java/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ public ExternalLoadBalancerDeviceVO addExternalLoadBalancer(long physicalNetwork
244244

245245
ntwkSvcProvider = _physicalNetworkServiceProviderDao.findByServiceProvider(pNetwork.getId(), ntwkDevice.getNetworkServiceProvder());
246246
if (ntwkSvcProvider == null) {
247-
throw new CloudRuntimeException(String.format("Network Service Provider: %s is not enabled in the physical network: %sto add this device", ntwkDevice.getNetworkServiceProvder(), pNetwork));
247+
throw new CloudRuntimeException(String.format("Network Service Provider: %s is not enabled in the physical network: %s to add this device", ntwkDevice.getNetworkServiceProvder(), pNetwork));
248248
} else if (ntwkSvcProvider.getState() == PhysicalNetworkServiceProvider.State.Shutdown) {
249-
throw new CloudRuntimeException(String.format("Network Service Provider: %s is in shutdown state in the physical network: %sto add this device", ntwkSvcProvider.getProviderName(), pNetwork));
249+
throw new CloudRuntimeException(String.format("Network Service Provider: %s is in shutdown state in the physical network: %s to add this device", ntwkSvcProvider.getProviderName(), pNetwork));
250250
}
251251

252252
if (gslbProvider) {

server/src/main/java/com/cloud/network/vpc/NetworkACLManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public boolean replaceNetworkACL(final NetworkACL acl, final NetworkVO network)
214214
network.setNetworkACLId(acl.getId());
215215
//Update Network ACL
216216
if (_networkDao.update(network.getId(), network)) {
217-
logger.debug("Updated network: {} with Network ACL Id: {}, Applying ACL items", network, acl);
217+
logger.debug("Updated network: {} with Network ACL: {}, Applying ACL items", network, acl);
218218
//Apply ACL to network
219219
final Boolean result = applyACLToNetwork(network.getId());
220220
if (result) {

server/src/main/java/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ private boolean removeVpnUserWithoutRemoteAccessVpn(Account vpnOwner, String use
527527
return false;
528528
}
529529
if (!State.Revoke.equals(vpnUser.getState())) {
530-
logger.error("VPN user with ownerId: {} and username: {} is not in revoked state, current state: {}", vpnOwner, userName, vpnUser.getState());
530+
logger.error("VPN user with owner: {} and username: {} is not in revoked state, current state: {}", vpnOwner, userName, vpnUser.getState());
531531
return false;
532532
}
533533
return _vpnUsersDao.remove(vpnUser.getId());

server/src/main/java/com/cloud/projects/ProjectManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ public Boolean doInTransaction(TransactionStatus status) {
12691269
});
12701270
}
12711271
} else {
1272-
throw new InvalidParameterValueException(String.format("Unable to find invitation for account name=%s to the project id=%s", accountName, project));
1272+
throw new InvalidParameterValueException(String.format("Unable to find invitation for account name=%s to the project=%s", accountName, project));
12731273
}
12741274

12751275
return result;

0 commit comments

Comments
 (0)