Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r59084080 --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java --- @@ -245,6 +228,52 @@ public SnapshotInfo takeSnapshot(SnapshotInfo snapshotInfo) { return snapshotInfo; } + private boolean canStorageSystemCreateVolumeFromSnapshot(long storagePoolId) { + boolean supportsCloningVolumeFromSnapshot = false; + + DataStore dataStore = _dataStoreMgr.getDataStore(storagePoolId, DataStoreRole.Primary); + + Map<String, String> mapCapabilities = dataStore.getDriver().getCapabilities(); + + if (mapCapabilities != null) { + String value = mapCapabilities.get(DataStoreCapabilities.CAN_CREATE_VOLUME_FROM_SNAPSHOT.toString()); + + supportsCloningVolumeFromSnapshot = new Boolean(value); + } + + return supportsCloningVolumeFromSnapshot; + } + + private boolean computeClusterSupportsResign(long clusterId) { + List<HostVO> hosts = _hostDao.findByClusterId(clusterId); + + if (hosts == null) { + return false; + } + + for (HostVO host : hosts) { + if (host == null) { + return false; + } + + DetailVO hostDetail = _hostDetailsDao.findDetail(host.getId(), "supportsResign"); + + if (hostDetail == null) { + return false; + } + + String value = hostDetail.getValue(); + + Boolean booleanValue = Boolean.valueOf(value); + + if (booleanValue == false) { + return false; + } + } + + return true; + } + --- End diff -- This method seems to a duplicate of a method on another class. Can the implementations be consolidated for consistency and better maintenance?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---