Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ public Catalog getCatalog(String participantContextId, String counterPartyDid) {

@Override
public void prepareDataplane(String participantContextId, DataplaneRegistration dataplaneRegistration) {
controlPlaneWebClient.post()
.uri("/v5beta/dataplanes/%s".formatted(participantContextId))
controlPlaneWebClient.put()
.uri("/v5beta/participants/%s/dataplanes".formatted(participantContextId))
.header("Authorization", "Bearer %s".formatted(getToken(participantContextId)))
.bodyValue(dataplaneRegistration)
.retrieve()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@

public class DataplaneRegistration {
private String id;
private List<String> allowedTransferTypes;
private String url;
private List<String> transferTypes;
private String endpoint;
private List<String> labels;


public List<String> getAllowedTransferTypes() {
return allowedTransferTypes;
public List<String> getTransferTypes() {
return transferTypes;
}

public void setAllowedTransferTypes(List<String> allowedTransferTypes) {
this.allowedTransferTypes = allowedTransferTypes;
public void setTransferTypes(List<String> transferTypes) {
this.transferTypes = transferTypes;
}

public String getId() {
return id;
}

public String getUrl() {
return url;
public String getEndpoint() {
return endpoint;
}

public void setUrl(String url) {
this.url = url;
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}

public List<String> getLabels() {
Expand Down Expand Up @@ -69,12 +69,12 @@ public Builder labels(List<String> labels) {
}

public Builder allowedTransferTypes(List<String> allowedTransferTypes) {
dataplaneRegistration.setAllowedTransferTypes(allowedTransferTypes);
dataplaneRegistration.setTransferTypes(allowedTransferTypes);
return this;
}

public Builder url(String url) {
dataplaneRegistration.setUrl(url);
dataplaneRegistration.setEndpoint(url);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ void shouldPrepareDataplane() throws InterruptedException {

// Assert
var dataplaneRequest = mockWebServer.takeRequest();
assertThat(dataplaneRequest.getPath()).isEqualTo("/v5beta/dataplanes/" + participantContextId);
assertThat(dataplaneRequest.getPath()).isEqualTo("/v5beta/participants/%s/dataplanes".formatted(participantContextId));
assertThat(dataplaneRequest.getHeader("Authorization")).isEqualTo("Bearer test-token");
}

Expand Down
Loading