Skip to content

Commit 5227bd0

Browse files
Srivastava, PiyushSrivastava, Piyush
authored andcommitted
vm instance creation test6
1 parent 8ea9235 commit 5227bd0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,7 @@ public DataStoreTO getStoreTO(DataStore store) {
113113
s_logger.info(" Host Address: " + primaryStore.getHostAddress());
114114
s_logger.info(" Path: " + primaryStore.getPath());
115115
s_logger.info(" Port: " + primaryStore.getPort());
116-
s_logger.info(" Details keys: " + (poolDetails != null ? poolDetails.keySet() : "null"));
117-
if (poolDetails != null && poolDetails.containsKey("managedStoreTarget")) {
118-
s_logger.info(" managedStoreTarget: " + poolDetails.get("managedStoreTarget"));
119-
}
116+
s_logger.info(" Final details in storeTO: " + storeTO.getDetails());
120117
return storeTO;
121118
}
122119

@@ -140,6 +137,12 @@ public void createAsync(DataStore dataStore, DataObject dataObject, AsyncComplet
140137
if (dataObject.getType() == DataObjectType.VOLUME) {
141138
path = createCloudStackVolumeForTypeVolume(dataStore, dataObject);
142139
createCmdResult = new CreateCmdResult(path, new Answer(null, true, null));
140+
} else if (dataObject.getType() == DataObjectType.TEMPLATE) {
141+
// For templates, return the UUID as the install path
142+
// This will be used as the filename for the qcow2 file on NFS
143+
path = dataObject.getUuid();
144+
s_logger.info("createAsync: Template [{}] will use UUID as install path: {}", ((TemplateInfo)dataObject).getName(), path);
145+
createCmdResult = new CreateCmdResult(path, new Answer(null, true, null));
143146
} else {
144147
errMsg = "Invalid DataObjectType (" + dataObject.getType() + ") passed to createAsync";
145148
s_logger.error(errMsg);

0 commit comments

Comments
 (0)