Skip to content

misc: fix spelling #8272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public interface ConfigurationService {
/**
* Deletes a zone from the database. Will not allow you to delete zones that are being used anywhere in the system.
*
* @param cmd command object containg the zoneid
* @param cmd command object containing the zoneid
*/
boolean deleteZone(DeleteZoneCmd cmd);

Expand Down
8 changes: 4 additions & 4 deletions api/src/main/java/org/apache/cloudstack/acl/RoleType.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ public static Long getRoleByAccountType(final Long roleId, final Account.Type ac
/**
* This method returns the role account type if the role isn't null, else it returns the default account type.
* */
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defaultAccountType) {
if (role != null) {
logger.debug(String.format("Role [%s] is not null; therefore, we use its account type [%s].", role, defautAccountType));
logger.debug(String.format("Role [%s] is not null; therefore, we use its account type [%s].", role, defaultAccountType));
return role.getRoleType().getAccountType();
}
logger.debug(String.format("Role is null; therefore, we use the default account type [%s] value.", defautAccountType));
return defautAccountType;
logger.debug(String.format("Role is null; therefore, we use the default account type [%s] value.", defaultAccountType));
return defaultAccountType;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private AlertType(short type, String name, boolean isDefault) {
public static final AlertType ALERT_TYPE_ROUTING = new AlertType((short)11, "ALERT.NETWORK.ROUTING", true);
public static final AlertType ALERT_TYPE_STORAGE_MISC = new AlertType((short)12, "ALERT.STORAGE.MISC", true);
public static final AlertType ALERT_TYPE_USAGE_SERVER = new AlertType((short)13, "ALERT.USAGE", true);
public static final AlertType ALERT_TYPE_MANAGMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true);
public static final AlertType ALERT_TYPE_MANAGEMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true);
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = new AlertType((short)15, "ALERT.NETWORK.DOMAINROUTERMIGRATE", true);
public static final AlertType ALERT_TYPE_CONSOLE_PROXY_MIGRATE = new AlertType((short)16, "ALERT.SERVICE.CONSOLEPROXYMIGRATE", true);
public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ public class ApiConstants {
public static final String SERVICE_NAME = "servicename";
public static final String DHCP_RANGE = "dhcprange";
public static final String UUID = "uuid";
public static final String SECURITY_GROUP_EANBLED = "securitygroupenabled";
public static final String SECURITY_GROUP_ENABLED = "securitygroupenabled";
public static final String LOCAL_STORAGE_ENABLED = "localstorageenabled";
public static final String GUEST_IP_TYPE = "guestiptype";
public static final String GUEST_IP6_PREFIX = "guestip6prefix";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class UpdateHypervisorCapabilitiesCmd extends BaseCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability")
private Long id;

@Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "set true to enable security group for this hypervisor.")
@Parameter(name = ApiConstants.SECURITY_GROUP_ENABLED, type = CommandType.BOOLEAN, description = "set true to enable security group for this hypervisor.")
private Boolean securityGroupEnabled;

@Parameter(name = ApiConstants.MAX_GUESTS_LIMIT, type = CommandType.LONG, description = "the max number of Guest VMs per host for this hypervisor.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class CreateServiceOfferingCmd extends BaseCmd {

@Parameter(name = ApiConstants.IS_VOLATILE,
type = CommandType.BOOLEAN,
description = "true if the virtual machine needs to be volatile so that on every reboot of VM, original root disk is dettached then destroyed and a fresh root disk is created and attached to VM")
description = "true if the virtual machine needs to be volatile so that on every reboot of VM, original root disk is detached then destroyed and a fresh root disk is created and attached to VM")
private Boolean isVolatile;

@Parameter(name = ApiConstants.STORAGE_TYPE, type = CommandType.STRING, description = "the storage type of the service offering. Values are local and shared.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class CreateZoneCmd extends BaseCmd {
@Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this Zone for allocation of new resources")
private String allocationState;

@Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "true if network is security group enabled, false otherwise")
@Parameter(name = ApiConstants.SECURITY_GROUP_ENABLED, type = CommandType.BOOLEAN, description = "true if network is security group enabled, false otherwise")
private Boolean securitygroupenabled;

@Parameter(name = ApiConstants.LOCAL_STORAGE_ENABLED, type = CommandType.BOOLEAN, description = "true if local storage offering enabled, false otherwise")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class AlertResponse extends BaseResponse {
+ "MEMORY = 0, CPU = 1, STORAGE = 2, STORAGE_ALLOCATED = 3, PUBLIC_IP = 4, PRIVATE_IP = 5, SECONDARY_STORAGE = 6, "
+ "HOST = 7, USERVM = 8, DOMAIN_ROUTER = 9, CONSOLE_PROXY = 10, "
+ "ROUTING = 11: lost connection to default route (to the gateway), "
+ "STORAGE_MISC = 12, USAGE_SERVER = 13, MANAGMENT_NODE = 14, DOMAIN_ROUTER_MIGRATE = 15, CONSOLE_PROXY_MIGRATE = 16, "
+ "STORAGE_MISC = 12, USAGE_SERVER = 13, MANAGEMENT_NODE = 14, DOMAIN_ROUTER_MIGRATE = 15, CONSOLE_PROXY_MIGRATE = 16, "
+ "USERVM_MIGRATE = 17, VLAN = 18, SSVM = 19, USAGE_SERVER_RESULT = 20, STORAGE_DELETE = 21, UPDATE_RESOURCE_COUNT = 22, "
+ "USAGE_SANITY_RESULT = 23, DIRECT_ATTACHED_PUBLIC_IP = 24, LOCAL_STORAGE = 25, RESOURCE_LIMIT_EXCEEDED = 26, "
+ "SYNC = 27, UPLOAD_FAILED = 28, OOBM_AUTH_ERROR = 29")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class HypervisorCapabilitiesResponse extends BaseResponse {
@Param(description = "the maximum number of guest vms recommended for this hypervisor")
private Long maxGuestsLimit;

@SerializedName(ApiConstants.SECURITY_GROUP_EANBLED)
@SerializedName(ApiConstants.SECURITY_GROUP_ENABLED)
@Param(description = "true if security group is supported")
private boolean isSecurityGroupEnabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

import java.util.List;

public class AttachOrDettachConfigDriveCommand extends Command {
public class AttachOrDetachConfigDriveCommand extends Command {

String vmName;
List<String[]> vmData;
String configDriveLabel;
boolean isAttach = false;

public AttachOrDettachConfigDriveCommand(String vmName, List<String[]> vmData, String label, boolean attach) {
public AttachOrDetachConfigDriveCommand(String vmName, List<String[]> vmData, String label, boolean attach) {
this.vmName = vmName;
this.vmData = vmData;
this.configDriveLabel = label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.apache.cloudstack.storage.command.CopyCommand;
import org.apache.cloudstack.storage.command.CreateObjectCommand;
import org.apache.cloudstack.storage.command.DeleteCommand;
import org.apache.cloudstack.storage.command.DettachCommand;
import org.apache.cloudstack.storage.command.DetachCommand;
import org.apache.cloudstack.storage.command.ForgetObjectCmd;
import org.apache.cloudstack.storage.command.IntroduceObjectCmd;
import org.apache.cloudstack.storage.command.ResignatureCommand;
Expand Down Expand Up @@ -56,9 +56,9 @@ public interface StorageProcessor {

public Answer attachVolume(AttachCommand cmd);

public Answer dettachIso(DettachCommand cmd);
public Answer detachIso(DetachCommand cmd);

public Answer dettachVolume(DettachCommand cmd);
public Answer detachVolume(DetachCommand cmd);

public Answer createVolume(CreateObjectCommand cmd);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.cloudstack.storage.command.CreateObjectAnswer;
import org.apache.cloudstack.storage.command.CreateObjectCommand;
import org.apache.cloudstack.storage.command.DeleteCommand;
import org.apache.cloudstack.storage.command.DettachCommand;
import org.apache.cloudstack.storage.command.DetachCommand;
import org.apache.cloudstack.storage.command.IntroduceObjectCmd;
import org.apache.cloudstack.storage.command.QuerySnapshotZoneCopyAnswer;
import org.apache.cloudstack.storage.command.QuerySnapshotZoneCopyCommand;
Expand Down Expand Up @@ -68,8 +68,8 @@ public Answer handleStorageCommands(StorageSubSystemCommand command) {
return execute((DeleteCommand)command);
} else if (command instanceof AttachCommand) {
return execute((AttachCommand)command);
} else if (command instanceof DettachCommand) {
return execute((DettachCommand)command);
} else if (command instanceof DetachCommand) {
return execute((DetachCommand)command);
} else if (command instanceof IntroduceObjectCmd) {
return processor.introduceObject((IntroduceObjectCmd)command);
} else if (command instanceof SnapshotAndCopyCommand) {
Expand Down Expand Up @@ -169,12 +169,12 @@ protected Answer execute(AttachCommand cmd) {
}
}

protected Answer execute(DettachCommand cmd) {
protected Answer execute(DetachCommand cmd) {
DiskTO disk = cmd.getDisk();
if (disk.getType() == Volume.Type.ISO) {
return processor.dettachIso(cmd);
return processor.detachIso(cmd);
} else {
return processor.dettachVolume(cmd);
return processor.detachVolume(cmd);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.to.DiskTO;

public final class DettachAnswer extends Answer {
public final class DetachAnswer extends Answer {
private DiskTO disk;

public DettachAnswer() {
public DetachAnswer() {
super(null);
}

public DettachAnswer(DiskTO disk) {
public DetachAnswer(DiskTO disk) {
super(null);
setDisk(disk);
}

public DettachAnswer(String errMsg) {
public DetachAnswer(String errMsg) {
super(null, false, errMsg);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import com.cloud.agent.api.to.DiskTO;

public class DettachCommand extends StorageSubSystemCommand {
public class DetachCommand extends StorageSubSystemCommand {
private DiskTO disk;
private String vmName;
private boolean _managed;
Expand All @@ -34,13 +34,13 @@ public class DettachCommand extends StorageSubSystemCommand {
private boolean forced;
private long waitDetachDevice;

public DettachCommand(final DiskTO disk, final String vmName) {
public DetachCommand(final DiskTO disk, final String vmName) {
super();
this.disk = disk;
this.vmName = vmName;
}

public DettachCommand(final DiskTO disk, final String vmName, Map<String, String> params) {
public DetachCommand(final DiskTO disk, final String vmName, Map<String, String> params) {
super();
this.disk = disk;
this.vmName = vmName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
import com.cloud.agent.api.AgentControlAnswer;
import com.cloud.agent.api.AgentControlCommand;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.AttachOrDettachConfigDriveCommand;
import com.cloud.agent.api.AttachOrDetachConfigDriveCommand;
import com.cloud.agent.api.CheckVirtualMachineAnswer;
import com.cloud.agent.api.CheckVirtualMachineCommand;
import com.cloud.agent.api.ClusterVMMetaDataSyncAnswer;
Expand Down Expand Up @@ -3223,12 +3223,12 @@ private void orchestrateMigrateWithStorage(final String vmUuid, final long srcHo
profile.setConfigDriveIsoRootFolder(configDriveIsoRootFolder);
profile.setConfigDriveIsoFile(isoFile);

AttachOrDettachConfigDriveCommand dettachCommand = new AttachOrDettachConfigDriveCommand(vm.getInstanceName(), vmData, VmConfigDriveLabel.value(), false);
AttachOrDetachConfigDriveCommand detachCommand = new AttachOrDetachConfigDriveCommand(vm.getInstanceName(), vmData, VmConfigDriveLabel.value(), false);
try {
_agentMgr.send(srcHost.getId(), dettachCommand);
_agentMgr.send(srcHost.getId(), detachCommand);
s_logger.debug("Deleted config drive ISO for vm " + vm.getInstanceName() + " In host " + srcHost);
} catch (OperationTimedoutException e) {
s_logger.error("TIme out occurred while exeuting command AttachOrDettachConfigDrive " + e.getMessage(), e);
s_logger.error("TIme out occurred while exeuting command AttachOrDetachConfigDrive " + e.getMessage(), e);

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ CREATE TABLE `cloud`.`async_job_journal` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`job_id` bigint unsigned NOT NULL,
`journal_type` varchar(32),
`journal_text` varchar(1024) COMMENT 'journal descriptive informaton',
`journal_text` varchar(1024) COMMENT 'journal descriptive information',
`journal_obj` varchar(1024) COMMENT 'journal strutural information, JSON encoded object',
`created` datetime NOT NULL COMMENT 'date created',
PRIMARY KEY (`id`),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ protected void runInContext() {
public boolean start() {
if (cacheReplacementEnabled) {
Random generator = new Random();
int initalDelay = generator.nextInt(cacheReplaceMentInterval);
executors.scheduleWithFixedDelay(new CacheReplacementRunner(), initalDelay, cacheReplaceMentInterval, TimeUnit.SECONDS);
int initialDelay = generator.nextInt(cacheReplaceMentInterval);
executors.scheduleWithFixedDelay(new CacheReplacementRunner(), initialDelay, cacheReplaceMentInterval, TimeUnit.SECONDS);
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ public Connection getConnection() throws SQLException {

//
// MySQL default transaction isolation level is REPEATABLE READ,
// to reduce chances of DB deadlock, we will use READ COMMITED isolation level instead
// to reduce chances of DB deadlock, we will use READ COMMITTED isolation level instead
// see http://dev.mysql.com/doc/refman/5.0/en/innodb-deadlocks.html
//
_stack.push(new StackElement(CREATE_CONN, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public BaremetalPxeVO addPxeServer(AddBaremetalPxeCmd cmd) {
}
String pingDir = pcmd.getPingDir();
if (pingDir == null) {
throw new IllegalArgumentException("No direcotry for storage server specified");
throw new IllegalArgumentException("No directory for storage server specified");
}
String tftpDir = pcmd.getTftpDir();
if (tftpDir == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected boolean doScript(Script cmd, OutputInterpreter interpreter, int retry)
}
}

s_logger.warn("IPMI Scirpt failed due to " + res + "(" + cmd.toString() + ")");
s_logger.warn("IPMI Script failed due to " + res + "(" + cmd.toString() + ")");
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public boolean configure(String name, Map<String, Object> params) throws Configu

String pingDirs[] = _pingDir.split("/");
if (pingDirs.length != 2) {
throw new ConfigurationException("PING dir should have format like myshare/direcotry, eg: windows/64bit");
throw new ConfigurationException("PING dir should have format like myshare/directory, eg: windows/64bit");
}
_share = pingDirs[0];
_dir = pingDirs[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE
response.setObjectName("baremetaldhcps");
this.setResponseObject(response);
} catch (Exception e) {
s_logger.debug("Exception happend while executing ListBaremetalDhcpCmd");
s_logger.debug("Exception happened while executing ListBaremetalDhcpCmd");
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,8 @@ public class CloudStackTypes
public const string CreateObjectAnswer = "org.apache.cloudstack.storage.command.CreateObjectAnswer";
public const string CreateObjectCommand = "org.apache.cloudstack.storage.command.CreateObjectCommand";
public const string DeleteCommand = "org.apache.cloudstack.storage.command.DeleteCommand";
public const string DettachAnswer = "org.apache.cloudstack.storage.command.DettachAnswer";
public const string DettachCommand = "org.apache.cloudstack.storage.command.DettachCommand";
public const string DetachAnswer = "org.apache.cloudstack.storage.command.DetachAnswer";
public const string DetachCommand = "org.apache.cloudstack.storage.command.DetachCommand";
public const string HostVmStateReportCommand = "org.apache.cloudstack.HostVmStateReportCommand";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ public JContainer AttachCommand([FromBody]dynamic cmd)

// POST api/HypervResource/DetachCommand
[HttpPost]
[ActionName(CloudStackTypes.DettachCommand)]
[ActionName(CloudStackTypes.DetachCommand)]
public JContainer DetachCommand([FromBody]dynamic cmd)
{
using (log4net.NDC.Push(Guid.NewGuid().ToString()))
{
logger.Info(CloudStackTypes.DettachCommand + Utils.CleanString(cmd.ToString()));
logger.Info(CloudStackTypes.DetachCommand + Utils.CleanString(cmd.ToString()));

string details = null;
bool result = false;
Expand All @@ -302,12 +302,12 @@ public JContainer DetachCommand([FromBody]dynamic cmd)
}
else
{
details = "Invalid disk type to be dettached from vm " + vmName;
details = "Invalid disk type to be detached from vm " + vmName;
}
}
catch (Exception sysEx)
{
details = CloudStackTypes.DettachCommand + " failed due to " + sysEx.Message;
details = CloudStackTypes.DetachCommand + " failed due to " + sysEx.Message;
logger.Error(details, sysEx);
}

Expand All @@ -318,7 +318,7 @@ public JContainer DetachCommand([FromBody]dynamic cmd)
contextMap = contextMap
};

return ReturnCloudStackTypedJArray(ansContent, CloudStackTypes.DettachAnswer);
return ReturnCloudStackTypedJArray(ansContent, CloudStackTypes.DetachAnswer);
}
}

Expand Down Expand Up @@ -1823,7 +1823,7 @@ private static bool VerifyChecksum(string destFile, string checksum)
}

/// <summary>
/// Match implmentation of DownloadManagerImpl.computeCheckSum
/// Match implementation of DownloadManagerImpl.computeCheckSum
/// </summary>
/// <param name="destFile"></param>
/// <returns></returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static JObject CreateCloudStackObject(string objType, object objValue)
}

/// <summary>
/// serialize dictonary to map json type
/// serialize dictionary to map json type
/// </summary>
/// <param name="objValue">Object's data, can be an anonymous object, e.g. </param>
/// <returns></returns>
Expand Down
Loading