Skip to content

Commit 1ee7668

Browse files
author
Daniel Augusto Veronezi Salvador
committed
Merge branch 'BackPort-PR9394-to-4.20.0.1' into '4.20.0.0-scclouds'
Port 4.20 - Add access modifier to VolumeVO apache#9394 See merge request scclouds/scclouds!1057
2 parents 0874943 + e5da950 commit 1ee7668

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

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

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,31 @@ public class VolumeVO implements Volume {
4848
@TableGenerator(name = "volume_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "volume_seq", allocationSize = 1)
4949
@GeneratedValue(strategy = GenerationType.TABLE)
5050
@Column(name = "id")
51-
long id;
51+
private long id;
5252

5353
@Column(name = "name")
54-
String name;
54+
private String name;
5555

5656
@Column(name = "pool_id")
57-
Long poolId;
57+
private Long poolId;
5858

5959
@Column(name = "last_pool_id")
60-
Long lastPoolId;
60+
private Long lastPoolId;
6161

6262
@Column(name = "account_id")
63-
long accountId;
63+
private long accountId;
6464

6565
@Column(name = "domain_id")
66-
long domainId;
66+
private long domainId;
6767

6868
@Column(name = "instance_id")
69-
Long instanceId = null;
69+
private Long instanceId = null;
7070

7171
@Column(name = "device_id")
72-
Long deviceId = null;
72+
private Long deviceId = null;
7373

7474
@Column(name = "size")
75-
Long size;
75+
private Long size;
7676

7777
@Column(name = "min_iops")
7878
private Long minIops;
@@ -81,50 +81,50 @@ public class VolumeVO implements Volume {
8181
private Long maxIops;
8282

8383
@Column(name = "folder")
84-
String folder;
84+
private String folder;
8585

8686
@Column(name = "path")
87-
String path;
87+
private String path;
8888

8989
@Column(name = "pod_id")
90-
Long podId;
90+
private Long podId;
9191

9292
@Column(name = "created")
93-
Date created;
93+
private Date created;
9494

9595
@Column(name = "attached")
9696
@Temporal(value = TemporalType.TIMESTAMP)
97-
Date attached;
97+
private Date attached;
9898

9999
@Column(name = "data_center_id")
100-
long dataCenterId;
100+
private long dataCenterId;
101101

102102
@Column(name = "host_ip")
103-
String hostip;
103+
private String hostIp;
104104

105105
@Column(name = "disk_offering_id")
106-
long diskOfferingId;
106+
private long diskOfferingId;
107107

108108
@Column(name = "template_id")
109-
Long templateId;
109+
private Long templateId;
110110

111111
@Column(name = "first_snapshot_backup_uuid")
112-
String firstSnapshotBackupUuid;
112+
private String firstSnapshotBackupUuid;
113113

114114
@Column(name = "volume_type")
115115
@Enumerated(EnumType.STRING)
116-
Type volumeType = Volume.Type.UNKNOWN;
116+
private Type volumeType = Volume.Type.UNKNOWN;
117117

118118
@Column(name = "pool_type")
119119
@Convert(converter = StoragePoolTypeConverter.class)
120-
StoragePoolType poolType;
120+
private StoragePoolType poolType;
121121

122122
@Column(name = GenericDao.REMOVED_COLUMN)
123-
Date removed;
123+
private Date removed;
124124

125125
@Column(name = "updated")
126126
@Temporal(value = TemporalType.TIMESTAMP)
127-
Date updated;
127+
private Date updated;
128128

129129
@Column(name = "update_count", updatable = true, nullable = false)
130130
protected long updatedCount; // This field should be updated everytime the
@@ -133,17 +133,17 @@ public class VolumeVO implements Volume {
133133
// dao code.
134134

135135
@Column(name = "recreatable")
136-
boolean recreatable;
136+
private boolean recreatable;
137137

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

142142
@Column(name = "chain_info", length = 65535)
143-
String chainInfo;
143+
private String chainInfo;
144144

145145
@Column(name = "uuid")
146-
String uuid;
146+
private String uuid;
147147

148148
@Column(name = "format")
149149
private Storage.ImageFormat format;
@@ -168,7 +168,7 @@ public class VolumeVO implements Volume {
168168

169169
@Transient
170170
// @Column(name="reservation")
171-
String reservationId;
171+
private String reservationId;
172172

173173
@Column(name = "hv_ss_reserve")
174174
private Integer hypervisorSnapshotReserve;
@@ -428,11 +428,11 @@ public void setPath(String path) {
428428
}
429429

430430
public String getHostIp() {
431-
return hostip;
431+
return hostIp;
432432
}
433433

434434
public void setHostIp(String hostip) {
435-
this.hostip = hostip;
435+
this.hostIp = hostip;
436436
}
437437

438438
public void setPodId(Long podId) {

server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3336,7 +3336,7 @@ public Volume migrateVolume(MigrateVolumeCmd cmd) {
33363336
}
33373337
// In case of VMware, if ROOT volume is being cold-migrated, then ensure destination storage pool is in the same Datacenter as the VM.
33383338
if (vm != null && vm.getHypervisorType().equals(HypervisorType.VMware)) {
3339-
if (!liveMigrateVolume && vol.volumeType.equals(Volume.Type.ROOT)) {
3339+
if (!liveMigrateVolume && vol.getVolumeType().equals(Volume.Type.ROOT)) {
33403340
Long hostId = vm.getHostId() != null ? vm.getHostId() : vm.getLastHostId();
33413341
HostVO host = _hostDao.findById(hostId);
33423342
if (host != null) {

0 commit comments

Comments
 (0)