Skip to content

Fix grammar, spelling, word casing, whitespace #9132

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 12 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 @@ -103,7 +103,7 @@

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
CallContext.current().setEventDetails("Internal Lb Vm Id: " + getId());
CallContext.current().setEventDetails("Internal Lb VM Id: " + getId());

Check warning on line 106 in api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java#L106

Added line #L106 was not covered by tests
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 @@

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
CallContext.current().setEventDetails("Internal lb vm Id: " + getId());
CallContext.current().setEventDetails("Internal lb VM Id: " + getId());

Check warning on line 108 in api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java#L108

Added line #L108 was not covered by tests
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 @@

@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()));

Check warning on line 94 in api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java#L94

Added line #L94 was not covered by tests
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 @@

@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()));

Check warning on line 108 in api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java#L108

Added line #L108 was not covered by tests
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 @@

@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()));

Check warning on line 101 in api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java#L101

Added line #L101 was not covered by tests

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 @@

@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()));

Check warning on line 105 in api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java#L105

Added line #L105 was not covered by tests
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 @@

@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()));

Check warning on line 111 in api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java#L111

Added line #L111 was not covered by tests
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 @@

@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()));

Check warning on line 90 in api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java#L90

Added line #L90 was not covered by tests

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 @@

@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()));

Check warning on line 99 in api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ExpungeVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ExpungeVMCmd.java#L99

Added line #L99 was not covered by tests
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 @@

@Override
public void execute() {
CallContext.current().setEventDetails("Vm Id: " + getVirtualMachineId() + " ISO ID: " + getId());
CallContext.current().setEventDetails("VM Id: " + getVirtualMachineId() + " ISO ID: " + getId());

Check warning on line 117 in api/src/main/java/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java#L117

Added line #L117 was not covered by tests
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 @@

@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()));

Check warning on line 170 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java#L170

Added line #L170 was not covered by tests
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 @@ -761,9 +761,9 @@
@Override
public String getEventDescription() {
if(getStartVm()) {
return "starting Vm. Vm Id: " + getEntityUuid();
return "starting VM. VM Id: " + getEntityUuid();

Check warning on line 764 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java#L764

Added line #L764 was not covered by tests
}
return "deploying Vm. Vm Id: " + getEntityUuid();
return "deploying VM. VM Id: " + getEntityUuid();

Check warning on line 766 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java#L766

Added line #L766 was not covered by tests
}

@Override
Expand All @@ -775,7 +775,7 @@
public void execute() {
UserVm result;

CallContext.current().setEventDetails("Vm Id: " + getEntityUuid());
CallContext.current().setEventDetails("VM Id: " + getEntityUuid());

Check warning on line 778 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java#L778

Added line #L778 was not covered by tests
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 @@

@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()));

Check warning on line 134 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java#L134

Added line #L134 was not covered by tests
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 @@

@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()));

Check warning on line 118 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java#L118

Added line #L118 was not covered by tests
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 @@

@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()));

Check warning on line 106 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java#L106

Added line #L106 was not covered by tests
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 @@
} 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());

Check warning on line 127 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java#L127

Added line #L127 was not covered by tests
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 @@
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException {

CallContext.current().setEventDetails("Vm Id: " + getId());
CallContext.current().setEventDetails("VM Id: " + getId());

Check warning on line 155 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java#L155

Added line #L155 was not covered by tests
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 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()));

Check warning on line 100 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java

View check run for this annotation

Codecov / codecov/patch

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

Added line #L100 was not covered by tests
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 @@
@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()));

Check warning on line 180 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java#L180

Added line #L180 was not covered by tests

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

@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()));

Check warning on line 118 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java#L118

Added line #L118 was not covered by tests
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 @@

@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()));

Check warning on line 107 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java#L107

Added line #L107 was not covered by tests
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 @@ -291,7 +291,7 @@

@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()));

Check warning on line 294 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java#L294

Added line #L294 was not covered by tests
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 @@

@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()));

Check warning on line 142 in api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java

View check run for this annotation

Codecov / codecov/patch

api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java#L142

Added line #L142 was not covered by tests

ServiceOffering serviceOffering = _entityMgr.findById(ServiceOffering.class, serviceOfferingId);
if (serviceOffering == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@
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()));

Check warning on line 1053 in engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

View check run for this annotation

Codecov / codecov/patch

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java#L1053

Added line #L1053 was not covered by tests
}
}

Expand Down Expand Up @@ -1290,7 +1290,7 @@
// 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()));

Check warning on line 1293 in engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

View check run for this annotation

Codecov / codecov/patch

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java#L1293

Added line #L1293 was not covered by tests
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 @@
} catch (InsufficientCapacityException ex) {
throw new CloudRuntimeException("Insufficient capacity", ex);
}
CallContext.current().setEventDetails("Vm Id: " + svm.getId());
CallContext.current().setEventDetails("VM ID: " + svm.getId());

Check warning on line 137 in plugins/network-elements/juniper-contrail/src/main/java/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java

View check run for this annotation

Codecov / codecov/patch

plugins/network-elements/juniper-contrail/src/main/java/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java#L137

Added line #L137 was not covered by tests
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 @@

@Override
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
CallContext.current().setEventDetails("NetScaler vm Id: " + getId());
CallContext.current().setEventDetails("NetScaler VM ID: " + getId());

Check warning on line 113 in plugins/network-elements/netscaler/src/main/java/com/cloud/api/commands/StopNetScalerVMCmd.java

View check run for this annotation

Codecov / codecov/patch

plugins/network-elements/netscaler/src/main/java/com/cloud/api/commands/StopNetScalerVMCmd.java#L113

Added line #L113 was not covered by tests
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 @@ -3506,7 +3506,7 @@
long vmId = nic.getInstanceId();
VMInstanceVO vm = _vmDao.findById(vmId);
if (vm == null) {
logger.error("Vm for nic " + nic.getId() + " not found with Vm Id:" + vmId);
logger.error("VM for nic " + nic.getId() + " not found with VM Id:" + vmId);

Check warning on line 3509 in server/src/main/java/com/cloud/network/NetworkServiceImpl.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/cloud/network/NetworkServiceImpl.java#L3509

Added line #L3509 was not covered by tests
continue;
}
long isDefault = (nic.isDefaultNic()) ? 1 : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ public void checkAutoScaleVmGroupName(String groupName) {

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

Check warning on line 1163 in server/src/main/java/com/cloud/template/TemplateManagerImpl.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/cloud/template/TemplateManagerImpl.java#L1163

Added line #L1163 was not covered by tests

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