Skip to content

Commit 9be9902

Browse files
committed
Fix applicationContext.xml to properly load all new refactored image
store related classes, also add enableImageStore api.
1 parent 74880fa commit 9be9902

10 files changed

Lines changed: 215 additions & 17 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
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;
2627
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
2728

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

9293
ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException;
9394

95+
ImageStore enableImageStore(EnableImageStoreCmd cmd);
9496
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package org.apache.cloudstack.api.command.admin.storage;
18+
19+
import javax.inject.Inject;
20+
21+
import org.apache.cloudstack.api.APICommand;
22+
import org.apache.cloudstack.api.ApiConstants;
23+
import org.apache.cloudstack.api.ApiErrorCode;
24+
import org.apache.cloudstack.api.BaseCmd;
25+
import org.apache.cloudstack.api.Parameter;
26+
import org.apache.cloudstack.api.ServerApiException;
27+
import org.apache.cloudstack.api.response.AccountResponse;
28+
import org.apache.cloudstack.api.response.DomainResponse;
29+
import org.apache.cloudstack.api.response.ImageStoreResponse;
30+
import org.apache.cloudstack.region.RegionService;
31+
import org.apache.log4j.Logger;
32+
33+
import com.cloud.storage.ImageStore;
34+
import com.cloud.user.Account;
35+
36+
@APICommand(name = "enableImageStore", description="Enable an image store", responseObject=ImageStoreResponse.class)
37+
public class EnableImageStoreCmd extends BaseCmd {
38+
public static final Logger s_logger = Logger.getLogger(EnableImageStoreCmd.class.getName());
39+
private static final String s_name = "enableimagestoreresponse";
40+
41+
/////////////////////////////////////////////////////
42+
//////////////// API parameters /////////////////////
43+
/////////////////////////////////////////////////////
44+
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=ImageStoreResponse.class,
45+
description="Image Store id")
46+
private Long id;
47+
48+
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="Enables specified image store.")
49+
private String storeName;
50+
51+
52+
/////////////////////////////////////////////////////
53+
/////////////////// Accessors ///////////////////////
54+
/////////////////////////////////////////////////////
55+
56+
public Long getId() {
57+
return id;
58+
}
59+
60+
public String getStoreName() {
61+
return storeName;
62+
}
63+
64+
/////////////////////////////////////////////////////
65+
/////////////// API Implementation///////////////////
66+
/////////////////////////////////////////////////////
67+
68+
@Override
69+
public String getCommandName() {
70+
return s_name;
71+
}
72+
73+
@Override
74+
public long getEntityOwnerId() {
75+
return Account.ACCOUNT_ID_SYSTEM;
76+
}
77+
78+
@Override
79+
public void execute(){
80+
ImageStore result = _storageService.enableImageStore(this);
81+
if (result != null){
82+
ImageStoreResponse response = _responseGenerator.createImageStoreResponse(result);
83+
response.setResponseName(getCommandName());
84+
this.setResponseObject(response);
85+
} else {
86+
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable image store");
87+
}
88+
}
89+
}

‎client/pom.xml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,21 @@
224224
<artifactId>cloud-plugin-storage-volume-default</artifactId>
225225
<version>${project.version}</version>
226226
</dependency>
227+
<dependency>
228+
<groupId>org.apache.cloudstack</groupId>
229+
<artifactId>cloud-plugin-storage-image-default</artifactId>
230+
<version>${project.version}</version>
231+
</dependency>
232+
<dependency>
233+
<groupId>org.apache.cloudstack</groupId>
234+
<artifactId>cloud-plugin-storage-image-s3</artifactId>
235+
<version>${project.version}</version>
236+
</dependency>
237+
<dependency>
238+
<groupId>org.apache.cloudstack</groupId>
239+
<artifactId>cloud-plugin-storage-image-swift</artifactId>
240+
<version>${project.version}</version>
241+
</dependency>
227242
<dependency>
228243
<groupId>org.apache.cloudstack</groupId>
229244
<artifactId>cloud-plugin-syslog-alerts</artifactId>

‎client/tomcatconf/applicationContext.xml.in‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
<bean id="dataCenterJoinDaoImpl" class="com.cloud.api.query.dao.DataCenterJoinDaoImpl" />
191191
<bean id="dataCenterLinkLocalIpAddressDaoImpl" class="com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl" />
192192
<bean id="dataCenterVnetDaoImpl" class="com.cloud.dc.dao.DataCenterVnetDaoImpl" />
193-
<bean id="dataStoreProviderDaoImpl" class="org.apache.cloudstack.storage.datastore.db.DataStoreProviderDaoImpl" />
193+
<bean id="dataStoreProviderDaoImpl" class="org.apache.cloudstack.storage.db.DataStoreProviderDaoImpl" />
194194
<bean id="dcDetailsDaoImpl" class="com.cloud.dc.dao.DcDetailsDaoImpl" />
195195
<bean id="engineDcDetailsDaoImpl" class="org.apache.cloudstack.engine.datacenter.entity.api.db.dao.DcDetailsDaoImpl" />
196196
<bean id="diskOfferingJoinDaoImpl" class="com.cloud.api.query.dao.DiskOfferingJoinDaoImpl" />
@@ -223,8 +223,12 @@
223223
<bean id="hostTransferMapDaoImpl" class="com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl" />
224224
<bean id="iPAddressDaoImpl" class="com.cloud.network.dao.IPAddressDaoImpl" />
225225
<bean id="identityDaoImpl" class="com.cloud.uuididentity.dao.IdentityDaoImpl" />
226-
<bean id="imageDaoStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageDaoStoreDaoImpl" />
227-
<bean id="imageDataStoreProviderDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageDataStoreProviderDaoImpl" />
226+
<bean id="imageStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDaoImpl" />
227+
<bean id="imageStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.image.db.ImageStoreDetailsDaoImpl" />
228+
<bean id="imageStoreJoinDaoImpl" class="com.cloud.api.query.dao.ImageStoreJoinDaoImpl" />
229+
<bean id="snapshotDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.SnapshotDataStoreDaoImpl" />
230+
<bean id="templateDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.TemplateDataStoreDaoImpl" />
231+
<bean id="volumeDataStoreDaoImpl" class="org.apache.cloudstack.storage.image.db.VolumeDataStoreDaoImpl" />
228232
<bean id="inlineLoadBalancerNicMapDaoImpl" class="com.cloud.network.dao.InlineLoadBalancerNicMapDaoImpl" />
229233
<bean id="instanceGroupDaoImpl" class="com.cloud.vm.dao.InstanceGroupDaoImpl" />
230234
<bean id="instanceGroupJoinDaoImpl" class="com.cloud.api.query.dao.InstanceGroupJoinDaoImpl" />
@@ -270,7 +274,7 @@
270274
<bean id="portForwardingRulesDaoImpl" class="com.cloud.network.rules.dao.PortForwardingRulesDaoImpl" />
271275
<bean id="portProfileDaoImpl" class="com.cloud.network.dao.PortProfileDaoImpl" />
272276
<bean id="primaryDataStoreDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl" />
273-
<bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDetailsDaoImpl" />
277+
<bean id="primaryDataStoreDetailsDaoImpl" class="org.apache.cloudstack.storage.volume.db.PrimaryDataStoreDetailsDaoImpl" />
274278
<bean id="privateIpDaoImpl" class="com.cloud.network.vpc.dao.PrivateIpDaoImpl" />
275279
<bean id="projectAccountDaoImpl" class="com.cloud.projects.dao.ProjectAccountDaoImpl" />
276280
<bean id="projectAccountJoinDaoImpl" class="com.cloud.api.query.dao.ProjectAccountJoinDaoImpl" />
@@ -713,7 +717,6 @@
713717
<bean id="agentMonitor" class="com.cloud.agent.manager.AgentMonitor" />
714718
<bean id="alertGenerator" class="com.cloud.event.AlertGenerator" />
715719
<bean id="ancientDataMotionStrategy" class="org.apache.cloudstack.storage.motion.AncientDataMotionStrategy" />
716-
<bean id="ancientImageDataStoreProvider" class="org.apache.cloudstack.storage.image.store.AncientImageDataStoreProvider" />
717720
<bean id="ancientSnapshotStrategy" class="org.apache.cloudstack.storage.snapshot.strategy.AncientSnapshotStrategy" />
718721
<bean id="apiDBUtils" class="com.cloud.api.ApiDBUtils" />
719722
<bean id="apiDiscoveryServiceImpl" class="org.apache.cloudstack.discovery.ApiDiscoveryServiceImpl" />
@@ -732,15 +735,15 @@
732735
<bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl" />
733736
<bean id="defaultEndPointSelector" class="org.apache.cloudstack.storage.endpoint.DefaultEndPointSelector" />
734737
<bean id="primaryDataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl" />
738+
<bean id="imageStoreProviderManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl" />
735739
<bean id="eventUtils" class="com.cloud.event.EventUtils" />
736740
<bean id="globalLoadBalancingRulesServiceImpl" class="org.apache.cloudstack.region.gslb.GlobalLoadBalancingRulesServiceImpl" />
737741
<bean id="hypervsiorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervsiorHostEndPointRpcServer" />
738742
<bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
739743
<bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
740744
<bean id="imageDataFactoryImpl" class="org.apache.cloudstack.storage.image.ImageDataFactoryImpl" />
741745
<bean id="imageDataManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageDataManagerImpl" />
742-
<bean id="imageDataStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper" />
743-
<bean id="imageDataStoreManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageDataStoreManagerImpl" />
746+
<bean id="imageStoreHelper" class="org.apache.cloudstack.storage.image.datastore.ImageStoreHelper" />
744747
<bean id="imageFormatHelper" class="org.apache.cloudstack.storage.image.format.ImageFormatHelper" />
745748
<bean id="imageServiceImpl" class="org.apache.cloudstack.storage.image.ImageServiceImpl" />
746749
<bean id="iso" class="org.apache.cloudstack.engine.subsystem.api.storage.type.Iso" />

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@
2222

2323
public interface ImageStoreDao extends GenericDao<ImageStoreVO, Long> {
2424
public ImageStoreVO findByName(String name);
25+
26+
public ImageStoreVO findEnabledStore();
2527
}

‎engine/storage/src/org/apache/cloudstack/storage/image/db/ImageStoreDaoImpl.java‎

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,64 @@
1818
*/
1919
package org.apache.cloudstack.storage.image.db;
2020

21+
import java.util.Map;
22+
23+
import javax.naming.ConfigurationException;
24+
2125
import org.apache.cloudstack.storage.datastore.db.ImageStoreDao;
2226
import org.apache.cloudstack.storage.datastore.db.ImageStoreVO;
27+
import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO;
28+
import org.apache.log4j.Logger;
2329
import org.springframework.stereotype.Component;
2430

31+
import com.cloud.storage.ImageStore;
32+
import com.cloud.user.AccountVO;
33+
import com.cloud.utils.db.DB;
2534
import com.cloud.utils.db.GenericDaoBase;
35+
import com.cloud.utils.db.SearchBuilder;
36+
import com.cloud.utils.db.SearchCriteria;
2637
import com.cloud.utils.db.SearchCriteria2;
2738
import com.cloud.utils.db.SearchCriteriaService;
2839
import com.cloud.utils.db.SearchCriteria.Op;
2940

3041
@Component
3142
public class ImageStoreDaoImpl extends GenericDaoBase<ImageStoreVO, Long> implements ImageStoreDao {
3243

44+
private static final Logger s_logger = Logger.getLogger(ImageStoreDaoImpl.class);
45+
private SearchBuilder<ImageStoreVO> nameSearch;
46+
private SearchBuilder<ImageStoreVO> enableSearch;
47+
48+
49+
@Override
50+
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
51+
super.configure(name, params);
52+
53+
nameSearch = createSearchBuilder();
54+
nameSearch.and("name", nameSearch.entity().getName(), SearchCriteria.Op.EQ);
55+
nameSearch.done();
56+
57+
58+
enableSearch = createSearchBuilder();
59+
enableSearch.and("state", enableSearch.entity().getState(), SearchCriteria.Op.EQ);
60+
enableSearch.done();
61+
62+
return true;
63+
}
64+
3365
@Override
3466
public ImageStoreVO findByName(String name) {
35-
SearchCriteriaService<ImageStoreVO, ImageStoreVO> sc = SearchCriteria2.create(ImageStoreVO.class);
36-
sc.addAnd(sc.getEntity().getName(), Op.EQ, name);
37-
return sc.find();
67+
SearchCriteria<ImageStoreVO> sc = nameSearch.create();
68+
sc.setParameters("name", name);
69+
return findOneBy(sc);
70+
}
71+
72+
@Override
73+
public ImageStoreVO findEnabledStore() {
74+
SearchCriteria<ImageStoreVO> sc = nameSearch.create();
75+
sc.setParameters("state", ImageStore.State.Enabled); // only one image store is enabled at one time.
76+
return findOneBy(sc);
3877
}
3978

79+
80+
4081
}

‎engine/storage/src/org/apache/cloudstack/storage/image/db/SnapshotDataStoreDaoImpl.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
5252
storeSearch.done();
5353

5454
liveStoreSearch = createSearchBuilder();
55-
liveStoreSearch.and("store_id", storeSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
56-
liveStoreSearch.and("destroyed", storeSearch.entity().getDestroyed(), SearchCriteria.Op.EQ);
55+
liveStoreSearch.and("store_id", liveStoreSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
56+
liveStoreSearch.and("destroyed", liveStoreSearch.entity().getDestroyed(), SearchCriteria.Op.EQ);
5757
liveStoreSearch.done();
5858

5959
updateStateSearch = this.createSearchBuilder();
@@ -109,7 +109,7 @@ public List<SnapshotDataStoreVO> listByStoreId(long id) {
109109

110110
@Override
111111
public List<SnapshotDataStoreVO> listLiveByStoreId(long id) {
112-
SearchCriteria<SnapshotDataStoreVO> sc = storeSearch.create();
112+
SearchCriteria<SnapshotDataStoreVO> sc = liveStoreSearch.create();
113113
sc.setParameters("store_id", id);
114114
sc.setParameters("destroyed", false);
115115
return listIncludingRemovedBy(sc);

‎engine/storage/src/org/apache/cloudstack/storage/image/db/TemplateDataStoreDaoImpl.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
5353
storeSearch.done();
5454

5555
liveStoreSearch = createSearchBuilder();
56-
liveStoreSearch.and("store_id", storeSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
57-
liveStoreSearch.and("destroyed", storeSearch.entity().getDestroyed(), SearchCriteria.Op.EQ);
56+
liveStoreSearch.and("store_id", liveStoreSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
57+
liveStoreSearch.and("destroyed", liveStoreSearch.entity().getDestroyed(), SearchCriteria.Op.EQ);
5858
liveStoreSearch.done();
5959

6060
updateStateSearch = this.createSearchBuilder();
@@ -109,7 +109,7 @@ public List<TemplateDataStoreVO> listByStoreId(long id) {
109109
}
110110
@Override
111111
public List<TemplateDataStoreVO> listLiveByStoreId(long id) {
112-
SearchCriteria<TemplateDataStoreVO> sc = storeSearch.create();
112+
SearchCriteria<TemplateDataStoreVO> sc = liveStoreSearch.create();
113113
sc.setParameters("store_id", id);
114114
sc.setParameters("destroyed", false);
115115
return listIncludingRemovedBy(sc);

‎engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ public class VolumeDataStoreDaoImpl extends GenericDaoBase<VolumeDataStoreVO, Lo
4949
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
5050
super.configure(name, params);
5151

52+
storeSearch = createSearchBuilder();
53+
storeSearch.and("store_id", storeSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
54+
storeSearch.done();
55+
56+
liveStoreSearch = createSearchBuilder();
57+
liveStoreSearch.and("store_id", liveStoreSearch.entity().getDataStoreId(), SearchCriteria.Op.EQ);
58+
liveStoreSearch.and("destroyed", liveStoreSearch.entity().getDestroyed(), SearchCriteria.Op.EQ);
59+
liveStoreSearch.done();
60+
5261
updateStateSearch = this.createSearchBuilder();
5362
updateStateSearch.and("id", updateStateSearch.entity().getId(), Op.EQ);
5463
updateStateSearch.and("state", updateStateSearch.entity().getState(), Op.EQ);
@@ -100,7 +109,7 @@ public List<VolumeDataStoreVO> listByStoreId(long id) {
100109
}
101110
@Override
102111
public List<VolumeDataStoreVO> listLiveByStoreId(long id) {
103-
SearchCriteria<VolumeDataStoreVO> sc = storeSearch.create();
112+
SearchCriteria<VolumeDataStoreVO> sc = liveStoreSearch.create();
104113
sc.setParameters("store_id", id);
105114
sc.setParameters("destroyed", false);
106115
return listIncludingRemovedBy(sc);

‎server/src/com/cloud/storage/StorageManagerImpl.java‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd;
4646
import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd;
4747
import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd;
48+
import org.apache.cloudstack.api.command.admin.storage.EnableImageStoreCmd;
4849
import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd;
4950
import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope;
5051
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
@@ -165,6 +166,7 @@
165166
import com.cloud.template.TemplateManager;
166167
import com.cloud.user.Account;
167168
import com.cloud.user.AccountManager;
169+
import com.cloud.user.AccountVO;
168170
import com.cloud.user.ResourceLimitService;
169171
import com.cloud.user.User;
170172
import com.cloud.user.UserContext;
@@ -2011,5 +2013,40 @@ public boolean deleteImageStore(DeleteImageStoreCmd cmd) {
20112013
return true;
20122014
}
20132015

2016+
@Override
2017+
public ImageStore enableImageStore(EnableImageStoreCmd cmd) {
2018+
Long storeId = cmd.getId();
2019+
String storeName = cmd.getStoreName();
2020+
2021+
ImageStore store = null;
2022+
if ( storeId != null ){
2023+
store = _imageStoreDao.findById(storeId);
2024+
} else if ( storeName != null ){
2025+
store = _imageStoreDao.findByName(storeName);
2026+
} else {
2027+
throw new InvalidParameterValueException("Either image store id or name has to be specified!");
2028+
}
2029+
2030+
if (store == null) {
2031+
throw new InvalidParameterValueException("Unable to find image store by id: " + storeId + " OR by name: " + storeName);
2032+
}
2033+
// disable currently active store
2034+
ImageStoreVO activeStore = _imageStoreDao.findEnabledStore();
2035+
ImageStoreVO activeStoreForUpdate = _imageStoreDao.createForUpdate();
2036+
activeStoreForUpdate.setState(ImageStore.State.Disabled);
2037+
if ( !_imageStoreDao.update(activeStore.getId(), activeStoreForUpdate)){
2038+
throw new CloudRuntimeException("Failed to disable current active image store " + activeStore.getName());
2039+
}
2040+
2041+
ImageStoreVO storeForUpdate = _imageStoreDao.createForUpdate();
2042+
storeForUpdate.setState(ImageStore.State.Enabled);
2043+
if (_imageStoreDao.update(store.getId(), storeForUpdate)){
2044+
return _imageStoreDao.findById(store.getId());
2045+
}
2046+
else{
2047+
throw new CloudRuntimeException("Failed to enable image store by id: " + storeId + " OR by name: " + storeName);
2048+
}
2049+
}
2050+
20142051

20152052
}

0 commit comments

Comments
 (0)