Skip to content

Commit a470f33

Browse files
committed
Merge branch '4.17'
2 parents 711d4b9 + 7d23a0a commit a470f33

File tree

52 files changed

+94
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+94
-89
lines changed

agent/src/main/java/com/cloud/agent/Agent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public void sendStartup(final Link link) {
457457
try {
458458
link.send(request.toBytes());
459459
} catch (final ClosedChannelException e) {
460-
s_logger.warn("Unable to send reques: " + request.toString());
460+
s_logger.warn("Unable to send request: " + request.toString());
461461
}
462462
}
463463
}
@@ -467,7 +467,7 @@ protected void setupStartupCommand(final StartupCommand startup) {
467467
try {
468468
addr = InetAddress.getLocalHost();
469469
} catch (final UnknownHostException e) {
470-
s_logger.warn("unknow host? ", e);
470+
s_logger.warn("unknown host? ", e);
471471
throw new CloudRuntimeException("Cannot get local IP address");
472472
}
473473

@@ -954,7 +954,7 @@ private void postRequest(final Request request) throws AgentControlChannelExcept
954954
try {
955955
_link.send(request.toBytes());
956956
} catch (final ClosedChannelException e) {
957-
s_logger.warn("Unable to post agent control reques: " + request.toString());
957+
s_logger.warn("Unable to post agent control request: " + request.toString());
958958
throw new AgentControlChannelException("Unable to post agent control request due to " + e.getMessage());
959959
}
960960
} else {

agent/src/main/java/com/cloud/agent/AgentShell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ public void init(String[] args) throws ConfigurationException {
362362

363363
s_logger.info("Agent started");
364364
} else {
365-
s_logger.error("Could not start the Agent because the absolut path of the \"log4j-cloud.xml\" file cannot be determined.");
365+
s_logger.error("Could not start the Agent because the absolute path of the \"log4j-cloud.xml\" file cannot be determined.");
366366
}
367367

368368
final Class<?> c = this.getClass();

api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ OVFFile getFileDefinitionFromDiskDefinition(String fileRef, List<OVFFile> files)
521521
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
522522
if (doc == null) {
523523
if (s_logger.isTraceEnabled()) {
524-
s_logger.trace("no document to parse; returning no prerequiste networks");
524+
s_logger.trace("no document to parse; returning no prerequisite networks");
525525
}
526526
return Collections.emptyList();
527527
}

api/src/main/java/com/cloud/network/lb/LoadBalancingRulesService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ LoadBalancer createPublicLoadBalancerRule(String xId, String name, String descri
6565
* @param cmd
6666
* the command specifying the stickiness method name, params (name,value pairs), policy name and
6767
* description.
68-
* @return the newly created stickiness policy if successfull, null otherwise
68+
* @return the newly created stickiness policy if successful, null otherwise
6969
* @thows NetworkRuleConflictException
7070
*/
7171
public StickinessPolicy createLBStickinessPolicy(CreateLBStickinessPolicyCmd cmd) throws NetworkRuleConflictException;
@@ -81,7 +81,7 @@ LoadBalancer createPublicLoadBalancerRule(String xId, String name, String descri
8181
* @param cmd
8282
* the command specifying the stickiness method name, params
8383
* (name,value pairs), policy name and description.
84-
* @return the newly created stickiness policy if successfull, null
84+
* @return the newly created stickiness policy if successful, null
8585
* otherwise
8686
* @thows NetworkRuleConflictException
8787
*/

api/src/main/java/com/cloud/storage/Volume.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ enum State {
5656
NotUploaded("The volume entry is just created in DB, not yet uploaded"),
5757
UploadInProgress("Volume upload is in progress"),
5858
UploadError("Volume upload encountered some error"),
59-
UploadAbandoned("Volume upload is abandoned since the upload was never initiated within a specificed time"),
59+
UploadAbandoned("Volume upload is abandoned since the upload was never initiated within a specified time"),
6060
Attaching("The volume is attaching to a VM from Ready state.");
6161

6262
String _description;

api/src/main/java/com/cloud/vm/UserVmService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ UserVm upgradeVirtualMachine(ScaleVMCmd cmd) throws ResourceUnavailableException
502502
String getVmUserData(long vmId);
503503

504504
/**
505-
* determin whether the uservm should be visible to the end user
505+
* determine whether the uservm should be visible to the end user
506506
* @return value of the display flag
507507
*/
508508
public boolean isDisplayResourceEnabled(Long vmId);

api/src/main/java/org/apache/cloudstack/api/command/admin/address/ReleasePodIpCmdByAdmin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void execute() {
6969
boolean result = _networkService.releasePodIp(this);
7070
if (result) {
7171
SuccessResponse response = new SuccessResponse(getCommandName());
72-
response.setDisplayText("IP is released sucessfully");
72+
response.setDisplayText("IP is released successfully");
7373
setResponseObject(response);
7474
} else {
7575
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod ip ");

api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class CreateStorageNetworkIpRangeCmd extends BaseAsyncCmd {
6464

6565
@Parameter(name = ApiConstants.VLAN,
6666
type = CommandType.INTEGER,
67-
description = "Optional. The vlan the ip range sits on, default to Null when it is not specificed which means you network is not on any Vlan. This is mainly for Vmware as other hypervisors can directly reterive bridge from pyhsical network traffic type table")
67+
description = "Optional. The vlan the ip range sits on, default to Null when it is not specified which means you network is not on any Vlan. This is mainly for Vmware as other hypervisors can directly reterive bridge from pyhsical network traffic type table")
6868
private Integer vlan;
6969

7070
@Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "the netmask for storage network")

api/src/main/java/org/apache/cloudstack/api/command/user/account/AddUserToProjectCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void execute() {
126126

127127
private void validateInput() {
128128
if (email == null && username == null) {
129-
throw new InvalidParameterValueException("Must specify atleast username");
129+
throw new InvalidParameterValueException("Must specify at least username");
130130
}
131131
if (email != null && username == null) {
132132
throw new InvalidParameterValueException("Must specify username for given email ID");

api/src/main/java/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class QueryAsyncJobResultCmd extends BaseCmd {
3737
//////////////// API parameters /////////////////////
3838
/////////////////////////////////////////////////////
3939

40-
@Parameter(name = ApiConstants.JOB_ID, type = CommandType.UUID, entityType = AsyncJobResponse.class, required = true, description = "the ID of the asychronous job")
40+
@Parameter(name = ApiConstants.JOB_ID, type = CommandType.UUID, entityType = AsyncJobResponse.class, required = true, description = "the ID of the asynchronous job")
4141
private Long id;
4242

4343
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd {
6767
collectionType = CommandType.UUID,
6868
entityType = FirewallRuleResponse.class,
6969
required = true,
70-
description = "the list load balancer rules that will be assigned to gloabal load balancer rule")
70+
description = "the list load balancer rules that will be assigned to global load balancer rule")
7171
private List<Long> loadBalancerRulesIds;
7272

7373
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public Long getId() {
9494
}
9595

9696
if (id == null) {
97-
throw new InvalidParameterValueException("Either id or name parameter is requred by deleteSecurityGroup command");
97+
throw new InvalidParameterValueException("Either id or name parameter is required by deleteSecurityGroup command");
9898
}
9999

100100
return id;

api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public String getEventType() {
6767

6868
@Override
6969
public String getEventDescription() {
70-
return "Restore a VM to orignal template or specific snapshot";
70+
return "Restore a VM to original template or specific snapshot";
7171
}
7272

7373
@Override

api/src/main/java/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class LBStickinessPolicyResponse extends BaseResponse {
5555
@Param(description = "is policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin})
5656
private Boolean forDisplay;
5757

58-
// FIXME : if prams with the same name exists more then once then value are concatinated with ":" as delimitor .
58+
// FIXME : if prams with the same name exists more then once then value are concatinated with ":" as delimiter .
5959
// Reason: Map does not support duplicate keys, need to look for the alernate data structure
6060
// Example: <params>{indirect=null, name=testcookie, nocache=null, domain=www.yahoo.com:www.google.com, postonly=null}</params>
6161
// in the above there are two domains with values www.yahoo.com and www.google.com

core/src/main/java/com/cloud/agent/api/routing/SetFirewallRulesCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public String[][] generateFwRules() {
5555
*/
5656
if (fwTO.revoked()) {
5757
StringBuilder sb = new StringBuilder();
58-
/* This entry is added just to make sure atleast there will one entry in the list to get the ipaddress */
58+
/* This entry is added just to make sure at least there will one entry in the list to get the ipaddress */
5959
sb.append(fwTO.getSrcIp()).append(":reverted:0:0:0:0:").append(fwTO.getId()).append(":");
6060
String fwRuleEntry = sb.toString();
6161
toAdd.add(fwRuleEntry);

core/src/main/java/com/cloud/agent/api/routing/SetNetworkACLCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public String[][] generateFwRules() {
6060
*/
6161
if (aclTO.revoked() == true) {
6262
final StringBuilder sb = new StringBuilder();
63-
/* This entry is added just to make sure atleast there will one entry in the list to get the ipaddress */
63+
/* This entry is added just to make sure at least there will one entry in the list to get the ipaddress */
6464
List<String> revertRuleItems = Arrays.asList("", "reverted", "0", "0", "0", "");
6565
sb.append(aclTO.getTrafficType().toString()).append(String.join(RULE_DETAIL_SEPARATOR, revertRuleItems));
6666
final String aclRuleEntry = sb.toString();

engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ private void persistLegacyZones(Connection conn) {
719719
dcList = new ArrayList<String>();
720720
count = 0L;
721721
// Legacy zone term is meant only for VMware
722-
// Legacy zone is a zone with atleast 2 clusters & with multiple DCs or VCs
722+
// Legacy zone is a zone with at least 2 clusters & with multiple DCs or VCs
723723
clusters = clustersQuery.executeQuery();
724724
if (!clusters.next()) {
725725
continue; // Ignore the zone without any clusters

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,25 +213,25 @@ def downloadTemplate(uuid, secPath):
213213
def prepareOCFS2Nodes(clusterName, nodeString):
214214
def configureEtcHosts(nodes):
215215
if not exists(ETC_HOSTS):
216-
orignalConf = ""
216+
originalConf = ""
217217
else:
218218
fd = open(ETC_HOSTS, "r")
219-
orignalConf = fd.read()
219+
originalConf = fd.read()
220220
fd.close()
221221

222222
pattern = r"(.*%s.*)|(.*%s.*)"
223223
newlines = []
224224
for n in nodes:
225225
p = pattern % (n["ip_address"], n["name"])
226-
orignalConf = re.sub(p, "", orignalConf)
226+
originalConf = re.sub(p, "", originalConf)
227227
newlines.append("%s\t%s\n"%(n["ip_address"], n["name"]))
228228

229-
orignalConf = orignalConf + "".join(newlines)
229+
originalConf = originalConf + "".join(newlines)
230230
# remove extra empty lines
231-
orignalConf = re.sub(r"\n\s*\n*", "\n", orignalConf)
232-
logger.debug(OvmStoragePool.prepareOCFS2Nodes, "Configure /etc/hosts:%s\n"%orignalConf)
231+
originalConf = re.sub(r"\n\s*\n*", "\n", originalConf)
232+
logger.debug(OvmStoragePool.prepareOCFS2Nodes, "Configure /etc/hosts:%s\n"%originalConf)
233233
fd = open(ETC_HOSTS, "w")
234-
fd.write(orignalConf)
234+
fd.write(originalConf)
235235
fd.close()
236236

237237
def configureHostName(nodes):

plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3VmSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public MigrateAnswer execute(final MigrateCommand cmd) {
223223
xen.migrateVm(ovmObject.deDash(vm.getVmRootDiskPoolId()),
224224
vm.getVmUuid(), destIp);
225225
state = State.Stopping;
226-
msg = "Migration of " + vmName + " successfull";
226+
msg = "Migration of " + vmName + " successful";
227227
return new MigrateAnswer(cmd, true, msg, null);
228228
} catch (Ovm3ResourceException e) {
229229
msg = "Pooled VM Migrate" + ": Migration of " + vmName + " to "

plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6535,8 +6535,11 @@ private HashMap<String, VmStatsEntry> getVmStats(List<String> vmNames) throws Ex
65356535
}
65366536
}
65376537

6538-
final VmStatsEntry vmStats = new VmStatsEntry(0, NumberUtils.toDouble(memkb) * 1024, NumberUtils.toDouble(guestMemusage) * 1024, NumberUtils.toDouble(memlimit) * 1024,
6539-
maxCpuUsage, networkReadKBs, networkWriteKBs, NumberUtils.toInt(numberCPUs), diskReadKbs, diskWriteKbs, diskReadIops, diskWriteIops, "vm");
6538+
double doubleMemKb = NumberUtils.toDouble(memkb);
6539+
double guestFreeMem = doubleMemKb - NumberUtils.toDouble(guestMemusage);
6540+
6541+
final VmStatsEntry vmStats = new VmStatsEntry(0, doubleMemKb * 1024, guestFreeMem * 1024, NumberUtils.toDouble(memlimit) * 1024, maxCpuUsage, networkReadKBs,
6542+
networkWriteKBs, NumberUtils.toInt(numberCPUs), diskReadKbs, diskWriteKbs, diskReadIops, diskWriteIops, "vm");
65406543
vmResponseMap.put(name, vmStats);
65416544

65426545
}

plugins/network-elements/ovs/src/main/java/com/cloud/network/element/OvsElement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ private static boolean containsOnlyNumbers(final String str, final String endCha
669669
boolean matchedEndChar = false;
670670
if (str.length() < 2)
671671
{
672-
return false; // atleast one numeric and one char. example:
672+
return false; // at least one numeric and one char. example:
673673
}
674674
// 3h
675675
final char strEnd = str.toCharArray()[str.length() - 1];

plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ public boolean migrateVolume(final String srcVolumeId, final String destPoolId,
792792
long timeElapsedInSecs = (System.currentTimeMillis() - migrationStartTime) / 1000;
793793
int timeRemainingInSecs = (int) (timeoutInSecs - timeElapsedInSecs);
794794
if (timeRemainingInSecs > (timeoutInSecs / 2)) {
795-
// Try to pause gracefully (continue the migration) if atleast half of the time is remaining
795+
// Try to pause gracefully (continue the migration) if at least half of the time is remaining
796796
pauseVolumeMigration(srcVolumeId, false);
797797
status = waitForVolumeMigrationToComplete(volume.getVtreeId(), timeRemainingInSecs);
798798
}

plugins/user-authenticators/ldap/src/test/groovy/org/apache/cloudstack/ldap/LdapManagerImplSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class LdapManagerImplSpec extends spock.lang.Specification {
288288
def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration)
289289
when: "We search for users"
290290
def result = ldapManager.searchUsers("rmurphy");
291-
then: "A list of atleast 1 is returned"
291+
then: "A list of at least 1 is returned"
292292
result.size() > 0;
293293
}
294294

@@ -390,7 +390,7 @@ class LdapManagerImplSpec extends spock.lang.Specification {
390390
def ldapManager = new LdapManagerImpl(ldapConfigurationDao, ldapContextFactory, ldapUserManagerFactory, ldapConfiguration)
391391
when: "A request for configurations is made"
392392
def result = ldapManager.listConfigurations(new LdapListConfigurationCmd())
393-
then: "Then atleast 1 ldap configuration is returned"
393+
then: "Then at least 1 ldap configuration is returned"
394394
result.second() > 0
395395
}
396396

plugins/user-authenticators/ldap/src/test/groovy/org/apache/cloudstack/ldap/LdapSearchUserCmdSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class LdapSearchUserCmdSpec extends spock.lang.Specification {
5555
def ldapUserSearchCmd = new LdapUserSearchCmd(ldapManager)
5656
when: "The command is executed"
5757
ldapUserSearchCmd.execute()
58-
then: "A array with length of atleast 1 is returned"
58+
then: "A array with length of at least 1 is returned"
5959
ldapUserSearchCmd.responseObject.getResponses().size() > 0
6060
}
6161

server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ protected Pair<Map<Volume, List<StoragePool>>, List<Volume>> findSuitablePoolsFo
15631563
Map<Volume, List<StoragePool>> suitableVolumeStoragePools = new HashMap<Volume, List<StoragePool>>();
15641564
List<Volume> readyAndReusedVolumes = new ArrayList<Volume>();
15651565

1566-
// There should be atleast the ROOT volume of the VM in usable state
1566+
// There should be at least the ROOT volume of the VM in usable state
15671567
if (volumesTobeCreated.isEmpty()) {
15681568
// OfflineVmwareMigration: find out what is wrong with the id of the vm we try to start
15691569
throw new CloudRuntimeException("Unable to create deployment, no usable volumes found for the VM: " + vmProfile.getId());

server/src/main/java/com/cloud/event/ActionEventUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private static void publishOnEventBus(long userId, long accountId, String eventC
224224
eventDescription.put("status", state.toString());
225225
eventDescription.put("entity", resourceType);
226226
eventDescription.put("entityuuid", resourceUuid);
227-
//Put all the first class entities that are touched during the action. For now atleast put in the vmid.
227+
//Put all the first class entities that are touched during the action. For now at least put in the vmid.
228228
populateFirstClassEntities(eventDescription);
229229
eventDescription.put("description", description);
230230

server/src/main/java/com/cloud/network/as/AutoScaleManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ public AutoScalePolicyVO doInTransaction(TransactionStatus status) {
537537
for (ConditionVO condition : conditions) {
538538
if (counterIds.contains(condition.getCounterid())) {
539539
throw new InvalidParameterValueException(
540-
"atleast two conditions in the conditionids have the same counter. It is not right to apply two different conditions for the same counter");
540+
"at least two conditions in the conditionids have the same counter. It is not right to apply two different conditions for the same counter");
541541
}
542542
counterIds.add(condition.getCounterid());
543543
}

0 commit comments

Comments
 (0)