Skip to content

Commit 88bba44

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-31 Resolve Review Comments
1 parent 2f3b41f commit 88bba44

File tree

2 files changed

+15
-67
lines changed

2 files changed

+15
-67
lines changed

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

Lines changed: 14 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import java.io.IOException;
2929
import java.util.ArrayList;
3030
import java.util.List;
31-
import java.util.Objects;
3231

3332
/**
3433
* ExportRule
@@ -51,11 +50,7 @@ public enum ProtocolsEnum {
5150

5251
nfs3("nfs3"),
5352

54-
nfs4("nfs4"),
55-
56-
cifs("cifs"),
57-
58-
flexcache("flexcache");
53+
nfs4("nfs4");
5954

6055
private String value;
6156

@@ -116,14 +111,6 @@ public ExportRule clients(List<ExportClient> clients) {
116111
return this;
117112
}
118113

119-
public ExportRule addClientsItem(ExportClient clientsItem) {
120-
if (this.clients == null) {
121-
this.clients = new ArrayList<ExportClient>();
122-
}
123-
this.clients.add(clientsItem);
124-
return this;
125-
}
126-
127114
public List<ExportClient> getClients() {
128115
return clients;
129116
}
@@ -160,23 +147,22 @@ public List<ProtocolsEnum> getProtocols() {
160147
public void setProtocols(List<ProtocolsEnum> protocols) {
161148
this.protocols = protocols;
162149
}
163-
@Override
164-
public boolean equals(Object o) {
165-
if (this == o) {
166-
return true;
150+
151+
public static class ExportClient {
152+
@JsonProperty("match")
153+
private String match = null;
154+
155+
public ExportClient match (String match) {
156+
this.match = match;
157+
return this;
167158
}
168-
if (o == null || getClass() != o.getClass()) {
169-
return false;
159+
public String getMatch () {
160+
return match;
170161
}
171-
ExportRule exportRule = (ExportRule) o;
172-
return Objects.equals(this.anonymousUser, exportRule.anonymousUser)
173-
&& Objects.equals(this.clients, exportRule.clients) && Objects.equals(this.index, exportRule.index)
174-
&& Objects.equals(this.protocols, exportRule.protocols);
175-
}
176162

177-
@Override
178-
public int hashCode() {
179-
return Objects.hash(anonymousUser, clients, index, protocols);
163+
public void setMatch (String match) {
164+
this.match = match;
165+
}
180166
}
181167

182168
@Override
@@ -191,33 +177,10 @@ public String toString() {
191177
sb.append("}");
192178
return sb.toString();
193179
}
194-
195-
/**
196-
* Convert the given object to string with each line indented by 4 spaces
197-
* (except the first line).
198-
*/
199180
private String toIndentedString(Object o) {
200181
if (o == null) {
201182
return "null";
202183
}
203184
return o.toString().replace("\n", "\n ");
204185
}
205-
206-
public static class ExportClient {
207-
@JsonProperty("match")
208-
private String match = null;
209-
210-
public ExportClient match (String match) {
211-
this.match = match;
212-
return this;
213-
}
214-
public String getMatch () {
215-
return match;
216-
}
217-
218-
public void setMatch (String match) {
219-
this.match = match;
220-
}
221-
}
222-
223186
}

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,7 @@ public class FileInfo {
6262
*/
6363
public enum TypeEnum {
6464
FILE("file"),
65-
66-
DIRECTORY("directory"),
67-
68-
BLOCKDEV("blockdev"),
69-
70-
CHARDEV("chardev"),
71-
72-
SYMLINK("symlink"),
73-
74-
SOCKET("socket"),
75-
76-
FIFO("fifo"),
77-
78-
STREAM("stream"),
79-
80-
LUN("lun");
65+
DIRECTORY("directory");
8166

8267
private String value;
8368

0 commit comments

Comments
 (0)