Skip to content

Commit 033c23d

Browse files
CSTACKEX-28 - incorporated review comments
1 parent 2cc4b0c commit 033c23d

File tree

12 files changed

+264
-7
lines changed

12 files changed

+264
-7
lines changed

plugins/storage/volume/ontap/pom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
<properties>
3131
<spring-cloud.version>2021.0.7</spring-cloud.version>
3232
<openfeign.version>11.0</openfeign.version>
33+
<json.version>20230227</json.version>
34+
<swagger-annotations.version>1.6.2</swagger-annotations.version>
35+
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
36+
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
3337
</properties>
3438
<dependencyManagement>
3539
<dependencies>
@@ -51,7 +55,7 @@
5155
<dependency>
5256
<groupId>org.json</groupId>
5357
<artifactId>json</artifactId>
54-
<version>20230227</version>
58+
<version>${json.version}</version>
5559
</dependency>
5660
<dependency>
5761
<groupId>org.springframework.cloud</groupId>
@@ -80,22 +84,23 @@
8084
<dependency>
8185
<groupId>io.swagger</groupId>
8286
<artifactId>swagger-annotations</artifactId>
83-
<version>1.6.2</version>
87+
<version>${swagger-annotations.version}</version>
8488
</dependency>
8589
</dependencies>
8690
<build>
8791
<plugins>
8892
<plugin>
8993
<groupId>org.apache.maven.plugins</groupId>
9094
<artifactId>maven-compiler-plugin</artifactId>
91-
<version>3.8.1</version>
95+
<version>${maven-compiler-plugin.version}</version>
9296
<configuration>
9397
<source>11</source>
9498
<target>11</target>
9599
</configuration>
96100
</plugin>
97101
<plugin>
98102
<artifactId>maven-surefire-plugin</artifactId>
103+
<version>${maven-surefire-plugin.version}</version>
99104
<configuration>
100105
<skipTests>true</skipTests>
101106
</configuration>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public class Aggregate {
3030
@SerializedName("name")
3131
private String name = null;
3232

33+
@Override
34+
public int hashCode() {
35+
return Objects.hash(getName(), getUuid());
36+
}
37+
3338
@SerializedName("uuid")
3439
private String uuid = null;
3540

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@ public class AntiRansomware {
2424
@JsonProperty("state")
2525
private String state;
2626

27-
// Getters and setters
27+
public String getState() {
28+
return state;
29+
}
30+
31+
public void setState(String state) {
32+
this.state = state;
33+
}
2834
}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
import com.fasterxml.jackson.annotation.JsonInclude;
2222

23+
import java.util.Objects;
24+
2325
@JsonInclude(JsonInclude.Include.NON_NULL)
2426
public class ExportPolicy {
2527
private String name;
@@ -28,4 +30,16 @@ public class ExportPolicy {
2830
public void setName(String name) { this.name = name; }
2931
public long getId() { return id; }
3032
public void setId(long id) { this.id = id; }
33+
34+
@Override
35+
public boolean equals(Object o) {
36+
if (o == null || getClass() != o.getClass()) return false;
37+
ExportPolicy that = (ExportPolicy) o;
38+
return getId() == that.getId();
39+
}
40+
41+
@Override
42+
public int hashCode() {
43+
return Objects.hashCode(getId());
44+
}
3145
}

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,21 @@ public class Nas {
2929
@JsonProperty("export_policy")
3030
private ExportPolicy exportPolicy;
3131

32-
// Getters and setters
32+
public String getPath() {
33+
return path;
34+
}
35+
36+
public void setPath(String path) {
37+
this.path = path;
38+
}
39+
40+
public ExportPolicy getExportPolicy() {
41+
return exportPolicy;
42+
}
43+
44+
public void setExportPolicy(ExportPolicy exportPolicy) {
45+
this.exportPolicy = exportPolicy;
46+
}
47+
48+
3349
}

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
import com.fasterxml.jackson.annotation.JsonInclude;
2323

24+
import java.util.Objects;
25+
2426
@JsonInclude(JsonInclude.Include.NON_NULL)
2527
public class Policy {
2628
private int minThroughputIops;
@@ -41,4 +43,16 @@ public class Policy {
4143
public void setUuid(String uuid) { this.uuid = uuid; }
4244
public String getName() { return name; }
4345
public void setName(String name) { this.name = name; }
46+
47+
@Override
48+
public boolean equals(Object o) {
49+
if (o == null || getClass() != o.getClass()) return false;
50+
Policy policy = (Policy) o;
51+
return Objects.equals(getUuid(), policy.getUuid());
52+
}
53+
54+
@Override
55+
public int hashCode() {
56+
return Objects.hashCode(getUuid());
57+
}
4458
}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,11 @@ public class Qos {
2626
@JsonProperty("policy")
2727
private Policy policy;
2828

29-
// Getters and setters
29+
public Policy getPolicy() {
30+
return policy;
31+
}
32+
33+
public void setPolicy(Policy policy) {
34+
this.policy = policy;
35+
}
3036
}

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.google.gson.annotations.SerializedName;
2525

2626
import java.util.List;
27+
import java.util.Objects;
2728

2829
@JsonInclude(JsonInclude.Include.NON_NULL)
2930
public class Svm {
@@ -58,4 +59,80 @@ public class Svm {
5859
@JsonProperty("state.value")
5960
@SerializedName("state.value")
6061
private String state = null;
62+
63+
public String getUuid() {
64+
return uuid;
65+
}
66+
67+
public void setUuid(String uuid) {
68+
this.uuid = uuid;
69+
}
70+
71+
public String getName() {
72+
return name;
73+
}
74+
75+
public void setName(String name) {
76+
this.name = name;
77+
}
78+
79+
public Boolean getIscsiEnabled() {
80+
return iscsiEnabled;
81+
}
82+
83+
public void setIscsiEnabled(Boolean iscsiEnabled) {
84+
this.iscsiEnabled = iscsiEnabled;
85+
}
86+
87+
public Boolean getFcpEnabled() {
88+
return fcpEnabled;
89+
}
90+
91+
public void setFcpEnabled(Boolean fcpEnabled) {
92+
this.fcpEnabled = fcpEnabled;
93+
}
94+
95+
public Boolean getNfsEnabled() {
96+
return nfsEnabled;
97+
}
98+
99+
public void setNfsEnabled(Boolean nfsEnabled) {
100+
this.nfsEnabled = nfsEnabled;
101+
}
102+
103+
public List<Aggregate> getAggregates() {
104+
return aggregates;
105+
}
106+
107+
public void setAggregates(List<Aggregate> aggregates) {
108+
this.aggregates = aggregates;
109+
}
110+
111+
public Boolean getAggregatesDelegated() {
112+
return aggregatesDelegated;
113+
}
114+
115+
public void setAggregatesDelegated(Boolean aggregatesDelegated) {
116+
this.aggregatesDelegated = aggregatesDelegated;
117+
}
118+
119+
public String getState() {
120+
return state;
121+
}
122+
123+
public void setState(String state) {
124+
this.state = state;
125+
}
126+
127+
@Override
128+
public boolean equals(Object o) {
129+
if (o == null || getClass() != o.getClass()) return false;
130+
Svm svm = (Svm) o;
131+
return Objects.equals(getUuid(), svm.getUuid());
132+
}
133+
134+
@Override
135+
public int hashCode() {
136+
return Objects.hashCode(getUuid());
137+
}
61138
}

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,42 @@ public Nas getNas() {
7575
return nas;
7676
}
7777

78+
public void setNas(Nas nas) {
79+
this.nas = nas;
80+
}
81+
82+
public Svm getSvm() {
83+
return svm;
84+
}
85+
86+
public void setSvm(Svm svm) {
87+
this.svm = svm;
88+
}
89+
90+
public Qos getQos() {
91+
return qos;
92+
}
93+
94+
public void setQos(Qos qos) {
95+
this.qos = qos;
96+
}
97+
98+
public VolumeSpace getSpace() {
99+
return space;
100+
}
101+
102+
public void setSpace(VolumeSpace space) {
103+
this.space = space;
104+
}
105+
106+
public AntiRansomware getAntiRansomware() {
107+
return antiRansomware;
108+
}
109+
110+
public void setAntiRansomware(AntiRansomware antiRansomware) {
111+
this.antiRansomware = antiRansomware;
112+
}
113+
78114
@Override
79115
public boolean equals(Object o) {
80116
if (o == null || getClass() != o.getClass()) return false;

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,44 @@ public class VolumeQosPolicy {
4444
@JsonProperty("uuid")
4545
@SerializedName("uuid")
4646
private String uuid = null;
47+
48+
public Integer getMaxThroughputIops() {
49+
return maxThroughputIops;
50+
}
51+
52+
public void setMaxThroughputIops(Integer maxThroughputIops) {
53+
this.maxThroughputIops = maxThroughputIops;
54+
}
55+
56+
public Integer getMaxThroughputMbps() {
57+
return maxThroughputMbps;
58+
}
59+
60+
public void setMaxThroughputMbps(Integer maxThroughputMbps) {
61+
this.maxThroughputMbps = maxThroughputMbps;
62+
}
63+
64+
public Integer getMinThroughputIops() {
65+
return minThroughputIops;
66+
}
67+
68+
public void setMinThroughputIops(Integer minThroughputIops) {
69+
this.minThroughputIops = minThroughputIops;
70+
}
71+
72+
public String getName() {
73+
return name;
74+
}
75+
76+
public void setName(String name) {
77+
this.name = name;
78+
}
79+
80+
public String getUuid() {
81+
return uuid;
82+
}
83+
84+
public void setUuid(String uuid) {
85+
this.uuid = uuid;
86+
}
4787
}

0 commit comments

Comments
 (0)