Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ repos:
- id: identity
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
#- id: check-added-large-files
#- id: check-case-conflict
- id: check-case-conflict
#- id: check-executables-have-shebangs
#- id: check-merge-conflict
#- id: check-vcs-permalinks
- id: check-vcs-permalinks
#- id: check-yaml
#- id: detect-private-key
#- id: end-of-file-fixer
- id: end-of-file-fixer
files: \.(java|md|py|txt|yaml|yml)$
#- id: fix-byte-order-marker
- id: mixed-line-ending
files: \.(java|py)$
files: \.(java|md|py|txt|yaml|yml)$
# - id: trailing-whitespace
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/agent/api/Answer.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ public int hashCode() {
result1 = 31 * result1 + (details != null ? details.hashCode() : 0);
return result1;
}
}
}
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/agent/api/to/DatadiskTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ public int getDiskNumber() {
public String getConfiguration() {
return configuration;
}
}
}
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/agent/api/to/DpdkTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public String getPort() {
public String getMode() {
return mode;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public List<OVFVirtualHardwareItemTO> getHardwareItems() {
public int getIndex() {
return index;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@ public String getNetworkDescription() {
public void setNetworkDescription(String networkDescription) {
this.networkDescription = networkDescription;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -368,4 +368,4 @@ public int getWeight() {
public void setWeight(int weight) {
this.weight = weight;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ public List<OVFVirtualHardwareItemTO> getCommonHardwareItems() {
public String getMinimiumHardwareVersion() {
return minimiumHardwareVersion;
}
}
}
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/deploy/HAPlanner.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@


public interface HAPlanner extends DeploymentPlanner {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
public interface NetworkRuleApplier {
public boolean applyRules(Network network, FirewallRule.Purpose purpose, List<? extends FirewallRule> rules) throws ResourceUnavailableException;

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
public interface StaticNatRule extends FirewallRule {

String getDestIpAddress();
}
}
2 changes: 1 addition & 1 deletion api/src/main/java/com/cloud/offering/DiskOfferingInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ public void setMaxIops(Long maxIops) {
public Long getMaxIops() {
return _maxIops;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ enum ResourceType {
*/
Ternary<Boolean, String, Pair<List<HostUpdated>, List<HostSkipped>>> startRollingMaintenance(StartRollingMaintenanceCmd cmd);
Pair<ResourceType, List<Long>> getResourceTypeIdPair(StartRollingMaintenanceCmd cmd);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ public interface AffinityGroupProcessor extends Adapter {

void handleDeleteGroup(AffinityGroup group);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

public interface PluggableAPIAuthenticator extends Adapter {
public List<Class<?>> getAuthCommands();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ public long getEntityOwnerId() {
return CallContext.current().getCallingAccount().getAccountId();
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ public void execute() {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod ip ");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,3 @@ public long getEntityOwnerId() {
return CallContext.current().getCallingAccount().getId();
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@
@APICommand(name = "copyTemplate", description = "Copies a template from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Full,
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
public class CopyTemplateCmdByAdmin extends CopyTemplateCmd {}

Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ public interface IListFirewallRulesCmd extends IBaseListTaggedResourcesCmd {
Long getId();

Long getNetworkId();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ public long getEntityOwnerId() {
}
return accountId;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ public String getAclConsistencyHash() {
public ApiCommandResourceType getApiResourceType() {
return ApiCommandResourceType.NetworkAclItem;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ public void setId(long id) {
this.id = id;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ public String getName() {
public void setName(String name) {
this.name = name;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ public void setDiskSizeTotal(Long diskSizeTotal) {
public void setDiskSizeUsed(Long diskSizeUsed) {
this.diskSizeUsed = diskSizeUsed;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public String getRoleName() {
public void setRoleName(String roleName) {
this.roleName = roleName;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ public List<RollingMaintenanceHostSkippedResponse> getSkippedHosts() {
public void setSkippedHosts(List<RollingMaintenanceHostSkippedResponse> skippedHosts) {
this.skippedHosts = skippedHosts;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -231,4 +231,4 @@ public void setOsDisplayName(String osDisplayName) {
public void setVirtualSize(long virtualSize) {
this.virtualSize = virtualSize;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ protected void accumulateDiskIopsTotal(Long diskIo) {
this.diskIopsTotal += diskIo;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ public String getDetails() {
public void setDetails(String details) {
this.details = details;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,4 @@ public String toString() {
.append("]")
.toString();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public interface DiagnosticsService {
Map<String, String> runDiagnosticsCommand(RunDiagnosticsCmd cmd);

String getDiagnosticsDataCommand(GetDiagnosticsDataCmd getDiagnosticsDataCmd);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public static DiagnosticsType getCommand(String cmd) {
}
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public interface DirectDownloadCertificate extends InternalIdentity, Identity {
Hypervisor.HypervisorType getHypervisorType();
Long getZoneId();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public interface ManagementServerHostPeer extends InternalIdentity {
long getPeerRunid();
ManagementServerHost.State getPeerState();
Date getLastUpdateTime();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ public interface CertService {
public List<SslCertResponse> listSslCerts(ListSslCertsCmd listSslCertCmd);

public Certificate parseCertificate(final String cert);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public interface UnmanageVMService {
* @return true if the VM is successfully unmanaged, false if not.
*/
boolean unmanageVMInstance(long vmId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public interface UnmanagedVMsManager extends VmImportService, UnmanageVMService,
ConfigKey<Boolean> UnmanageVMPreserveNic = new ConfigKey<>("Advanced", Boolean.class, "unmanage.vm.preserve.nics", "false",
"If set to true, do not remove VM nics (and its MAC addresses) when unmanaging a VM, leaving them allocated but not reserved. " +
"If set to false, nics are removed and MAC addresses can be reassigned", true, ConfigKey.Scope.Zone);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ public void testAutoScaleVmGroupTO() {
List<LoadBalancerTO.AutoScalePolicyTO> policies = vmGroup.getPolicies();
Assert.assertEquals(2, policies.size());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ public void testBlankAction() {
public void testInvalidAction() {
AutoScalePolicy.Action action = AutoScalePolicy.Action.fromValue("invalid");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ public void testBlankStates() {
public void testInvalidState() {
testAutoScaleVmGroupState("invalid");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ public void testGetAccountTypeByRole() {
Mockito.when(role.getId()).thenReturn(100L);
Assert.assertEquals(RoleType.getAccountTypeByRole(role, null), RoleType.Admin.getAccountType());
}
}
}
2 changes: 1 addition & 1 deletion api/src/test/java/org/apache/cloudstack/acl/RuleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ public void testValidateRuleWithInvalidData() throws Exception {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ public void sortPoolsBySuitability() {

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ public void testUpdateFailure() throws ResourceAllocationException, ResourceUnav
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ public void isEdge() {
ReflectionTestUtils.setField(createZoneCmd, "isEdge", true);
Assert.assertTrue("true value for isedge param value for API should return true", createZoneCmd.isEdge());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,4 @@ public void testExecute() throws InsufficientCapacityException, ResourceAllocati
Assert.fail("Should successfully create the network");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@ public void testExecute() throws InsufficientCapacityException {

Assert.assertEquals(response, actualResponse);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ public void testParsingTags() {
ReflectionTestUtils.setField(createSnapshotPolicyCmd, "tags", tagsParams);
Assert.assertEquals(createSnapshotPolicyCmd.getTags(), expectedTags);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@ public void testDestZoneidAndDestZoneIdListBothPresent() throws ResourceAllocati


}

Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,3 @@ public void testDestZoneidAndDestZoneIdListBothPresent() throws ResourceAllocati


}

Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ public void testExecute() throws ResourceUnavailableException, InsufficientCapac
cmd.execute();
Mockito.verify(_vpcService, Mockito.times(1)).startVpc(Mockito.anyLong(), Mockito.anyBoolean());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ public void testExecute() {
Mockito.anyString(), Mockito.anyBoolean(), Mockito.anyInt());

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ public void setNetworkKbsWriteTestWithInputNotNull() {
Assert.assertEquals(expectedNetworkKbsWrite, statsResponseMock.networkKbsWrite);
Assert.assertEquals(expectedNetworkWrite, statsResponseMock.networkWrite);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ public void testGetContextParameter() {
Assert.assertEquals("current context map should have exactly three entries", 3, currentContext.getContextParameters().size());
}

}
}
Loading