Skip to content

Commit bc7055d

Browse files
committed
rename draasenabled to crosszoneinstancecreation
1 parent 1aa08b0 commit bc7055d

File tree

20 files changed

+52
-52
lines changed

20 files changed

+52
-52
lines changed

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public class ApiConstants {
139139
public static final String CPU_SPEED = "cpuspeed";
140140
public static final String CPU_LOAD_AVERAGE = "cpuloadaverage";
141141
public static final String CREATED = "created";
142+
public static final String CROSS_ZONE_INSTANCE_CREATION = "crosszoneinstancecreation";
142143
public static final String CTX_ACCOUNT_ID = "ctxaccountid";
143144
public static final String CTX_DETAILS = "ctxDetails";
144145
public static final String CTX_USER_ID = "ctxuserid";
@@ -209,7 +210,6 @@ public class ApiConstants {
209210
public static final String DOMAIN_ID = "domainid";
210211
public static final String DOMAIN__ID = "domainId";
211212
public static final String DURATION = "duration";
212-
public static final String DRAAS_ENABLED = "draasenabled";
213213
public static final String ELIGIBLE = "eligible";
214214
public static final String EMAIL = "email";
215215
public static final String END_ASN = "endasn";

api/src/main/java/org/apache/cloudstack/api/command/user/backup/repository/AddBackupRepositoryCmd.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ public class AddBackupRepositoryCmd extends BaseCmd {
6363
type = CommandType.UUID,
6464
entityType = ZoneResponse.class,
6565
required = true,
66-
description = "ID of the zone where the backup repository is to be added")
66+
description = "ID of the zone where the backup repository is to be added for taking backups")
6767
private Long zoneId;
6868

6969
@Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, description = "capacity of this backup repository")
7070
private Long capacityBytes;
7171

72-
@Parameter(name = ApiConstants.DRAAS_ENABLED, type = CommandType.BOOLEAN, description = "the backup repository is configured to be used for disaster recovery on other Zones", since = "4.22.0")
73-
private Boolean draasEnabled;
72+
@Parameter(name = ApiConstants.CROSS_ZONE_INSTANCE_CREATION, type = CommandType.BOOLEAN, description = "backups on this repository can be used to create Instances on all Zones", since = "4.22.0")
73+
private Boolean crossZoneInstanceCreation;
7474

7575
/////////////////////////////////////////////////////
7676
/////////////////// Accessors ///////////////////////
@@ -111,8 +111,8 @@ public Long getCapacityBytes() {
111111
return capacityBytes;
112112
}
113113

114-
public Boolean isDraasEnabled() {
115-
return draasEnabled;
114+
public Boolean crossZoneInstanceCreationEnabled() {
115+
return crossZoneInstanceCreation;
116116
}
117117

118118
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/user/backup/repository/UpdateBackupRepositoryCmd.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ public class UpdateBackupRepositoryCmd extends BaseCmd {
5656
@Parameter(name = ApiConstants.MOUNT_OPTIONS, type = CommandType.STRING, description = "shared storage mount options")
5757
private String mountOptions;
5858

59-
@Parameter(name = ApiConstants.DRAAS_ENABLED, type = CommandType.BOOLEAN, description = "the backup repository is configured to be used for disaster recovery on other Zones")
60-
private Boolean draasEnabled;
59+
@Parameter(name = ApiConstants.CROSS_ZONE_INSTANCE_CREATION, type = CommandType.BOOLEAN, description = "backups in this repository can be used to create Instances on all Zones")
60+
private Boolean crossZoneInstanceCreation;
6161

6262
/////////////////////////////////////////////////////
6363
/////////////////// Accessors ///////////////////////
@@ -83,8 +83,8 @@ public String getMountOptions() {
8383
return mountOptions == null ? "" : mountOptions;
8484
}
8585

86-
public Boolean isDraasEnabled() {
87-
return draasEnabled;
86+
public Boolean crossZoneInstanceCreationEnabled() {
87+
return crossZoneInstanceCreation;
8888
}
8989

9090
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/response/BackupRepositoryResponse.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public class BackupRepositoryResponse extends BaseResponse {
6161
@Param(description = "capacity of the backup repository")
6262
private Long capacityBytes;
6363

64-
@SerializedName(ApiConstants.DRAAS_ENABLED)
65-
@Param(description = "is the backup repository configured to be used for disaster recovery on other Zones")
66-
private Boolean draasEnabled;
64+
@SerializedName(ApiConstants.CROSS_ZONE_INSTANCE_CREATION)
65+
@Param(description = "the backups in this repository can be used to create Instances on all Zones")
66+
private Boolean crossZoneInstanceCreation;
6767

6868
@SerializedName("created")
6969
@Param(description = "the date and time the backup repository was added")
@@ -136,12 +136,12 @@ public void setCapacityBytes(Long capacityBytes) {
136136
this.capacityBytes = capacityBytes;
137137
}
138138

139-
public Boolean getDraasEnabled() {
140-
return draasEnabled;
139+
public Boolean getCrossZoneInstanceCreation() {
140+
return crossZoneInstanceCreation;
141141
}
142142

143-
public void setDraasEnabled(Boolean draasEnabled) {
144-
this.draasEnabled = draasEnabled;
143+
public void setCrossZoneInstanceCreation(Boolean crossZoneInstanceCreation) {
144+
this.crossZoneInstanceCreation = crossZoneInstanceCreation;
145145
}
146146

147147
public Date getCreated() {

api/src/main/java/org/apache/cloudstack/backup/BackupProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
public interface BackupProvider {
2525

26-
Boolean isDraasEnabled(BackupOffering backupOffering);
26+
Boolean crossZoneInstanceCreationEnabled(BackupOffering backupOffering);
2727

2828
/**
2929
* Returns the unique name of the provider

api/src/main/java/org/apache/cloudstack/backup/BackupRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface BackupRepository extends InternalIdentity, Identity {
3333
Long getCapacityBytes();
3434
Long getUsedBytes();
3535
void setCapacityBytes(Long capacityBytes);
36-
Boolean isDraasEnabled();
37-
void setDraasEnabled(Boolean draasEnabled);
36+
Boolean crossZoneInstanceCreationEnabled();
37+
void setCrossZoneInstanceCreation(Boolean crossZoneInstanceCreation);
3838
Date getCreated();
3939
}

engine/schema/src/main/java/org/apache/cloudstack/backup/BackupRepositoryVO.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public class BackupRepositoryVO implements BackupRepository {
6767
@Column(name = "capacity_bytes", nullable = true)
6868
private Long capacityBytes;
6969

70-
@Column(name = "draas_enabled")
71-
private Boolean draasEnabled;
70+
@Column(name = "cross_zone_instance_creation")
71+
private Boolean crossZoneInstanceCreation;
7272

7373
@Column(name = "created")
7474
@Temporal(value = TemporalType.TIMESTAMP)
@@ -82,7 +82,7 @@ public BackupRepositoryVO() {
8282
this.uuid = UUID.randomUUID().toString();
8383
}
8484

85-
public BackupRepositoryVO(final long zoneId, final String provider, final String name, final String type, final String address, final String mountOptions, final Long capacityBytes, final Boolean draasEnabled) {
85+
public BackupRepositoryVO(final long zoneId, final String provider, final String name, final String type, final String address, final String mountOptions, final Long capacityBytes, final Boolean crossZoneInstanceCreation) {
8686
this();
8787
this.zoneId = zoneId;
8888
this.provider = provider;
@@ -91,7 +91,7 @@ public BackupRepositoryVO(final long zoneId, final String provider, final String
9191
this.address = address;
9292
this.mountOptions = mountOptions;
9393
this.capacityBytes = capacityBytes;
94-
this.draasEnabled = draasEnabled;
94+
this.crossZoneInstanceCreation = crossZoneInstanceCreation;
9595
this.created = new Date();
9696
}
9797

@@ -164,13 +164,13 @@ public Long getCapacityBytes() {
164164
}
165165

166166
@Override
167-
public Boolean isDraasEnabled() {
168-
return draasEnabled;
167+
public Boolean crossZoneInstanceCreationEnabled() {
168+
return crossZoneInstanceCreation;
169169
}
170170

171171
@Override
172-
public void setDraasEnabled(Boolean draasEnabled) {
173-
this.draasEnabled = draasEnabled;
172+
public void setCrossZoneInstanceCreation(Boolean crossZoneInstanceCreation) {
173+
this.crossZoneInstanceCreation = crossZoneInstanceCreation;
174174
}
175175

176176
@Override

engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
-- Increase length of scripts_version column to 128 due to md5sum to sha512sum change
2323
CALL `cloud`.`IDEMPOTENT_CHANGE_COLUMN`('cloud.domain_router', 'scripts_version', 'scripts_version', 'VARCHAR(128)');
2424

25-
-- Add the column draas_enabled to cloud.backup_repository. if enabled it means that new Instance can be created on another Zones from Backups on this Repository.
26-
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.backup_repository', 'draas_enabled', 'TINYINT(1) DEFAULT NULL COMMENT ''Backup Repository can be used for disaster recovery on another zone''');
25+
-- Add the column cross_zone_instance_creation to cloud.backup_repository. if enabled it means that new Instance can be created on all Zones from Backups on this Repository.
26+
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.backup_repository', 'cross_zone_instance_creation', 'TINYINT(1) DEFAULT NULL COMMENT ''Backup Repository can be used for disaster recovery on another zone''');

plugins/backup/dummy/src/main/java/org/apache/cloudstack/backup/DummyBackupProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class DummyBackupProvider extends AdapterBase implements BackupProvider {
5454
private DiskOfferingDao diskOfferingDao;
5555

5656
@Override
57-
public Boolean isDraasEnabled(BackupOffering backupOffering) {
57+
public Boolean crossZoneInstanceCreationEnabled(BackupOffering backupOffering) {
5858
return true;
5959
}
6060

plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,12 +539,12 @@ public boolean isValidProviderOffering(Long zoneId, String uuid) {
539539
}
540540

541541
@Override
542-
public Boolean isDraasEnabled(BackupOffering backupOffering) {
542+
public Boolean crossZoneInstanceCreationEnabled(BackupOffering backupOffering) {
543543
final BackupRepository backupRepository = backupRepositoryDao.findByBackupOfferingId(backupOffering.getId());
544544
if (backupRepository == null) {
545545
throw new CloudRuntimeException("Backup repository not found for the backup offering" + backupOffering.getName());
546546
}
547-
return Boolean.TRUE.equals(backupRepository.isDraasEnabled());
547+
return Boolean.TRUE.equals(backupRepository.crossZoneInstanceCreationEnabled());
548548
}
549549

550550
@Override

0 commit comments

Comments
 (0)