Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f834504
Disk controller mappings
winterhazel Jan 29, 2025
5459efe
Merge branch 'main' into disk-controller-mappings
winterhazel Feb 24, 2025
ad7ca02
Fix merge errors
winterhazel Feb 24, 2025
de794a0
Merge branch 'main' into disk-controller-mappings
winterhazel Feb 26, 2025
7476f60
Merge branch 'main' into disk-controller-mappings
winterhazel Jun 4, 2025
f3f7aa3
Merge branch 'main' into disk-controller-mappings
winterhazel Jul 8, 2025
d13c92a
Update server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
winterhazel Jul 8, 2025
a0f9c55
Add log
winterhazel Jul 8, 2025
1913e53
Merge branch 'main' into disk-controller-mappings
winterhazel Jul 30, 2025
bb819b6
Add comment explaining a section
winterhazel Jul 30, 2025
cd77162
Merge branch 'main' into disk-controller-mappings
winterhazel Aug 7, 2025
991af0a
Merge branch 'main' into disk-controller-mappings
winterhazel Sep 2, 2025
d983a7d
Merge branch 'main' into disk-controller-mappings
winterhazel Sep 3, 2025
6424403
Merge branch 'main' into disk-controller-mappings
winterhazel Oct 8, 2025
7b8069b
Fix checkstyle
winterhazel Oct 9, 2025
188be60
add missing class
winterhazel Oct 9, 2025
8984f68
Merge branch 'main' into disk-controller-mappings (& move to 4.23)
winterhazel Dec 13, 2025
352bbca
Merge branch 'main' into disk-controller-mappings
winterhazel Dec 26, 2025
6edb407
Merge remote-tracking branch 'upstream/main' into disk-controller-map…
winterhazel Jan 29, 2026
f013bab
Merge remote-tracking branch 'upstream/main' into disk-controller-map…
winterhazel Mar 29, 2026
bb64294
Merge remote-tracking branch 'upstream/main' into disk-controller-map…
winterhazel Mar 31, 2026
adce7af
Address Copilot reviews
winterhazel Mar 31, 2026
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
@@ -0,0 +1,45 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.storage;

import com.cloud.hypervisor.Hypervisor.HypervisorType;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;

import java.util.Date;

public interface DiskControllerMapping extends InternalIdentity, Identity {
String getName();

String getControllerReference();

String getBusName();

HypervisorType getHypervisor();

Integer getMaxDeviceCount();

Integer getMaxControllerCount();

String getVmdkAdapterType();

String getMinHardwareVersion();

Date getRemoved();

Date getCreated();
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
package com.cloud.agent.api;

import com.cloud.agent.api.LogLevel.Log4jLevel;
import org.apache.cloudstack.storage.DiskControllerMappingVO;

import java.util.List;

public class SecStorageVMSetupCommand extends Command {
String[] allowedInternalSites = new String[0];
String copyUserName;
@LogLevel(Log4jLevel.Off)
String copyPassword;

private List<DiskControllerMappingVO> supportedDiskControllers;

public SecStorageVMSetupCommand() {
super();
}
Expand Down Expand Up @@ -60,4 +65,11 @@
this.copyPassword = copyPassword;
}

public List<DiskControllerMappingVO> getSupportedDiskControllers() {
return supportedDiskControllers;
}

Check warning on line 70 in core/src/main/java/com/cloud/agent/api/SecStorageVMSetupCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/SecStorageVMSetupCommand.java#L68-L70

Added lines #L68 - L70 were not covered by tests

public void setSupportedDiskControllers(List<DiskControllerMappingVO> supportedDiskControllers) {
this.supportedDiskControllers = supportedDiskControllers;
}

Check warning on line 74 in core/src/main/java/com/cloud/agent/api/SecStorageVMSetupCommand.java

View check run for this annotation

Codecov / codecov/patch

core/src/main/java/com/cloud/agent/api/SecStorageVMSetupCommand.java#L72-L74

Added lines #L72 - L74 were not covered by tests
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.storage;

import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.utils.db.GenericDao;
import org.apache.cloudstack.util.HypervisorTypeConverter;
import org.apache.cloudstack.utils.reflectiontostringbuilderutils.ReflectionToStringBuilderUtils;

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;
import java.util.UUID;

@Entity
@Table(name = "disk_controller_mapping")
public class DiskControllerMappingVO implements DiskControllerMapping {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Long id;

@Column(name = "uuid", nullable = false)
private String uuid = UUID.randomUUID().toString();

@Column(name = "name", nullable = false)
private String name;

@Column(name = "controller_reference", nullable = false)
private String controllerReference;

@Column(name = "bus_name", nullable = false)
private String busName;

@Column(name = "hypervisor", nullable = false)
@Convert(converter = HypervisorTypeConverter.class)
private HypervisorType hypervisor;

@Column(name = "max_device_count")
private Integer maxDeviceCount = null;

@Column(name = "max_controller_count")
private Integer maxControllerCount = null;

@Column(name = "vmdk_adapter_type")
private String vmdkAdapterType = null;

@Column(name = "min_hardware_version")
private String minHardwareVersion = null;

@Column(name = GenericDao.CREATED_COLUMN, nullable = false)
@Temporal(value = TemporalType.TIMESTAMP)
private Date created;

@Column(name = GenericDao.REMOVED_COLUMN)
@Temporal(value = TemporalType.TIMESTAMP)
private Date removed = null;

public DiskControllerMappingVO() {
}

@Override
public String getName() {

Check warning on line 84 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L84

Added line #L84 was not covered by tests
return name;
}

Check warning on line 86 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L86

Added line #L86 was not covered by tests

@Override
public String getControllerReference() {

Check warning on line 89 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L89

Added line #L89 was not covered by tests
return controllerReference;
}

Check warning on line 91 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L91

Added line #L91 was not covered by tests

@Override
public String getBusName() {

Check warning on line 94 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L94

Added line #L94 was not covered by tests
return busName;
}

Check warning on line 96 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L96

Added line #L96 was not covered by tests

@Override
public HypervisorType getHypervisor() {
return hypervisor;
}

Check warning on line 101 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L99-L101

Added lines #L99 - L101 were not covered by tests

@Override
public Integer getMaxDeviceCount() {

Check warning on line 104 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L104

Added line #L104 was not covered by tests
return maxDeviceCount;
}

Check warning on line 106 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L106

Added line #L106 was not covered by tests

@Override
public Integer getMaxControllerCount() {

Check warning on line 109 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L109

Added line #L109 was not covered by tests
return maxControllerCount;
}

Check warning on line 111 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L111

Added line #L111 was not covered by tests

@Override
public String getVmdkAdapterType() {
return vmdkAdapterType;
}

Check warning on line 116 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L114-L116

Added lines #L114 - L116 were not covered by tests

@Override
public String getMinHardwareVersion() {

Check warning on line 119 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L119

Added line #L119 was not covered by tests
return minHardwareVersion;
}

Check warning on line 121 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L121

Added line #L121 was not covered by tests

@Override
public Date getRemoved() {
return removed;
}

Check warning on line 126 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L124-L126

Added lines #L124 - L126 were not covered by tests

@Override
public Date getCreated() {
return created;
}

Check warning on line 131 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L129-L131

Added lines #L129 - L131 were not covered by tests

@Override
public String getUuid() {
return uuid;
}

Check warning on line 136 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L134-L136

Added lines #L134 - L136 were not covered by tests

@Override
public long getId() {
return id;
}

Check warning on line 141 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L139-L141

Added lines #L139 - L141 were not covered by tests

public void setId(Long id) {
this.id = id;
}

Check warning on line 145 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L143-L145

Added lines #L143 - L145 were not covered by tests

public void setUuid(String uuid) {
this.uuid = uuid;
}

Check warning on line 149 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L147-L149

Added lines #L147 - L149 were not covered by tests

public void setName(String name) {

Check warning on line 151 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L151

Added line #L151 was not covered by tests
this.name = name;
}

public void setControllerReference(String controllerReference) {

Check warning on line 155 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L155

Added line #L155 was not covered by tests
this.controllerReference = controllerReference;
}

public void setBusName(String busName) {

Check warning on line 159 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L159

Added line #L159 was not covered by tests
this.busName = busName;
}

public void setHypervisor(HypervisorType hypervisor) {
this.hypervisor = hypervisor;
}

Check warning on line 165 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L163-L165

Added lines #L163 - L165 were not covered by tests

public void setMaxDeviceCount(Integer maxDeviceCount) {

Check warning on line 167 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L167

Added line #L167 was not covered by tests
this.maxDeviceCount = maxDeviceCount;
}

public void setMaxControllerCount(Integer maxControllerCount) {

Check warning on line 171 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L171

Added line #L171 was not covered by tests
this.maxControllerCount = maxControllerCount;
}

public void setVmdkAdapterType(String vmdkAdapterType) {
this.vmdkAdapterType = vmdkAdapterType;
}

Check warning on line 177 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L175-L177

Added lines #L175 - L177 were not covered by tests

public void setMinHardwareVersion(String minHardwareVersion) {

Check warning on line 179 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L179

Added line #L179 was not covered by tests
this.minHardwareVersion = minHardwareVersion;
}

public void setCreated(Date created) {
this.created = created;
}

Check warning on line 185 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L183-L185

Added lines #L183 - L185 were not covered by tests

public void setRemoved(Date removed) {
this.removed = removed;
}

Check warning on line 189 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L187-L189

Added lines #L187 - L189 were not covered by tests

@Override
public boolean equals(Object obj) {

Check warning on line 192 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L192

Added line #L192 was not covered by tests
if (!(obj instanceof DiskControllerMappingVO)) {
return false;

Check warning on line 194 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L194

Added line #L194 was not covered by tests
}
DiskControllerMappingVO that = (DiskControllerMappingVO) obj;
return controllerReference.equals(that.getControllerReference());
}

Check warning on line 198 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L198

Added line #L198 was not covered by tests

@Override
Comment thread
winterhazel marked this conversation as resolved.
public String toString() {
return ReflectionToStringBuilderUtils.reflectOnlySelectedFields(this, "name", "controllerReference",

Check warning on line 202 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L201-L202

Added lines #L201 - L202 were not covered by tests
"busName", "hypervisor", "maxDeviceCount", "maxControllerCount", "vmdkAdapterType", "minHardwareVersion");
}

Check warning on line 204 in engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/DiskControllerMappingVO.java#L204

Added line #L204 was not covered by tests
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.storage.dao;

import com.cloud.hypervisor.Hypervisor.HypervisorType;
import org.apache.cloudstack.storage.DiskControllerMappingVO;
import com.cloud.utils.db.GenericDao;

import java.util.List;

public interface DiskControllerMappingDao extends GenericDao<DiskControllerMappingVO, Long> {
DiskControllerMappingVO findDiskControllerMapping(String name, String classReference, HypervisorType hypervisor);

List<DiskControllerMappingVO> listForHypervisor(HypervisorType hypervisor);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.storage.dao;

import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.utils.db.GenericDaoBase;
import com.cloud.utils.db.SearchBuilder;
import com.cloud.utils.db.SearchCriteria;
import org.apache.cloudstack.storage.DiskControllerMappingVO;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.List;

@Component
public class DiskControllerMappingDaoImpl extends GenericDaoBase<DiskControllerMappingVO, Long> implements DiskControllerMappingDao {
private SearchBuilder<DiskControllerMappingVO> diskControllerMappingSearch;

@PostConstruct
public void init() {
diskControllerMappingSearch = createSearchBuilder();
diskControllerMappingSearch.and("name", diskControllerMappingSearch.entity().getName(), SearchCriteria.Op.EQ);
diskControllerMappingSearch.and("controllerReference", diskControllerMappingSearch.entity().getControllerReference(), SearchCriteria.Op.EQ);
diskControllerMappingSearch.and("hypervisor", diskControllerMappingSearch.entity().getHypervisor(), SearchCriteria.Op.EQ);
diskControllerMappingSearch.done();
}

Check warning on line 40 in engine/schema/src/main/java/org/apache/cloudstack/storage/dao/DiskControllerMappingDaoImpl.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/dao/DiskControllerMappingDaoImpl.java#L34-L40

Added lines #L34 - L40 were not covered by tests

@Override
public DiskControllerMappingVO findDiskControllerMapping(String name, String controllerReference, HypervisorType hypervisor) {
SearchCriteria<DiskControllerMappingVO> sc = diskControllerMappingSearch.create();
sc.setParametersIfNotNull("name", name);
sc.setParametersIfNotNull("controllerReference", controllerReference);
sc.setParameters("hypervisor", hypervisor);
return findOneBy(sc);
}

Check warning on line 49 in engine/schema/src/main/java/org/apache/cloudstack/storage/dao/DiskControllerMappingDaoImpl.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/dao/DiskControllerMappingDaoImpl.java#L43-L49

Added lines #L43 - L49 were not covered by tests

@Override
public List<DiskControllerMappingVO> listForHypervisor(HypervisorType hypervisor) {
SearchCriteria<DiskControllerMappingVO> sc = diskControllerMappingSearch.create();
sc.setParameters("hypervisor", hypervisor);
return listBy(sc);
}

Check warning on line 56 in engine/schema/src/main/java/org/apache/cloudstack/storage/dao/DiskControllerMappingDaoImpl.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/org/apache/cloudstack/storage/dao/DiskControllerMappingDaoImpl.java#L52-L56

Added lines #L52 - L56 were not covered by tests
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
<bean id="domainVlanMapDaoImpl" class="com.cloud.dc.dao.DomainVlanMapDaoImpl" />
<bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
<bean id="diskControllerMappingDaoImpl" class="org.apache.cloudstack.storage.dao.DiskControllerMappingDaoImpl" />
<bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
<bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
<bean id="domainDetailsDaoImpl" class="com.cloud.domain.dao.DomainDetailsDaoImpl" />
Expand Down
Loading
Loading