diff --git a/advanced/advanced-01-open-telemetry/README.md b/advanced/advanced-01-open-telemetry/README.md index 54bb5e40..43aad0d6 100644 --- a/advanced/advanced-01-open-telemetry/README.md +++ b/advanced/advanced-01-open-telemetry/README.md @@ -51,7 +51,7 @@ Create a Policy on the provider connector: ```bash curl -H "X-Api-Key: password" \ -d @transfer/transfer-01-negotiation/resources/create-policy.json \ - -H 'content-type: application/json' http://localhost:19193/management/v2/policydefinitions \ + -H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \ -s | jq ``` @@ -60,7 +60,7 @@ Follow up with the creation of a contract definition: ```bash curl -H "X-Api-Key: password" \ -d @transfer/transfer-01-negotiation/resources/create-contract-definition.json \ - -H 'content-type: application/json' http://localhost:19193/management/v2/contractdefinitions \ + -H 'content-type: application/json' http://localhost:19193/management/v3/contractdefinitions \ -s | jq ``` @@ -72,7 +72,7 @@ directly with this call: curl -H "X-Api-Key: password" \ -H "Content-Type: application/json" \ -d @advanced/advanced-01-open-telemetry/resources/get-dataset.json \ - -X POST "http://localhost:29193/management/v2/catalog/dataset/request" \ + -X POST "http://localhost:29193/management/v3/catalog/dataset/request" \ -s | jq ``` @@ -141,7 +141,7 @@ and request the contract negotiation: curl -H "X-Api-Key: password" \ -H "Content-Type: application/json" \ -d @advanced/advanced-01-open-telemetry/resources/negotiate-contract.json \ - -X POST "http://localhost:29193/management/v2/contractnegotiations" \ + -X POST "http://localhost:29193/management/v3/contractnegotiations" \ -s | jq ``` @@ -150,7 +150,7 @@ state with this call, replacing `{{contract-negotiation-id}}` with the id return ```shell curl -H 'X-Api-Key: password' \ - -X GET "http://localhost:29193/management/v2/contractnegotiations/{{contract-negotiation-id}}" \ + -X GET "http://localhost:29193/management/v3/contractnegotiations/{{contract-negotiation-id}}" \ -s | jq ``` @@ -160,7 +160,7 @@ Finally, update the contract agreement id in the [start-transfer.json](resources curl -H "X-Api-Key: password" \ -H "Content-Type: application/json" \ -d @advanced/advanced-01-open-telemetry/resources/start-transfer.json \ - -X POST "http://localhost:29193/management/v2/transferprocesses" \ + -X POST "http://localhost:29193/management/v3/transferprocesses" \ -s | jq ``` diff --git a/advanced/advanced-02-custom-runtime/src/main/java/org/eclipse/edc/sample/runtime/CustomRuntime.java b/advanced/advanced-02-custom-runtime/src/main/java/org/eclipse/edc/sample/runtime/CustomRuntime.java index 3f5d209b..a04d7409 100644 --- a/advanced/advanced-02-custom-runtime/src/main/java/org/eclipse/edc/sample/runtime/CustomRuntime.java +++ b/advanced/advanced-02-custom-runtime/src/main/java/org/eclipse/edc/sample/runtime/CustomRuntime.java @@ -28,7 +28,7 @@ public class CustomRuntime extends BaseRuntime { * instantiate the {@code BaseRuntime}. */ public static void main(String[] args) { - new CustomRuntime().boot(); + new CustomRuntime().boot(true); } @Override diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 28599df1..25f442ba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ format.version = "1.1" [versions] assertj = "3.26.0" awaitility = "4.2.1" -edc = "0.7.0" +edc = "0.7.1" jakarta-json = "2.0.1" junit-pioneer = "2.2.0" jupiter = "5.10.2" @@ -24,14 +24,15 @@ edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" } edc-build-plugin = { module = "org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin", version.ref = "edc" } edc-configuration-filesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" } edc-connector-core = { module = "org.eclipse.edc:connector-core", version.ref = "edc" } +edc-control-api-configuration = { module = "org.eclipse.edc:control-api-configuration", version.ref = "edc" } edc-control-plane-api-client = { module = "org.eclipse.edc:control-plane-api-client", version.ref = "edc" } edc-control-plane-api = { module = "org.eclipse.edc:control-plane-api", version.ref = "edc" } edc-control-plane-core = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" } edc-control-plane-spi = { module = "org.eclipse.edc:control-plane-spi", version.ref = "edc" } edc-data-plane-control-api = { module = "org.eclipse.edc:data-plane-control-api", version.ref = "edc" } edc-data-plane-public-api = { module = "org.eclipse.edc:data-plane-public-api-v2", version.ref = "edc" } -edc-data-plane-aws-s3 = { module = "org.eclipse.edc:data-plane-aws-s3", version.ref = "edc" } -edc-data-plane-azure-storage = { module = "org.eclipse.edc:data-plane-azure-storage", version.ref = "edc" } +edc-data-plane-aws-s3 = { module = "org.eclipse.edc.aws:data-plane-aws-s3", version.ref = "edc" } +edc-data-plane-azure-storage = { module = "org.eclipse.edc.azure:data-plane-azure-storage", version.ref = "edc" } edc-data-plane-client = { module = "org.eclipse.edc:data-plane-client", version.ref = "edc" } edc-data-plane-core = { module = "org.eclipse.edc:data-plane-core", version.ref = "edc" } edc-data-plane-http = { module = "org.eclipse.edc:data-plane-http", version.ref = "edc" } @@ -56,14 +57,14 @@ edc-management-api = { module = "org.eclipse.edc:management-api", version.ref = edc-management-api-test-fixtures = { module = "org.eclipse.edc:management-api-test-fixtures", version.ref = "edc" } edc-micrometer-core = { module = "org.eclipse.edc:micrometer-core", version.ref = "edc" } edc-monitor-jdk-logger = { module = "org.eclipse.edc:monitor-jdk-logger", version.ref = "edc" } -edc-provision-aws-s3 = { module = "org.eclipse.edc:provision-aws-s3", version.ref = "edc" } +edc-provision-aws-s3 = { module = "org.eclipse.edc.aws:provision-aws-s3", version.ref = "edc" } edc-runtime-metamodel = { module = "org.eclipse.edc:runtime-metamodel", version.ref = "edc" } edc-transfer-data-plane-signaling = { module = "org.eclipse.edc:transfer-data-plane-signaling", version.ref = "edc" } edc-transfer-process-api = { module = "org.eclipse.edc:transfer-process-api", version.ref = "edc" } edc-transfer-pull-http-receiver = { module = "org.eclipse.edc:transfer-pull-http-dynamic-receiver", version.ref = "edc" } edc-transfer-pull-http-dynamic-receiver = { module = "org.eclipse.edc:transfer-pull-http-dynamic-receiver", version.ref = "edc" } edc-util = { module = "org.eclipse.edc:util", version.ref = "edc" } -edc-vault-azure = { module = "org.eclipse.edc:vault-azure", version.ref = "edc" } +edc-vault-azure = { module = "org.eclipse.edc.azure:vault-azure", version.ref = "edc" } edc-validator-data-address-http-data = { module = "org.eclipse.edc:validator-data-address-http-data", version.ref = "edc" } jakarta-rsApi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "rsApi" } jakartaJson = { module = "org.glassfish:jakarta.json", version.ref = "jakarta-json" } diff --git a/policy/policy-01-policy-enforcement/README.md b/policy/policy-01-policy-enforcement/README.md index 32d43da6..cdde3832 100644 --- a/policy/policy-01-policy-enforcement/README.md +++ b/policy/policy-01-policy-enforcement/README.md @@ -200,7 +200,7 @@ be equal to `eu`. You can view the request body for creating the policy definiti ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/create-policy.json \ - "http://localhost:19193/management/v2/policydefinitions" | jq + "http://localhost:19193/management/v3/policydefinitions" | jq ``` #### 2.3 Create the contract definition @@ -216,7 +216,7 @@ the contract definition: ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/create-contract-definition.json \ - "http://localhost:19193/management/v2/contractdefinitions" | jq + "http://localhost:19193/management/v3/contractdefinitions" | jq ``` With this, the provider now offers the asset under the condition that the requesting participant is located in the EU. @@ -230,7 +230,7 @@ in the request. The request body is prepared in [catalog-request.json](resources ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/catalog-request.json \ - "http://localhost:29193/management/v2/catalog/request" | jq + "http://localhost:29193/management/v3/catalog/request" | jq ``` We'll receive the following catalog in the response, where we can see the offer created in the provider's extension. @@ -303,7 +303,7 @@ which protocol to use and which offer we want to negotiate. The request body is ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/contract-request.json \ - "http://localhost:29193/management/v2/contractnegotiations" | jq + "http://localhost:29193/management/v3/contractnegotiations" | jq ``` You'll get back a UUID. This is the ID of the contract negotiation process which is being asynchronously executed @@ -315,7 +315,7 @@ Using the ID received in the previous step, we can now view the state of the neg of the consumer's management API: ```bash -curl -X GET -H "X-Api-Key: password" "http://localhost:29193/management/v2/contractnegotiations/" | jq +curl -X GET -H "X-Api-Key: password" "http://localhost:29193/management/v3/contractnegotiations/" | jq ``` In the response we'll get a description of the negotiation, similar to the following: diff --git a/policy/policy-01-policy-enforcement/policy-enforcement-consumer/build.gradle.kts b/policy/policy-01-policy-enforcement/policy-enforcement-consumer/build.gradle.kts index 106240af..4eeb461a 100644 --- a/policy/policy-01-policy-enforcement/policy-enforcement-consumer/build.gradle.kts +++ b/policy/policy-01-policy-enforcement/policy-enforcement-consumer/build.gradle.kts @@ -21,7 +21,6 @@ plugins { dependencies { implementation(libs.edc.connector.core) implementation(libs.edc.control.plane.core) - implementation(libs.edc.data.plane.selector.core) implementation(libs.edc.configuration.filesystem) implementation(libs.edc.management.api) implementation(libs.edc.dsp) @@ -34,7 +33,6 @@ application { } tasks.withType { - //exclude("**/pom.properties", "**/pom.xm") mergeServiceFiles() archiveFileName.set("consumer.jar") } diff --git a/policy/policy-01-policy-enforcement/policy-enforcement-provider/build.gradle.kts b/policy/policy-01-policy-enforcement/policy-enforcement-provider/build.gradle.kts index f79f931b..4e750627 100644 --- a/policy/policy-01-policy-enforcement/policy-enforcement-provider/build.gradle.kts +++ b/policy/policy-01-policy-enforcement/policy-enforcement-provider/build.gradle.kts @@ -22,7 +22,6 @@ plugins { dependencies { implementation(libs.edc.connector.core) implementation(libs.edc.control.plane.core) - implementation(libs.edc.data.plane.selector.core) implementation(libs.edc.configuration.filesystem) implementation(libs.edc.management.api) implementation(libs.edc.dsp) diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/basic/Basic01basicConnectorTest.java b/system-tests/src/test/java/org/eclipse/edc/samples/basic/Basic01basicConnectorTest.java index 4d426312..57600e75 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/basic/Basic01basicConnectorTest.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/basic/Basic01basicConnectorTest.java @@ -15,7 +15,9 @@ package org.eclipse.edc.samples.basic; import org.eclipse.edc.junit.annotations.EndToEndTest; -import org.eclipse.edc.junit.extensions.EdcRuntimeExtension; +import org.eclipse.edc.junit.extensions.EmbeddedRuntime; +import org.eclipse.edc.junit.extensions.RuntimeExtension; +import org.eclipse.edc.junit.extensions.RuntimePerClassExtension; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -28,14 +30,14 @@ class Basic01basicConnectorTest { @RegisterExtension - static EdcRuntimeExtension connector = new EdcRuntimeExtension( - ":basic:basic-01-basic-connector", + static RuntimeExtension connector = new RuntimePerClassExtension(new EmbeddedRuntime( "connector", - emptyMap() - ); + emptyMap(), + ":basic:basic-01-basic-connector" + )); @Test void shouldStartConnector() { - assertThat(connector.getContext().getService(Clock.class)).isNotNull(); + assertThat(connector.getService(Clock.class)).isNotNull(); } } diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/common/NegotiationCommon.java b/system-tests/src/test/java/org/eclipse/edc/samples/common/NegotiationCommon.java index b1aff819..acbf75bb 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/common/NegotiationCommon.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/common/NegotiationCommon.java @@ -31,14 +31,14 @@ public class NegotiationCommon { private static final String CREATE_ASSET_FILE_PATH = "transfer/transfer-01-negotiation/resources/create-asset.json"; private static final String V3_ASSETS_PATH = "/v3/assets"; private static final String CREATE_POLICY_FILE_PATH = "transfer/transfer-01-negotiation/resources/create-policy.json"; - private static final String V2_POLICY_DEFINITIONS_PATH = "/v2/policydefinitions"; + private static final String V2_POLICY_DEFINITIONS_PATH = "/v3/policydefinitions"; private static final String CREATE_CONTRACT_DEFINITION_FILE_PATH = "transfer/transfer-01-negotiation/resources/create-contract-definition.json"; - private static final String V2_CONTRACT_DEFINITIONS_PATH = "/v2/contractdefinitions"; - private static final String V2_CATALOG_DATASET_REQUEST_PATH = "/v2/catalog/dataset/request"; + private static final String V2_CONTRACT_DEFINITIONS_PATH = "/v3/contractdefinitions"; + private static final String V2_CATALOG_DATASET_REQUEST_PATH = "/v3/catalog/dataset/request"; private static final String FETCH_DATASET_FROM_CATALOG_FILE_PATH = "transfer/transfer-01-negotiation/resources/get-dataset.json"; private static final String CATALOG_DATASET_ID = "\"odrl:hasPolicy\".'@id'"; private static final String NEGOTIATE_CONTRACT_FILE_PATH = "transfer/transfer-01-negotiation/resources/negotiate-contract.json"; - private static final String V2_CONTRACT_NEGOTIATIONS_PATH = "/v2/contractnegotiations/"; + private static final String V2_CONTRACT_NEGOTIATIONS_PATH = "/v3/contractnegotiations/"; private static final String CONTRACT_NEGOTIATION_ID = "@id"; private static final String CONTRACT_AGREEMENT_ID = "contractAgreementId"; private static final String CONTRACT_OFFER_ID_KEY = "{{contract-offer-id}}"; diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/common/PolicyCommon.java b/system-tests/src/test/java/org/eclipse/edc/samples/common/PolicyCommon.java index 977b2f3b..77411b80 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/common/PolicyCommon.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/common/PolicyCommon.java @@ -20,8 +20,8 @@ public class PolicyCommon { private static final String V3_ASSETS_PATH = "/v3/assets"; - private static final String V2_POLICY_DEFINITIONS_PATH = "/v2/policydefinitions"; - private static final String V2_CONTRACT_DEFINITIONS_PATH = "/v2/contractdefinitions"; + private static final String V2_POLICY_DEFINITIONS_PATH = "/v3/policydefinitions"; + private static final String V2_CONTRACT_DEFINITIONS_PATH = "/v3/contractdefinitions"; public static void createAsset(String createAssetFilePath) { post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V3_ASSETS_PATH, getFileContentFromRelativePath(createAssetFilePath)); diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/policy/Policy01BasicTest.java b/system-tests/src/test/java/org/eclipse/edc/samples/policy/Policy01BasicTest.java index e52aac2e..55c5c65d 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/policy/Policy01BasicTest.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/policy/Policy01BasicTest.java @@ -15,7 +15,9 @@ package org.eclipse.edc.samples.policy; import org.eclipse.edc.junit.annotations.EndToEndTest; -import org.eclipse.edc.junit.extensions.EdcRuntimeExtension; +import org.eclipse.edc.junit.extensions.EmbeddedRuntime; +import org.eclipse.edc.junit.extensions.RuntimeExtension; +import org.eclipse.edc.junit.extensions.RuntimePerClassExtension; import org.eclipse.edc.samples.common.NegotiationCommon; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @@ -42,14 +44,14 @@ class Policy01BasicTest { private static final String CREATE_CONTRACT_DEFINITION_FILE_PATH = SAMPLE_FOLDER + "/resources/create-contract-definition.json"; private static final String CONTRACT_OFFER_FILE_PATH = SAMPLE_FOLDER + "/resources/contract-request.json"; - @RegisterExtension - static final EdcRuntimeExtension PROVIDER_RUNTIME = provider(); - @Nested class Terminated { @RegisterExtension - static final EdcRuntimeExtension CONSUMER_RUNTIME = consumer("system-tests/src/test/resources/policy/config-us.properties"); + static final RuntimeExtension PROVIDER_RUNTIME = provider(); + + @RegisterExtension + static final RuntimeExtension CONSUMER_RUNTIME = consumer("system-tests/src/test/resources/policy/config-us.properties"); @Test void runSampleSteps() { @@ -70,7 +72,10 @@ void runSampleSteps() { class Finalized { @RegisterExtension - static final EdcRuntimeExtension CONSUMER_RUNTIME = consumer("system-tests/src/test/resources/policy/config-eu.properties"); + static final RuntimeExtension PROVIDER_RUNTIME = provider(); + + @RegisterExtension + static final RuntimeExtension CONSUMER_RUNTIME = consumer("system-tests/src/test/resources/policy/config-eu.properties"); @Test void runSampleSteps() { @@ -85,16 +90,20 @@ void runSampleSteps() { } - private static EdcRuntimeExtension provider() { - return new EdcRuntimeExtension(":policy:policy-01-policy-enforcement:policy-enforcement-provider", + private static RuntimeExtension provider() { + return new RuntimePerClassExtension(new EmbeddedRuntime( "provider", - Map.of("edc.fs.config", getFileFromRelativePath(SAMPLE_FOLDER + "/policy-enforcement-provider/config.properties").getAbsolutePath()) - ); + Map.of("edc.fs.config", getFileFromRelativePath(SAMPLE_FOLDER + "/policy-enforcement-provider/config.properties").getAbsolutePath()), + ":policy:policy-01-policy-enforcement:policy-enforcement-provider" + )); } - private static EdcRuntimeExtension consumer(String configurationFilePath) { - return new EdcRuntimeExtension(":policy:policy-01-policy-enforcement:policy-enforcement-consumer", - "consumer", Map.of("edc.fs.config", getFileFromRelativePath(configurationFilePath).getAbsolutePath())); + private static RuntimeExtension consumer(String configurationFilePath) { + return new RuntimePerClassExtension(new EmbeddedRuntime( + "consumer", + Map.of("edc.fs.config", getFileFromRelativePath(configurationFilePath).getAbsolutePath()), + ":policy:policy-01-policy-enforcement:policy-enforcement-consumer" + )); } } diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer02consumerPullTest.java b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer02consumerPullTest.java index 91b9d8d9..1ae29039 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer02consumerPullTest.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/Transfer02consumerPullTest.java @@ -62,7 +62,7 @@ void runSampleSteps() { var edr = given() .when() - .get(CONSUMER_MANAGEMENT_URL + "/v1/edrs/{id}/dataaddress", transferProcessId) + .get(CONSUMER_MANAGEMENT_URL + "/v3/edrs/{id}/dataaddress", transferProcessId) .then() .log().ifValidationFails() .statusCode(200) diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java index 39627a8d..6b8de79a 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/transfer/streaming/StreamingParticipant.java @@ -50,7 +50,7 @@ public String createPolicyDefinition(String requestBody) { .contentType(JSON) .body(requestBody) .when() - .post("/v2/policydefinitions") + .post("/v3/policydefinitions") .then() .statusCode(200) .contentType(JSON) @@ -62,7 +62,7 @@ public String createContractDefinition(String requestBody) { .contentType(JSON) .body(requestBody) .when() - .post("/v2/contractdefinitions") + .post("/v3/contractdefinitions") .then() .statusCode(200) .extract().jsonPath().getString(ID); diff --git a/system-tests/src/test/java/org/eclipse/edc/samples/util/TransferUtil.java b/system-tests/src/test/java/org/eclipse/edc/samples/util/TransferUtil.java index 802bcbb8..e0a1ed6a 100644 --- a/system-tests/src/test/java/org/eclipse/edc/samples/util/TransferUtil.java +++ b/system-tests/src/test/java/org/eclipse/edc/samples/util/TransferUtil.java @@ -38,7 +38,7 @@ public class TransferUtil { public static final Duration POLL_INTERVAL = Duration.ofMillis(500); private static final String CONTRACT_AGREEMENT_ID_KEY = "{{contract-agreement-id}}"; - private static final String V2_TRANSFER_PROCESSES_PATH = "/v2/transferprocesses/"; + private static final String V2_TRANSFER_PROCESSES_PATH = "/v3/transferprocesses/"; private static final String EDC_STATE = "state"; public static void get(String url) { diff --git a/transfer/streaming/streaming-01-http-to-http/README.md b/transfer/streaming/streaming-01-http-to-http/README.md index 169cff02..9d71bab4 100644 --- a/transfer/streaming/streaming-01-http-to-http/README.md +++ b/transfer/streaming/streaming-01-http-to-http/README.md @@ -49,11 +49,11 @@ curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-htt ``` ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/policy-definition.json -X POST "http://localhost:18181/management/v2/policydefinitions" +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/policy-definition.json -X POST "http://localhost:18181/management/v3/policydefinitions" ``` ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/contract-definition.json -X POST "http://localhost:18181/management/v2/contractdefinitions" +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/contract-definition.json -X POST "http://localhost:18181/management/v3/contractdefinitions" ``` #### Negotiate the contract @@ -61,7 +61,7 @@ The typical flow requires fetching the catalog from the consumer side and using However, in this sample case, we already have the provider asset (`"stream-asset"`) so we can get the related dataset directly with this call: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/get-dataset.json -X POST "http://localhost:28181/management/v2/catalog/dataset/request" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/get-dataset.json -X POST "http://localhost:28181/management/v3/catalog/dataset/request" -s | jq ``` The output will be something like: @@ -98,7 +98,7 @@ The output will be something like: With the `odrl:hasPolicy/@id` we can now replace it in the [negotiate-contract.json](negotiate-contract.json) file and request the contract negotiation: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/negotiate-contract.json -X POST "http://localhost:28181/management/v2/contractnegotiations" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/negotiate-contract.json -X POST "http://localhost:28181/management/v3/contractnegotiations" -s | jq ``` ### Start the transfer @@ -113,13 +113,13 @@ It will run on port 4000. At this point the contract agreement should already been issued, to verify that, please check the contract negotiation state with this call, replacing `{{contract-negotiation-id}}` with the id returned by the negotiate contract call. ```shell -curl "http://localhost:28181/management/v2/contractnegotiations/{{contract-negotiation-id}}" -s | jq +curl "http://localhost:28181/management/v3/contractnegotiations/{{contract-negotiation-id}}" -s | jq ``` If the `edc:contractAgreementId` is valued, it can be used to start the transfer, replacing it in the [transfer.json](transfer.json) file to `{{contract-agreement-id}}` and then calling the connector with this command: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/transfer.json -X POST "http://localhost:28181/management/v2/transferprocesses" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-http-to-http/transfer.json -X POST "http://localhost:28181/management/v3/transferprocesses" -s | jq ``` > Note that the destination address is `localhost:4000`, this because is where our logging webserver is listening. @@ -127,7 +127,7 @@ curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-01-htt Let's wait until the transfer state is `STARTED` state executing this call, replacing to `{{transfer-process-id}}` the id returned by the start transfer call: ```shell -curl "http://localhost:28181/management/v2/transferprocesses/{{transfer-process-id}}" -s | jq +curl "http://localhost:28181/management/v3/transferprocesses/{{transfer-process-id}}" -s | jq ``` Here we can test the transfer creating a file into the `source` folder that we configured before, e.g. copying the `README.md` diff --git a/transfer/streaming/streaming-02-kafka-to-http/README.md b/transfer/streaming/streaming-02-kafka-to-http/README.md index 9ded22d2..a41a9b68 100644 --- a/transfer/streaming/streaming-02-kafka-to-http/README.md +++ b/transfer/streaming/streaming-02-kafka-to-http/README.md @@ -53,11 +53,11 @@ curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kaf ``` ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/2-policy-definition.json -X POST "http://localhost:18181/management/v2/policydefinitions" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/2-policy-definition.json -X POST "http://localhost:18181/management/v3/policydefinitions" -s | jq ``` ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/3-contract-definition.json -X POST "http://localhost:18181/management/v2/contractdefinitions" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/3-contract-definition.json -X POST "http://localhost:18181/management/v3/contractdefinitions" -s | jq ``` ### Negotiate the contract @@ -66,7 +66,7 @@ The typical flow requires fetching the catalog from the consumer side and using However, in this sample case, we already have the provider asset (`"kafka-stream-asset"`) so we can get the related dataset directly with this call: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/4-get-dataset.json -X POST "http://localhost:28181/management/v2/catalog/dataset/request" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/4-get-dataset.json -X POST "http://localhost:28181/management/v3/catalog/dataset/request" -s | jq ``` The output will be something like: @@ -103,7 +103,7 @@ The output will be something like: With the `odrl:hasPolicy/@id` we can now replace it in the [negotiate-contract.json](5-negotiate-contract.json) file and request the contract negotiation: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/5-negotiate-contract.json -X POST "http://localhost:28181/management/v2/contractnegotiations" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/5-negotiate-contract.json -X POST "http://localhost:28181/management/v3/contractnegotiations" -s | jq ``` ### Start the transfer @@ -119,20 +119,20 @@ It will run on port 4000. At this point the contract agreement should already been issued, to verify that, please check the contract negotiation state with this call, replacing `{{contract-negotiation-id}}` with the id returned by the negotiate contract call. ```shell -curl "http://localhost:28181/management/v2/contractnegotiations/{{contract-negotiation-id}}" -s | jq +curl "http://localhost:28181/management/v3/contractnegotiations/{{contract-negotiation-id}}" -s | jq ``` If the `edc:contractAgreementId` is valued, it can be used to start the transfer, replacing it in the [6-transfer.json](6-transfer.json) file to `{{contract-agreement-id}}` and then calling the connector with this command: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/6-transfer.json -X POST "http://localhost:28181/management/v2/transferprocesses" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-02-kafka-to-http/6-transfer.json -X POST "http://localhost:28181/management/v3/transferprocesses" -s | jq ``` > Note that the destination address is `localhost:4000`, this because is where our logging webserver is listening. Let's wait until the transfer state is `STARTED` state executing this call, replacing to `{{transfer-process-id}}` the id returned by the start transfer call: ```shell -curl "http://localhost:28181/management/v2/transferprocesses/{{transfer-process-id}}" -s | jq +curl "http://localhost:28181/management/v3/transferprocesses/{{transfer-process-id}}" -s | jq ``` ### Produce events diff --git a/transfer/streaming/streaming-03-kafka-broker/README.md b/transfer/streaming/streaming-03-kafka-broker/README.md index 7273196a..db80aef7 100644 --- a/transfer/streaming/streaming-03-kafka-broker/README.md +++ b/transfer/streaming/streaming-03-kafka-broker/README.md @@ -95,11 +95,11 @@ curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kaf ``` ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/2-policy-definition.json -X POST "http://localhost:18181/management/v2/policydefinitions" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/2-policy-definition.json -X POST "http://localhost:18181/management/v3/policydefinitions" -s | jq ``` ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/3-contract-definition.json -X POST "http://localhost:18181/management/v2/contractdefinitions" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/3-contract-definition.json -X POST "http://localhost:18181/management/v3/contractdefinitions" -s | jq ``` ### Negotiate the contract @@ -108,7 +108,7 @@ The typical flow requires fetching the catalog from the consumer side and using However, in this sample case, we already have the provider asset (`"kafka-stream-asset"`) so we can get the related dataset directly with this call: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/4-get-dataset.json -X POST "http://localhost:28181/management/v2/catalog/dataset/request" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/4-get-dataset.json -X POST "http://localhost:28181/management/v3/catalog/dataset/request" -s | jq ``` The output will be something like: @@ -139,7 +139,7 @@ The output will be something like: With the `odrl:hasPolicy/@id` we can now replace it in the [negotiate-contract.json](5-negotiate-contract.json) file and negotiate the contract: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/5-negotiate-contract.json -X POST "http://localhost:28181/management/v2/contractnegotiations" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/5-negotiate-contract.json -X POST "http://localhost:28181/management/v3/contractnegotiations" -s | jq ``` ### Start the transfer @@ -156,20 +156,20 @@ It will run on port 4000. At this point the contract agreement should already been issued, to verify that, please check the contract negotiation state with this call, replacing `{{contract-negotiation-id}}` with the id returned by the negotiate contract call. ```shell -curl "http://localhost:28181/management/v2/contractnegotiations/{{contract-negotiation-id}}" -s | jq +curl "http://localhost:28181/management/v3/contractnegotiations/{{contract-negotiation-id}}" -s | jq ``` If the `edc:contractAgreementId` is valued, it can be used to start the transfer, replacing it in the [6-transfer.json](6-transfer.json) file to `{{contract-agreement-id}}` and then calling the connector with this command: ```shell -curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/6-transfer.json -X POST "http://localhost:28181/management/v2/transferprocesses" -s | jq +curl -H 'Content-Type: application/json' -d @transfer/streaming/streaming-03-kafka-broker/6-transfer.json -X POST "http://localhost:28181/management/v3/transferprocesses" -s | jq ``` > Note that the destination address is `localhost:4000`, this because is where our logging webserver is listening. Let's wait until the transfer state is `STARTED` state executing this call, replacing to `{{transfer-process-id}}` the id returned by the start transfer call: ```shell -curl "http://localhost:28181/management/v2/transferprocesses/{{transfer-process-id}}" -s | jq +curl "http://localhost:28181/management/v3/transferprocesses/{{transfer-process-id}}" -s | jq ``` ### Consume events diff --git a/transfer/transfer-00-prerequisites/connector/build.gradle.kts b/transfer/transfer-00-prerequisites/connector/build.gradle.kts index 36c0d111..5018d8b4 100644 --- a/transfer/transfer-00-prerequisites/connector/build.gradle.kts +++ b/transfer/transfer-00-prerequisites/connector/build.gradle.kts @@ -19,6 +19,7 @@ plugins { } dependencies { + implementation(libs.edc.control.api.configuration) implementation(libs.edc.control.plane.api.client) implementation(libs.edc.control.plane.api) implementation(libs.edc.control.plane.core) diff --git a/transfer/transfer-01-negotiation/README.md b/transfer/transfer-01-negotiation/README.md index 01dbebf2..bed0c671 100644 --- a/transfer/transfer-01-negotiation/README.md +++ b/transfer/transfer-01-negotiation/README.md @@ -67,7 +67,7 @@ This means that the consumer connector can request any asset from the provider c ```bash curl -d @transfer/transfer-01-negotiation/resources/create-policy.json \ - -H 'content-type: application/json' http://localhost:19193/management/v2/policydefinitions \ + -H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \ -s | jq ``` @@ -80,7 +80,7 @@ catalog. In this case, the selection is empty, so every asset is attached to the ```bash curl -d @transfer/transfer-01-negotiation/resources/create-contract-definition.json \ - -H 'content-type: application/json' http://localhost:19193/management/v2/contractdefinitions \ + -H 'content-type: application/json' http://localhost:19193/management/v3/contractdefinitions \ -s | jq ``` @@ -104,7 +104,7 @@ offer, the so-called "catalog". To get the catalog from the consumer side, you c request: ```bash -curl -X POST "http://localhost:29193/management/v2/catalog/request" \ +curl -X POST "http://localhost:29193/management/v3/catalog/request" \ -H 'Content-Type: application/json' \ -d @transfer/transfer-01-negotiation/resources/fetch-catalog.json -s | jq ``` @@ -186,7 +186,7 @@ file with the contract offer id you found in the catalog at the path `dcat:datas ```bash curl -d @transfer/transfer-01-negotiation/resources/negotiate-contract.json \ - -X POST -H 'content-type: application/json' http://localhost:29193/management/v2/contractnegotiations \ + -X POST -H 'content-type: application/json' http://localhost:29193/management/v3/contractnegotiations \ -s | jq ``` @@ -211,7 +211,7 @@ state, the negotiation is finished. We can now use the UUID to check the current negotiation using an endpoint on the consumer side. ```bash -curl -X GET "http://localhost:29193/management/v2/contractnegotiations/{{contract-negotiation-id}}" \ +curl -X GET "http://localhost:29193/management/v3/contractnegotiations/{{contract-negotiation-id}}" \ --header 'Content-Type: application/json' \ -s | jq ``` diff --git a/transfer/transfer-02-consumer-pull/README.md b/transfer/transfer-02-consumer-pull/README.md index 0c8706cb..86dda9ed 100644 --- a/transfer/transfer-02-consumer-pull/README.md +++ b/transfer/transfer-02-consumer-pull/README.md @@ -30,7 +30,7 @@ provider connector and where we want the file transferred. Before executing the request, insert the `contractAgreementId` from the previous chapter. Then run: ```bash -curl -X POST "http://localhost:29193/management/v2/transferprocesses" \ +curl -X POST "http://localhost:29193/management/v3/transferprocesses" \ -H "Content-Type: application/json" \ -d @transfer/transfer-02-consumer-pull/resources/start-transfer.json \ -s | jq @@ -62,7 +62,7 @@ Due to the nature of the transfer, it will be very fast and most likely already read the UUID. ```bash -curl http://localhost:29193/management/v2/transferprocesses/ +curl http://localhost:29193/management/v3/transferprocesses/ ``` You should see the Transfer Process in `STARTED` state: @@ -85,7 +85,7 @@ You should see the Transfer Process in `STARTED` state: At this step, an EndpointDataReference would have been generated by the provider and sent to the consumer. The latter stored it in a cache, so we can obtain it using the transfer process id: ```bash -curl http://localhost:29193/management/v1/edrs//dataaddress | jq +curl http://localhost:29193/management/v3/edrs//dataaddress | jq ``` ```json diff --git a/transfer/transfer-03-provider-push/README.md b/transfer/transfer-03-provider-push/README.md index 98216af4..f3c7adab 100644 --- a/transfer/transfer-03-provider-push/README.md +++ b/transfer/transfer-03-provider-push/README.md @@ -41,7 +41,7 @@ from the [Negotiation](../transfer-01-negotiation/README.md) chapter. You can re-use the same asset, policies and contract negotiation from before. ```bash -curl -X POST "http://localhost:29193/management/v2/transferprocesses" \ +curl -X POST "http://localhost:29193/management/v3/transferprocesses" \ -H "Content-Type: application/json" \ -d @transfer/transfer-03-provider-push/resources/start-transfer.json \ -s | jq @@ -66,7 +66,7 @@ Due to the nature of the transfer, it will be very fast and most likely already read the UUID. ```bash -curl http://localhost:29193/management/v2/transferprocesses/ +curl http://localhost:29193/management/v3/transferprocesses/ ``` Notice the transfer COMPLETED state diff --git a/transfer/transfer-04-event-consumer/README.md b/transfer/transfer-04-event-consumer/README.md index dd308696..0f3d9cc3 100644 --- a/transfer/transfer-04-event-consumer/README.md +++ b/transfer/transfer-04-event-consumer/README.md @@ -71,14 +71,14 @@ java -Dedc.keystore=transfer/transfer-00-prerequisites/resources/certs/cert.pfx ```bash curl -d @transfer/transfer-01-negotiation/resources/negotiate-contract.json \ - -X POST -H 'content-type: application/json' http://localhost:29193/management/v2/contractnegotiations \ + -X POST -H 'content-type: application/json' http://localhost:29193/management/v3/contractnegotiations \ -s | jq ``` ### 3. Get the contract agreement id ```bash -curl -X GET "http://localhost:29193/management/v2/contractnegotiations/{{contract-negotiation-id}}" \ +curl -X GET "http://localhost:29193/management/v3/contractnegotiations/{{contract-negotiation-id}}" \ --header 'Content-Type: application/json' \ -s | jq ``` @@ -89,7 +89,7 @@ Replace the `contractId` property inside the [request body](../transfer-02-consu Afterward run: ```bash -curl -X POST "http://localhost:29193/management/v2/transferprocesses" \ +curl -X POST "http://localhost:29193/management/v3/transferprocesses" \ -H "Content-Type: application/json" \ -d @transfer/transfer-02-consumer-pull/resources/start-transfer.json \ -s | jq diff --git a/transfer/transfer-05-file-transfer-cloud/README.md b/transfer/transfer-05-file-transfer-cloud/README.md index 4babeb2c..353d0f8e 100644 --- a/transfer/transfer-05-file-transfer-cloud/README.md +++ b/transfer/transfer-05-file-transfer-cloud/README.md @@ -99,7 +99,7 @@ java -Dedc.fs.config=transfer/transfer-05-file-transfer-cloud/cloud-transfer-pro To request data offers from the provider, run: ```bash -curl -X POST "http://localhost:9192/management/v2/catalog/request" \ +curl -X POST "http://localhost:9192/management/v3/catalog/request" \ --header 'X-Api-Key: password' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -117,7 +117,7 @@ To negotiate a contract copy one of the contract offers into the statement below it is only possible to negotiate an _unchanged_ contract, so counter offers are not supported. ```bash -curl --location --request POST 'http://localhost:9192/management/v2/contractnegotiations' \ +curl --location --request POST 'http://localhost:9192/management/v3/contractnegotiations' \ --header 'X-API-Key: password' \ --header 'Content-Type: application/json' \ --data-raw '{ @@ -135,7 +135,7 @@ The EDC will answer with the contract negotiation id. This id will be used in st To get the contract agreement id insert the negotiation id into the following statement end execute it. ```bash -curl -X GET -H 'X-Api-Key: password' "http://localhost:9192/management/v2/contractnegotiations/{negotiationId}" +curl -X GET -H 'X-Api-Key: password' "http://localhost:9192/management/v3/contractnegotiations/{negotiationId}" ``` The EDC will return the current state of the contract negotiation. When the negotiation is completed successfully @@ -147,7 +147,7 @@ To initiate the data transfer, execute the statement below. Please take care of obtained at previous step as well as a unique bucket name. ```bash -curl --location --request POST 'http://localhost:9192/management/v2/transferprocesses' \ +curl --location --request POST 'http://localhost:9192/management/v3/transferprocesses' \ --header 'X-API-Key: password' \ --header 'Content-Type: application/json' \ --data-raw ' @@ -177,7 +177,7 @@ Deprovisioning is not necessary per se, but it will do some cleanup, delete the it's generally advisable to do it. ```bash -curl -X POST -H 'X-Api-Key: password' "http://localhost:9192/management/v2/transferprocesses/{transferProcessId}/deprovision" +curl -X POST -H 'X-Api-Key: password' "http://localhost:9192/management/v3/transferprocesses/{transferProcessId}/deprovision" ``` Finally, run terraform to clean-up the vault and other remaining stuffs: