Skip to content

Commit 22cfb95

Browse files
authored
Remove name description and check endpoint (#39)
* refactor: remove check endpoint * refactor: remove name and description attributes
1 parent eac1253 commit 22cfb95

3 files changed

Lines changed: 1 addition & 21 deletions

File tree

src/main/java/org/eclipse/dataplane/Dataplane.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ public class Dataplane {
5555
private final ObjectMapper objectMapper = new ObjectMapper().configure(FAIL_ON_UNKNOWN_PROPERTIES, false);
5656
private final DataFlowStore store = new InMemoryDataFlowStore(objectMapper);
5757
private String id;
58-
private String name;
59-
private String description;
6058
private String endpoint;
6159
private final Set<String> transferTypes = new HashSet<>();
6260
private final Set<String> labels = new HashSet<>();
@@ -269,7 +267,7 @@ public Result<Void> completed(String flowId) {
269267

270268
public Result<Void> registerOn(String controlPlaneEndpoint) {
271269

272-
var message = new DataPlaneRegistrationMessage(id, name, description, endpoint, transferTypes, labels);
270+
var message = new DataPlaneRegistrationMessage(id, endpoint, transferTypes, labels);
273271

274272
return toJson(message)
275273
.map(body -> HttpRequest.newBuilder()
@@ -337,16 +335,6 @@ public Builder id(String id) {
337335
return this;
338336
}
339337

340-
public Builder name(String name) {
341-
dataplane.name = name;
342-
return this;
343-
}
344-
345-
public Builder description(String description) {
346-
dataplane.description = description;
347-
return this;
348-
}
349-
350338
public Builder endpoint(String endpoint) {
351339
dataplane.endpoint = endpoint;
352340
return this;

src/main/java/org/eclipse/dataplane/domain/registration/DataPlaneRegistrationMessage.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
public record DataPlaneRegistrationMessage(
2020
String dataplaneId,
21-
String name,
22-
String description,
2321
String endpoint,
2422
Set<String> transferTypes,
2523
Set<String> labels

src/test/java/org/eclipse/dataplane/DataplaneTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ void shouldRegisterOnTheControlPlane() {
124124

125125
var dataplane = Dataplane.newInstance()
126126
.id("dataplane-id")
127-
.name("dataplane-name")
128-
.description("dataplane-description")
129127
.endpoint("http://localhost/dataplane")
130128
.transferType("SupportedTransferType-PUSH")
131129
.label("label-one").label("label-two")
@@ -137,8 +135,6 @@ void shouldRegisterOnTheControlPlane() {
137135
controlPlane.verify(postRequestedFor(urlPathEqualTo("/dataplanes/register"))
138136
.withRequestBody(and(
139137
matchingJsonPath("dataplaneId", equalTo("dataplane-id")),
140-
matchingJsonPath("name", equalTo("dataplane-name")),
141-
matchingJsonPath("description", equalTo("dataplane-description")),
142138
matchingJsonPath("endpoint", equalTo("http://localhost/dataplane")),
143139
matchingJsonPath("transferTypes[0]", equalTo("SupportedTransferType-PUSH")),
144140
matchingJsonPath("labels.size()", equalTo("2"))
@@ -152,8 +148,6 @@ void shouldFail_whenStatusIsNot200() {
152148

153149
var dataplane = Dataplane.newInstance()
154150
.id("dataplane-id")
155-
.name("dataplane-name")
156-
.description("dataplane-description")
157151
.endpoint("http://localhost/dataplane")
158152
.transferType("SupportedTransferType-PUSH")
159153
.label("label-one").label("label-two")

0 commit comments

Comments
 (0)