cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anshul1886 <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-8833: Fixed Generating url and...
Date Mon, 14 Sep 2015 05:20:05 GMT
Github user anshul1886 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/803#discussion_r39361975
  
    --- Diff: engine/storage/src/org/apache/cloudstack/storage/image/db/VolumeDataStoreDaoImpl.java
---
    @@ -350,4 +351,20 @@ public void expireDnldUrlsForZone(Long dcId){
             return listIncludingRemovedBy(sc);
         }
     
    +    @Override
    +    public boolean updateVolumeId(long srcVolId, long destVolId) {
    +        TransactionLegacy txn = TransactionLegacy.currentTxn();
    +        try {
    +            VolumeDataStoreVO volumeDataStoreVO = findByVolume(srcVolId);
    +            if(volumeDataStoreVO != null) {
    +                txn.start();
    +                volumeDataStoreVO.setVolumeId(destVolId);
    +                update(volumeDataStoreVO.getId(), volumeDataStoreVO);
    +                txn.commit();
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    Updated the code to embed the exception in CloudRuntimeException.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message