Skip to content

Commit 3f0019a

Browse files
STACK-18_2: fixes
1 parent 8894248 commit 3f0019a

File tree

4 files changed

+7
-21
lines changed

4 files changed

+7
-21
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ public long getUsedIops(StoragePool storagePool) {
532532

533533
@Override
534534
public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback) {
535-
535+
s_logger.error("temp takeSnapshot : entered with snapshot id: " + snapshot.getId() + " and name: " + snapshot.getName());
536536
CreateCmdResult result;
537537

538538
try {
@@ -561,7 +561,7 @@ public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCm
561561
throw new CloudRuntimeException("takeSnapshot: Failed to get source file to take snapshot");
562562
}
563563
long capacityBytes = storagePool.getCapacityBytes();
564-
564+
s_logger.error("temp takeSnapshot : entered after getting cloudstack volume with file path: " + cloudStackVolume.getFile().getPath() + " and size: " + cloudStackVolume.getFile().getSize());
565565
long usedBytes = getUsedBytes(storagePool);
566566
long fileSize = cloudStackVolume.getFile().getSize();
567567

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/client/NASFeignClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
public interface NASFeignClient {
3535

3636
// File Operations
37-
@RequestLine("GET /api/storage/volumes/{volumeUuid}/files/{path}")
37+
@RequestLine("GET /api/storage/volumes/{volumeUuid}/files/{path}?return_metadata=true")
3838
@Headers({"Authorization: {authHeader}"})
3939
OntapResponse<FileInfo> getFileResponse(@Param("authHeader") String authHeader,
4040
@Param("volumeUuid") String volumeUUID,
@@ -60,7 +60,7 @@ void createFile(@Param("authHeader") String authHeader,
6060
@Param("path") String filePath,
6161
FileInfo file);
6262

63-
@RequestLine("POST /api/storage/volumes/{volumeUuid}/files/{path}")
63+
@RequestLine("POST /api/storage/file/clone")
6464
@Headers({"Authorization: {authHeader}"})
6565
JobResponse cloneFile(@Param("authHeader") String authHeader,
6666
FileClone fileClone);

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileClone.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ public void setSourcePath(String sourcePath) {
4747
public String getDestinationPath() {
4848
return destinationPath;
4949
}
50-
public void setDestinationPath(String destinationPath) {}
50+
public void setDestinationPath(String destinationPath) {
51+
this.destinationPath = destinationPath;
52+
}
5153
}

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileInfo.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.fasterxml.jackson.annotation.JsonProperty;
2626
import com.fasterxml.jackson.annotation.JsonValue;
2727

28-
import java.time.OffsetDateTime;
2928
import java.util.Objects;
3029

3130
/**
@@ -36,8 +35,6 @@
3635
public class FileInfo {
3736
@JsonProperty("bytes_used")
3837
private Long bytesUsed = null;
39-
@JsonProperty("creation_time")
40-
private OffsetDateTime creationTime = null;
4138
@JsonProperty("fill_enabled")
4239
private Boolean fillEnabled = null;
4340
@JsonProperty("is_empty")
@@ -46,8 +43,6 @@ public class FileInfo {
4643
private Boolean isSnapshot = null;
4744
@JsonProperty("is_vm_aligned")
4845
private Boolean isVmAligned = null;
49-
@JsonProperty("modified_time")
50-
private OffsetDateTime modifiedTime = null;
5146
@JsonProperty("name")
5247
private String name = null;
5348
@JsonProperty("overwrite_enabled")
@@ -110,10 +105,6 @@ public Long getBytesUsed() {
110105
return bytesUsed;
111106
}
112107

113-
public OffsetDateTime getCreationTime() {
114-
return creationTime;
115-
}
116-
117108
public FileInfo fillEnabled(Boolean fillEnabled) {
118109
this.fillEnabled = fillEnabled;
119110
return this;
@@ -149,11 +140,6 @@ public Boolean isIsVmAligned() {
149140
return isVmAligned;
150141
}
151142

152-
153-
public OffsetDateTime getModifiedTime() {
154-
return modifiedTime;
155-
}
156-
157143
public FileInfo name(String name) {
158144
this.name = name;
159145
return this;
@@ -266,12 +252,10 @@ public String toString() {
266252
StringBuilder sb = new StringBuilder();
267253
sb.append("class FileInfo {\n");
268254
sb.append(" bytesUsed: ").append(toIndentedString(bytesUsed)).append("\n");
269-
sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n");
270255
sb.append(" fillEnabled: ").append(toIndentedString(fillEnabled)).append("\n");
271256
sb.append(" isEmpty: ").append(toIndentedString(isEmpty)).append("\n");
272257
sb.append(" isSnapshot: ").append(toIndentedString(isSnapshot)).append("\n");
273258
sb.append(" isVmAligned: ").append(toIndentedString(isVmAligned)).append("\n");
274-
sb.append(" modifiedTime: ").append(toIndentedString(modifiedTime)).append("\n");
275259
sb.append(" name: ").append(toIndentedString(name)).append("\n");
276260
sb.append(" overwriteEnabled: ").append(toIndentedString(overwriteEnabled)).append("\n");
277261
sb.append(" path: ").append(toIndentedString(path)).append("\n");

0 commit comments

Comments
 (0)