Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CSTACKEX-29 Resolve Review Comments
  • Loading branch information
Gupta, Surya authored and Gupta, Surya committed Oct 15, 2025
commit 287a8b030525e5101e8eac2e45c2a5400d37908c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

package org.apache.cloudstack.storage.feign.client;

import org.apache.cloudstack.storage.feign.model.AggregateResponse;
import org.apache.cloudstack.storage.feign.model.Aggregate;
import org.apache.cloudstack.storage.feign.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
Expand All @@ -41,4 +40,5 @@ public interface AggregateFeignClient {
@RequestMapping(method=RequestMethod.GET, value="/{uuid}")
Aggregate getAggregateByUUID(URI baseURL,@RequestHeader("Authorization") String header, @PathVariable(name = "uuid", required = true) String uuid);

}
}

Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ public interface ClusterFeignClient {
Cluster getCluster(URI baseURL, @RequestHeader("Authorization") String header, @RequestHeader("return_records") boolean value);

}

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.apache.cloudstack.storage.feign.client;

import org.apache.cloudstack.storage.feign.FeignConfiguration;
import org.apache.cloudstack.storage.feign.model.SvmResponse;
import org.apache.cloudstack.storage.feign.model.Svm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestHeader;
Expand All @@ -39,3 +38,4 @@ public interface SvmFeignClient {
Svm getSvmByUUID(URI baseURL, @RequestHeader("Authorization") String header);

}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we reuse this in VolumeRequestDTO, instead of AggregateDTO?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, will remove the request DTOs and use the same ontap model with null annotation

Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ public Aggregate name(String name) {
this.name = name;
return this;
}

/**
* Get name
*
* @return name
**/
@ApiModelProperty(value = "Name of aggregate")
public String getName() {
return name;
}
Expand All @@ -64,12 +57,6 @@ public Aggregate uuid(String uuid) {
return this;
}

/**
* Get uuid
*
* @return uuid
**/
@ApiModelProperty(value = "UUID of aggregate")
public String getUuid() {
return uuid;
}
Expand Down Expand Up @@ -109,3 +96,4 @@ public String toString() {
}

}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be shifted to model/response

Copy link
Copy Markdown
Author

@suryag1201 suryag1201 Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, will create one generic ontap response class

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

/**
* Complete cluster information
Expand All @@ -35,7 +35,7 @@ public class Cluster {
private String uuid = null;

@JsonProperty("version")
private ClusterVersion version = null;
private Version version = null;
@JsonProperty("health")
private String health = null;

Expand All @@ -45,7 +45,7 @@ public class Cluster {
@JsonProperty("disaggregated")
private Boolean disaggregated = null;

@ApiModelProperty(example = "healthy", value = "")

public String getHealth() {
return health;
}
Expand All @@ -59,12 +59,7 @@ public Cluster name(String name) {
return this;
}

/**
* Get name
*
* @return name
**/
@ApiModelProperty(example = "cluster1", value = "")

public String getName() {
return name;
}
Expand All @@ -73,49 +68,57 @@ public void setName(String name) {
this.name = name;
}

/**
* Get uuid
*
* @return uuid
**/
@ApiModelProperty(example = "1cd8a442-86d1-11e0-ae1c-123478563412", value = "")

public String getUuid() {
return uuid;
}

public Cluster version(ClusterVersion version) {
public Cluster version(Version version) {
this.version = version;
return this;
}

/**
* Get version
*
* @return version
**/
@ApiModelProperty(value = "")
public ClusterVersion getVersion() {
public Version getVersion() {
return version;
}

public void setVersion(ClusterVersion version) {
public void setVersion(Version version) {
this.version = version;
}
@ApiModelProperty(value = "")

public Boolean getSanOptimized() {
return sanOptimized;
}

public void setSanOptimized(Boolean sanOptimized) {
this.sanOptimized = sanOptimized;
}
@ApiModelProperty(value = "")

public Boolean getDisaggregated() {
return disaggregated;
}
public void setDisaggregated(Boolean disaggregated) {
this.disaggregated = disaggregated;
}

@Override
public int hashCode() {
return Objects.hash(getName(), getUuid());
}

@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cluster cluster = (Cluster) o;
return Objects.equals(this.name, cluster.name) &&
Objects.equals(this.uuid, cluster.uuid);
}

@Override
public String toString() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add equals and hashcode using only uuid in this class

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

return "Cluster{" +
Expand All @@ -127,3 +130,4 @@ public String toString() {
'}';
}
}

Loading
Loading