Skip to content

Commit b2d5535

Browse files
committed
Remove State from image_store db table, and removed enableImageStore
api.
1 parent 2a177de commit b2d5535

18 files changed

Lines changed: 3 additions & 250 deletions

File tree

‎api/src/com/cloud/storage/ImageStore.java‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121

2222
public interface ImageStore extends Identity, InternalIdentity {
2323

24-
public enum State {
25-
Disabled, Enabled, Deactivated;
26-
}
27-
2824

2925
/**
3026
* @return name of the object store.
@@ -36,10 +32,6 @@ public enum State {
3632
*/
3733
Long getDataCenterId();
3834

39-
/**
40-
* @return image store state.
41-
*/
42-
State getState();
4335

4436
/**
4537
* @return object store provider name

‎api/src/com/cloud/storage/StorageService.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
2424
import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd;
2525
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
26-
import org.apache.cloudstack.api.command.admin.storage.EnableImageStoreCmd;
2726
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
2827

2928
import com.cloud.exception.DiscoveryException;
@@ -92,5 +91,4 @@ public StoragePool cancelPrimaryStorageForMaintenance(CancelPrimaryStorageMainte
9291

9392
ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException;
9493

95-
ImageStore enableImageStore(EnableImageStoreCmd cmd);
9694
}

‎api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java‎

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,6 @@ public class AddSecondaryStorageCmd extends BaseCmd {
5050
description="the Zone ID for the secondary storage")
5151
private Long zoneId;
5252

53-
@Parameter(name=ApiConstants.REGION_ID, type=CommandType.UUID, entityType=RegionResponse.class,
54-
description="the Region ID for the secondary storage")
55-
private Long regionId;
56-
57-
@Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the secondary storage data store")
58-
private Map details;
59-
60-
@Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING,
61-
required=false, description="the scope of the secondary storage data store: zone or region or global")
62-
private String scope;
63-
64-
@Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING,
65-
required=false, description="the secondary storage store provider name")
66-
private String imageProviderName;
6753

6854
/////////////////////////////////////////////////////
6955
/////////////////// Accessors ///////////////////////
@@ -77,22 +63,6 @@ public Long getZoneId() {
7763
return zoneId;
7864
}
7965

80-
public Long getRegionId() {
81-
return regionId;
82-
}
83-
84-
public Map getDetails() {
85-
return details;
86-
}
87-
88-
public String getScope() {
89-
return this.scope;
90-
}
91-
92-
public String getImageProviderName() {
93-
return this.imageProviderName;
94-
}
95-
9666

9767
/////////////////////////////////////////////////////
9868
/////////////// API Implementation///////////////////

‎api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import com.cloud.storage.ImageStore;
3333
import com.cloud.user.Account;
3434

35-
@APICommand(name = "addImageStore", description="Adds backup image store.", responseObject=ImageStoreResponse.class)
35+
@APICommand(name = "addImageStore", description="Adds backup image store.", responseObject=ImageStoreResponse.class, since = "4.2.0")
3636
public class AddImageStoreCmd extends BaseCmd {
3737
public static final Logger s_logger = Logger.getLogger(AddImageStoreCmd.class.getName());
3838
private static final String s_name = "addimagestoreresponse";

‎api/src/org/apache/cloudstack/api/command/admin/storage/DeleteImageStoreCmd.java‎

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

3030
import com.cloud.user.Account;
3131

32-
@APICommand(name = "deleteImageStore", description = "Deletes an image store .", responseObject = SuccessResponse.class)
32+
@APICommand(name = "deleteImageStore", description = "Deletes an image store .", responseObject = SuccessResponse.class, since = "4.2.0")
3333
public class DeleteImageStoreCmd extends BaseCmd {
3434
public static final Logger s_logger = Logger.getLogger(DeleteImageStoreCmd.class.getName());
3535

‎api/src/org/apache/cloudstack/api/command/admin/storage/EnableImageStoreCmd.java‎

Lines changed: 0 additions & 89 deletions
This file was deleted.

‎api/src/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import com.cloud.async.AsyncJob;
3232

33-
@APICommand(name = "listImageStores", description="Lists image stores.", responseObject=ImageStoreResponse.class)
33+
@APICommand(name = "listImageStores", description="Lists image stores.", responseObject=ImageStoreResponse.class, since = "4.2.0")
3434
public class ListImageStoresCmd extends BaseListCmd {
3535
public static final Logger s_logger = Logger.getLogger(ListImageStoresCmd.class.getName());
3636

@@ -43,9 +43,6 @@ public class ListImageStoresCmd extends BaseListCmd {
4343
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the image store")
4444
private String storeName;
4545

46-
@Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="the image store state")
47-
private String state;
48-
4946
@Parameter(name=ApiConstants.PROTOCOL, type=CommandType.STRING, description="the image store protocol")
5047
private String protocol;
5148

@@ -74,10 +71,6 @@ public String getStoreName() {
7471
return storeName;
7572
}
7673

77-
public String getState() {
78-
return state;
79-
}
80-
8174
public String getProtocol() {
8275
return protocol;
8376
}

‎api/src/org/apache/cloudstack/api/response/ImageStoreResponse.java‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ public class ImageStoreResponse extends BaseResponse {
3939
@SerializedName(ApiConstants.ZONE_NAME) @Param(description="the Zone name of the image store")
4040
private String zoneName;
4141

42-
@SerializedName("state") @Param(description="the state of the image store")
43-
private ImageStore.State state;
44-
45-
4642
@SerializedName("name") @Param(description="the name of the image store")
4743
private String name;
4844

@@ -95,15 +91,6 @@ public void setZoneName(String zoneName) {
9591
this.zoneName = zoneName;
9692
}
9793

98-
99-
public ImageStore.State getState() {
100-
return state;
101-
}
102-
103-
public void setState(ImageStore.State state) {
104-
this.state = state;
105-
}
106-
10794
public String getName() {
10895
return name;
10996
}

‎engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreDao.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
public interface ImageStoreDao extends GenericDao<ImageStoreVO, Long> {
2424
public ImageStoreVO findByName(String name);
2525

26-
public ImageStoreVO findEnabledStore();
2726
}

‎engine/api/src/org/apache/cloudstack/storage/datastore/db/ImageStoreVO.java‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ public class ImageStoreVO implements ImageStore {
6060
@Column(name = "data_center_id")
6161
private long dcId;
6262

63-
@Column(name = "state")
64-
@Enumerated(value = EnumType.STRING)
65-
private State state;
66-
6763
@Column(name = "scope")
6864
@Enumerated(value = EnumType.STRING)
6965
private ScopeType scope;
@@ -150,14 +146,6 @@ public void setRemoved(Date removed) {
150146
this.removed = removed;
151147
}
152148

153-
public State getState() {
154-
return state;
155-
}
156-
157-
public void setState(State state) {
158-
this.state = state;
159-
}
160-
161149

162150

163151
}

0 commit comments

Comments
 (0)