Skip to content
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

Add access modifier to VolumeVO #9394

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
58 changes: 29 additions & 29 deletions engine/schema/src/main/java/com/cloud/storage/VolumeVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,31 @@
@TableGenerator(name = "volume_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "volume_seq", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.TABLE)
@Column(name = "id")
long id;
private long id;

@Column(name = "name")
String name;
private String name;

@Column(name = "pool_id")
Long poolId;
private Long poolId;

@Column(name = "last_pool_id")
Long lastPoolId;
private Long lastPoolId;

@Column(name = "account_id")
long accountId;
private long accountId;

@Column(name = "domain_id")
long domainId;
private long domainId;

@Column(name = "instance_id")
Long instanceId = null;
private Long instanceId = null;

@Column(name = "device_id")
Long deviceId = null;
private Long deviceId = null;

@Column(name = "size")
Long size;
private Long size;

@Column(name = "min_iops")
private Long minIops;
Expand All @@ -81,50 +81,50 @@
private Long maxIops;

@Column(name = "folder")
String folder;
private String folder;

@Column(name = "path")
String path;
private String path;

@Column(name = "pod_id")
Long podId;
private Long podId;

@Column(name = "created")
Date created;
private Date created;

@Column(name = "attached")
@Temporal(value = TemporalType.TIMESTAMP)
Date attached;
private Date attached;

@Column(name = "data_center_id")
long dataCenterId;
private long dataCenterId;

@Column(name = "host_ip")
String hostip;
private String hostIp;

@Column(name = "disk_offering_id")
long diskOfferingId;
private long diskOfferingId;

@Column(name = "template_id")
Long templateId;
private Long templateId;

@Column(name = "first_snapshot_backup_uuid")
String firstSnapshotBackupUuid;
private String firstSnapshotBackupUuid;

@Column(name = "volume_type")
@Enumerated(EnumType.STRING)
Type volumeType = Volume.Type.UNKNOWN;
private Type volumeType = Volume.Type.UNKNOWN;

@Column(name = "pool_type")
@Convert(converter = StoragePoolTypeConverter.class)
StoragePoolType poolType;
private StoragePoolType poolType;

@Column(name = GenericDao.REMOVED_COLUMN)
Date removed;
private Date removed;

@Column(name = "updated")
@Temporal(value = TemporalType.TIMESTAMP)
Date updated;
private Date updated;

@Column(name = "update_count", updatable = true, nullable = false)
protected long updatedCount; // This field should be updated everytime the
Expand All @@ -133,17 +133,17 @@
// dao code.

@Column(name = "recreatable")
boolean recreatable;
private boolean recreatable;

@Column(name = "state")
@Enumerated(value = EnumType.STRING)
private State state;

@Column(name = "chain_info", length = 65535)
String chainInfo;
private String chainInfo;

@Column(name = "uuid")
String uuid;
private String uuid;

@Column(name = "format")
private Storage.ImageFormat format;
Expand All @@ -168,7 +168,7 @@

@Transient
// @Column(name="reservation")
String reservationId;
private String reservationId;

@Column(name = "hv_ss_reserve")
private Integer hypervisorSnapshotReserve;
Expand Down Expand Up @@ -428,11 +428,11 @@
}

public String getHostIp() {
return hostip;
return hostIp;

Check warning on line 431 in engine/schema/src/main/java/com/cloud/storage/VolumeVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/com/cloud/storage/VolumeVO.java#L431

Added line #L431 was not covered by tests
}

public void setHostIp(String hostip) {
this.hostip = hostip;
this.hostIp = hostip;

Check warning on line 435 in engine/schema/src/main/java/com/cloud/storage/VolumeVO.java

View check run for this annotation

Codecov / codecov/patch

engine/schema/src/main/java/com/cloud/storage/VolumeVO.java#L435

Added line #L435 was not covered by tests
}

public void setPodId(Long podId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3336,7 +3336,7 @@ public Volume migrateVolume(MigrateVolumeCmd cmd) {
}
// In case of VMware, if ROOT volume is being cold-migrated, then ensure destination storage pool is in the same Datacenter as the VM.
if (vm != null && vm.getHypervisorType().equals(HypervisorType.VMware)) {
if (!liveMigrateVolume && vol.volumeType.equals(Volume.Type.ROOT)) {
if (!liveMigrateVolume && vol.getVolumeType().equals(Volume.Type.ROOT)) {
Long hostId = vm.getHostId() != null ? vm.getHostId() : vm.getLastHostId();
HostVO host = _hostDao.findById(hostId);
if (host != null) {
Expand Down
Loading