Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b28eccb
Fix grammar, spelling, word casing, whitespace
jbampton May 28, 2024
3574cdc
Update api/src/main/java/org/apache/cloudstack/api/command/user/vm/De…
jbampton Jul 10, 2024
fba6bf5
Update api/src/main/java/org/apache/cloudstack/api/command/user/vm/De…
jbampton Jul 10, 2024
287b40f
Update server/src/main/java/com/cloud/network/NetworkServiceImpl.java
jbampton Jul 10, 2024
79a8b92
Update server/src/test/java/com/cloud/vm/UserVmManagerTest.java
jbampton Jul 10, 2024
8ac51b7
Update plugins/network-elements/juniper-contrail/src/main/java/org/ap…
jbampton Jul 10, 2024
0c81a31
Update plugins/network-elements/netscaler/src/main/java/com/cloud/api…
jbampton Jul 10, 2024
177d355
Update server/src/test/java/com/cloud/vm/UserVmManagerTest.java
jbampton Jul 10, 2024
f104bd5
Merge branch 'main' into fix-spelling-grammar-case-whitespace
jbampton Oct 14, 2024
403b87d
Merge branch 'main' into fix-spelling-grammar-case-whitespace
DaanHoogland Dec 20, 2024
e9b5c9d
Update tools/git/git-pr
jbampton Dec 20, 2024
02d59c0
Merge branch 'main' into fix-spelling-grammar-case-whitespace
jbampton Dec 20, 2024
1dba0f8
Merge branch 'main' into fix-spelling-grammar-case-whitespace
jbampton Jun 5, 2025
6d95003
Fix up test failure
jbampton Jun 5, 2025
cfcc791
Fix up test
jbampton Jun 5, 2025
c7fb37f
Merge branch 'main' into fix-spelling-grammar-case-whitespace
jbampton Jun 20, 2025
eea90fc
Update api/src/main/java/org/apache/cloudstack/api/command/admin/inte…
jbampton Jun 20, 2025
a4368eb
Fix up conflicts
jbampton Sep 17, 2025
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 @@ -103,7 +103,7 @@ public Long getApiResourceId() {

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
CallContext.current().setEventDetails("Internal Lb Vm Id: " + getId());
CallContext.current().setEventDetails("Internal Lb VM ID: " + getId());
VirtualRouter result = null;
VirtualRouter router = _routerService.findRouter(getId());
if (router == null || router.getRole() != Role.INTERNAL_LB_VM) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public boolean isForced() {

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
CallContext.current().setEventDetails("Internal lb vm Id: " + getId());
CallContext.current().setEventDetails("Internal lb VM Id: " + getId());
VirtualRouter result = null;
VirtualRouter vm = _routerService.findRouter(getId());
if (vm == null || vm.getRole() != Role.INTERNAL_LB_VM) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public Long getApiResourceId() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
VirtualMachine instance = _mgr.destroySystemVM(this);
if (instance != null) {
SystemVmResponse response = _responseGenerator.createSystemVmResponse(instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public boolean isForced() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
VirtualMachine result = _mgr.rebootSystemVM(this);
if (result != null) {
SystemVmResponse response = _responseGenerator.createSystemVmResponse(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public long getEntityOwnerId() {

@Override
public void execute() {
CallContext.current().setEventDetails("SystemVm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("SystemVM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

ServiceOffering serviceOffering = _entityMgr.findById(ServiceOffering.class, serviceOfferingId);
if (serviceOffering == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public Long getApiResourceId() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
VirtualMachine instance = _mgr.startSystemVM(getId());
if (instance != null) {
SystemVmResponse response = _responseGenerator.createSystemVmResponse(instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public boolean isForced() {

@Override
public void execute() throws ResourceUnavailableException, ConcurrentOperationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
VirtualMachine result = _mgr.stopSystemVM(this);
if (result != null) {
SystemVmResponse response = _responseGenerator.createSystemVmResponse(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public long getEntityOwnerId() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

ServiceOffering serviceOffering = _entityMgr.findById(ServiceOffering.class, serviceOfferingId);
if (serviceOffering == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public Long getApiResourceId() {

@Override
public void execute() throws ResourceUnavailableException, ConcurrentOperationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
try {
UserVm result = _userVmService.expungeVm(this.getId());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public ApiCommandResourceType getApiResourceType() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + getVirtualMachineId() + " ISO ID: " + getId());
CallContext.current().setEventDetails("VM Id: " + getVirtualMachineId() + " ISO ID: " + getId());
boolean result = _templateService.attachIso(id, virtualMachineId, isForced());
if (result) {
UserVm userVm = _responseGenerator.findUserVmById(virtualMachineId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public ApiCommandResourceType getApiResourceType() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Network Id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Network Id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()));
UserVm result = _userVmService.addNicToVirtualMachine(this);
ArrayList<VMDetails> dc = new ArrayList<VMDetails>();
dc.add(VMDetails.valueOf("nics"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public boolean isVolumeOrSnapshotProvided() {
public void execute() {
UserVm result;

CallContext.current().setEventDetails("Vm Id: " + getEntityUuid());
CallContext.current().setEventDetails("VM Id: " + getEntityUuid());
if (getStartVm()) {
try {
result = _userVmService.startVirtualMachine(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public Long getApiResourceId() {

@Override
public void execute() throws ResourceUnavailableException, ConcurrentOperationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
UserVm result = _userVmService.destroyVm(this);

UserVmResponse response = new UserVmResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public Long getApiResourceId() {

@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ResourceAllocationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
UserVm result;
result = _userVmService.rebootVirtualMachine(this);
if (result !=null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public long getEntityOwnerId() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Nic Id: " + this._uuidMgr.getUuid(Nic.class, getNicId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Nic Id: " + this._uuidMgr.getUuid(Nic.class, getNicId()));
UserVm result = _userVmService.removeNicFromVirtualMachine(this);
ArrayList<VMDetails> dc = new ArrayList<VMDetails>();
dc.add(VMDetails.valueOf("nics"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE
} else {
logger.debug(String.format("Resetting VM [%s] password to password defined by user.", vm.getUuid()));
}
CallContext.current().setEventDetails("Vm Id: " + getId());
CallContext.current().setEventDetails("VM Id: " + getId());
UserVm result = _userVmService.resetVMPassword(this, password);
if (result != null){
UserVmResponse response = _responseGenerator.createUserVmResponse(getResponseView(), "virtualmachine", result).get(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public Long getApiResourceId() {
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException {

CallContext.current().setEventDetails("Vm Id: " + getId());
CallContext.current().setEventDetails("VM Id: " + getId());
UserVm result = _userVmService.resetVMSSHKey(this);

if (result != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public Long getApiResourceId() {
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException {

CallContext.current().setEventDetails("Vm Id: " + getId());
CallContext.current().setEventDetails("VM Id: " + getId());
UserVm result = _userVmService.resetVMUserData(this);

if (result != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public String getEventDescription() {
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
ResourceAllocationException {
UserVm result;
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()));
result = _userVmService.restoreVM(this);
if (result != null) {
UserVmResponse response = _responseGenerator.createUserVmResponse(getResponseView(), "virtualmachine", result).get(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public Long getApiResourceId() {
@Override
public void execute() {
try {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

UserVm result;
result = _userVmService.startVirtualMachine(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public boolean isForced() {

@Override
public void execute() throws ServerApiException, ConcurrentOperationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
UserVm result;

result = _userVmService.stopVirtualMachine(getId(), isForced());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public long getEntityOwnerId() {

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Nic Id: " + this._uuidMgr.getUuid(Nic.class, getNicId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()) + " Nic Id: " + this._uuidMgr.getUuid(Nic.class, getNicId()));
UserVm result = _userVmService.updateDefaultNicForVirtualMachine(this);
ArrayList<VMDetails> dc = new ArrayList<VMDetails>();
dc.add(VMDetails.valueOf("nics"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public long getEntityOwnerId() {

@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
UserVm result = null;
try {
result = _userVmService.updateVirtualMachine(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public long getEntityOwnerId() {

@Override
public void execute() throws ResourceAllocationException {
CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));
CallContext.current().setEventDetails("VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()));

ServiceOffering serviceOffering = _entityMgr.findById(ServiceOffering.class, serviceOfferingId);
if (serviceOffering == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ private void updateRootDiskVolumeEventDetails(Type type, VirtualMachine vm, List
callContext.setEventResourceId(volumeIds.get(0));
}
String volumeUuids = volumeIds.stream().map(volumeId -> this._uuidMgr.getUuid(Volume.class, volumeId)).collect(Collectors.joining(", "));
callContext.setEventDetails("Volume Type: " + type + "Volume Id: " + volumeUuids + " Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, vm.getId()));
callContext.setEventDetails("Volume Type: " + type + "Volume Id: " + volumeUuids + " VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, vm.getId()));
}
}

Expand Down Expand Up @@ -1366,7 +1366,7 @@ private void destroyVolumeInContext(Volume volume) {
// Create new context and inject correct event resource type, id and details,
// otherwise VOLUME.DESTROY event will be associated with VirtualMachine and contain VM id and other information.
CallContext volumeContext = CallContext.register(CallContext.current(), ApiCommandResourceType.Volume);
volumeContext.setEventDetails("Volume Type: " + volume.getVolumeType() + " Volume Id: " + volume.getUuid() + " Vm Id: " + _uuidMgr.getUuid(VirtualMachine.class, volume.getInstanceId()));
volumeContext.setEventDetails("Volume Type: " + volume.getVolumeType() + " Volume Id: " + volume.getUuid() + " VM Id: " + _uuidMgr.getUuid(VirtualMachine.class, volume.getInstanceId()));
volumeContext.setEventResourceType(ApiCommandResourceType.Volume);
volumeContext.setEventResourceId(volume.getId());
try {
Expand Down
2 changes: 1 addition & 1 deletion framework/db/src/main/java/com/cloud/utils/db/EcInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public EcInfo(Attribute attr, Attribute idAttr) {
}

CollectionTable ct = attr.field.getAnnotation(CollectionTable.class);
assert (ct.name().length() > 0) : "Please sepcify the table for " + attr.field.getName();
assert (ct.name().length() > 0) : "Please specify the table for " + attr.field.getName();
StringBuilder selectBuf = new StringBuilder("SELECT ");
StringBuilder insertBuf = new StringBuilder("INSERT INTO ");
StringBuilder clearBuf = new StringBuilder("DELETE FROM ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private ServiceVirtualMachine createServiceVM(DataCenter zone, Account owner, Vi
} catch (InsufficientCapacityException ex) {
throw new CloudRuntimeException("Insufficient capacity", ex);
}
CallContext.current().setEventDetails("Vm Id: " + svm.getId());
CallContext.current().setEventDetails("VM ID: " + svm.getId());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CallContext.current().setEventDetails("VM ID: " + svm.getId());
CallContext.current().setEventDetails("VM Id: " + svm.getId());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FelipeM525 , 'ID' is an acronym for 'identification' according to english rules it should be capatalised. Am I correct @jbampton ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland

I agree with capitalizing both letters, but, regardless of what convention we use (both capitalized or not), there should be a convention. Currently, this PR, that has a focus on fixing word casing inconsistencies, is doing the opposite, by changing some instances of Id to ID and leaving others as they are. Either all instances of the word in this PR should be ID or all should be Id.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, agree to disagree. I am happy to conform to conventions, but these are completely unnecessary and gratuit. I am leaving this with the embedded English speaker(s) ;)

return svm;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public boolean isForced() {

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
CallContext.current().setEventDetails("NetScaler vm Id: " + getId());
CallContext.current().setEventDetails("NetScaler VM ID: " + getId());
VirtualRouter result = null;
VirtualRouter vm = _routerService.findRouter(getId());
if (vm == null || vm.getRole() != Role.NETSCALER_VM) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void fullyConfigured() {

when(_element._physicalNetworkServiceProviderDao.findByServiceProvider(physicalNetworkId, "StratosphereSsp")).thenReturn(nspvo);

// and zone api server, credentail is configured
// and zone API server, credential is configured
when(credential.getUsername()).thenReturn("foo");
when(credential.getPassword()).thenReturn("bar");

Expand Down Expand Up @@ -120,7 +120,7 @@ public void isReadyTest() {
// ssp is ready
assertTrue(_element.isReady(nspvo));

// If you don't call addstratospheressp api, ssp won't be ready
// If you don't call addstratospheressp API, ssp won't be ready
when(_element._sspCredentialDao.findByZone(dataCenterId.longValue())).thenReturn(null);
when(_element._resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, dataCenterId)).thenReturn(Arrays.<HostVO> asList());
assertFalse(_element.isReady(nspvo));
Expand All @@ -133,7 +133,7 @@ public void canHandleTest() {
// ssp is active
assertTrue(_element.canHandle(psvo));

// You can disable ssp temporary by truning the state disabled
// You can disable ssp temporary by turning the state disabled
when(nspvo.getState()).thenReturn(PhysicalNetworkServiceProvider.State.Disabled);
assertFalse(_element.canHandle(psvo));

Expand All @@ -146,7 +146,7 @@ public void canHandleTest() {
when(nspvo.getState()).thenReturn(PhysicalNetworkServiceProvider.State.Enabled);
when(_element._physicalNetworkServiceProviderDao.findByServiceProvider(physicalNetworkId, "StratosphereSsp")).thenReturn(nspvo);

// If you don't call addstratospheressp api, ssp won't be active
// If you don't call addstratospheressp API, ssp won't be active
when(_element._sspCredentialDao.findByZone(dataCenterId.longValue())).thenReturn(null);
when(_element._resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, dataCenterId)).thenReturn(Arrays.<HostVO> asList());
assertFalse(_element.canHandle(psvo));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3534,7 +3534,7 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
long vmId = nic.getInstanceId();
VMInstanceVO vm = _vmDao.findById(vmId);
if (vm == null) {
logger.error("Vm for nic {} not found with Vm Id: {}", nic, vmId);
logger.error("VM for NIC {} not found with VM ID: {}", nic, vmId);
continue;
}
long isDefault = (nic.isDefaultNic()) ? 1 : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1981,7 +1981,7 @@ public void checkAutoScaleVmGroupName(String groupName) {

private UserVmVO startNewVM(long vmId) {
try {
CallContext.current().setEventDetails("Vm Id: " + vmId);
CallContext.current().setEventDetails("VM ID: " + vmId);
return userVmMgr.startVirtualMachine(vmId, null, new HashMap<>(), null).first();
} catch (final ResourceUnavailableException ex) {
logger.warn("Exception: ", ex);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ public boolean detachIso(long vmId, Long isoParamId, Boolean... extraParams) {
if (isoId == null) {
throw new InvalidParameterValueException("The specified VM has no ISO attached to it.");
}
CallContext.current().setEventDetails("Vm Id: " + virtualMachine.getUuid() + " ISO Id: " + isoId);
CallContext.current().setEventDetails("VM ID: " + virtualMachine.getUuid() + " ISO ID: " + isoId);

State vmState = virtualMachine.getState();
if (vmState != State.Running && vmState != State.Stopped) {
Expand Down
Loading
Loading