Skip to content

Commit 287a8b0

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-29 Resolve Review Comments
1 parent 4a42f58 commit 287a8b0

File tree

12 files changed

+113
-363
lines changed

12 files changed

+113
-363
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

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

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

44-
}
43+
}
44+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ public interface ClusterFeignClient {
3535
Cluster getCluster(URI baseURL, @RequestHeader("Authorization") String header, @RequestHeader("return_records") boolean value);
3636

3737
}
38+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
package org.apache.cloudstack.storage.feign.client;
2121

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

4140
}
41+

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ public Aggregate name(String name) {
4444
this.name = name;
4545
return this;
4646
}
47-
48-
/**
49-
* Get name
50-
*
51-
* @return name
52-
**/
53-
@ApiModelProperty(value = "Name of aggregate")
5447
public String getName() {
5548
return name;
5649
}
@@ -64,12 +57,6 @@ public Aggregate uuid(String uuid) {
6457
return this;
6558
}
6659

67-
/**
68-
* Get uuid
69-
*
70-
* @return uuid
71-
**/
72-
@ApiModelProperty(value = "UUID of aggregate")
7360
public String getUuid() {
7461
return uuid;
7562
}
@@ -109,3 +96,4 @@ public String toString() {
10996
}
11097

11198
}
99+

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

Lines changed: 0 additions & 151 deletions
This file was deleted.

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

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
import com.fasterxml.jackson.annotation.JsonInclude;
2323
import com.fasterxml.jackson.annotation.JsonProperty;
24-
import com.google.gson.annotations.SerializedName;
25-
import io.swagger.annotations.ApiModelProperty;
24+
25+
import java.util.Objects;
2626

2727
/**
2828
* Complete cluster information
@@ -35,7 +35,7 @@ public class Cluster {
3535
private String uuid = null;
3636

3737
@JsonProperty("version")
38-
private ClusterVersion version = null;
38+
private Version version = null;
3939
@JsonProperty("health")
4040
private String health = null;
4141

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

48-
@ApiModelProperty(example = "healthy", value = "")
48+
4949
public String getHealth() {
5050
return health;
5151
}
@@ -59,12 +59,7 @@ public Cluster name(String name) {
5959
return this;
6060
}
6161

62-
/**
63-
* Get name
64-
*
65-
* @return name
66-
**/
67-
@ApiModelProperty(example = "cluster1", value = "")
62+
6863
public String getName() {
6964
return name;
7065
}
@@ -73,49 +68,57 @@ public void setName(String name) {
7368
this.name = name;
7469
}
7570

76-
/**
77-
* Get uuid
78-
*
79-
* @return uuid
80-
**/
81-
@ApiModelProperty(example = "1cd8a442-86d1-11e0-ae1c-123478563412", value = "")
71+
8272
public String getUuid() {
8373
return uuid;
8474
}
8575

86-
public Cluster version(ClusterVersion version) {
76+
public Cluster version(Version version) {
8777
this.version = version;
8878
return this;
8979
}
9080

91-
/**
92-
* Get version
93-
*
94-
* @return version
95-
**/
96-
@ApiModelProperty(value = "")
97-
public ClusterVersion getVersion() {
81+
public Version getVersion() {
9882
return version;
9983
}
10084

101-
public void setVersion(ClusterVersion version) {
85+
public void setVersion(Version version) {
10286
this.version = version;
10387
}
104-
@ApiModelProperty(value = "")
88+
10589
public Boolean getSanOptimized() {
10690
return sanOptimized;
10791
}
10892

10993
public void setSanOptimized(Boolean sanOptimized) {
11094
this.sanOptimized = sanOptimized;
11195
}
112-
@ApiModelProperty(value = "")
96+
11397
public Boolean getDisaggregated() {
11498
return disaggregated;
11599
}
116100
public void setDisaggregated(Boolean disaggregated) {
117101
this.disaggregated = disaggregated;
118102
}
103+
104+
@Override
105+
public int hashCode() {
106+
return Objects.hash(getName(), getUuid());
107+
}
108+
109+
@Override
110+
public boolean equals(java.lang.Object o) {
111+
if (this == o) {
112+
return true;
113+
}
114+
if (o == null || getClass() != o.getClass()) {
115+
return false;
116+
}
117+
Cluster cluster = (Cluster) o;
118+
return Objects.equals(this.name, cluster.name) &&
119+
Objects.equals(this.uuid, cluster.uuid);
120+
}
121+
119122
@Override
120123
public String toString() {
121124
return "Cluster{" +
@@ -127,3 +130,4 @@ public String toString() {
127130
'}';
128131
}
129132
}
133+

0 commit comments

Comments
 (0)