Skip to content

Commit

Permalink
build(deps): bump edc from 0.5.1 to 0.6.0 (#230)
Browse files Browse the repository at this point in the history
* build(deps): bump edc from 0.5.1 to 0.6.0

Bumps `edc` from 0.5.1 to 0.6.0.

Updates `org.eclipse.edc:api-core` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:api-observability` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:auth-tokenbased` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:boot` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/GradlePlugins/releases)
- [Commits](eclipse-edc/GradlePlugins@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:configuration-filesystem` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:connector-core` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:control-plane-api-client` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:control-plane-api` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:control-plane-core` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:control-plane-spi` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-control-api` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-public-api` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-aws-s3` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Technology-Aws/releases)
- [Commits](eclipse-edc/Technology-Aws@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-azure-storage` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Technology-Azure/releases)
- [Commits](eclipse-edc/Technology-Azure@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-client` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-core` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-http` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-kafka` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-selector-api` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-selector-core` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-spi` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:data-plane-util` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:dsp` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:http` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:iam-mock` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:jersey-micrometer` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:jetty-micrometer` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:json-ld` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:junit` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:management-api` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:micrometer-core` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:monitor-jdk-logger` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:provision-aws-s3` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Technology-Aws/releases)
- [Commits](eclipse-edc/Technology-Aws@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:runtime-metamodel` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:transfer-data-plane` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:transfer-process-api` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:transfer-pull-http-receiver` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:transfer-pull-http-dynamic-receiver` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:util` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:vault-azure` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Technology-Azure/releases)
- [Commits](eclipse-edc/Technology-Azure@v0.5.1...v0.6.0)

Updates `org.eclipse.edc:vault-filesystem` from 0.5.1 to 0.6.0
- [Release notes](https://github.com/eclipse-edc/Connector/releases)
- [Commits](eclipse-edc/Connector@v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: org.eclipse.edc:api-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:api-observability
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:auth-tokenbased
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:boot
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:configuration-filesystem
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:connector-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:control-plane-api-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:control-plane-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:control-plane-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:control-plane-spi
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-control-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-public-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-aws-s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-azure-storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-http
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-kafka
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-selector-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-selector-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-spi
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:data-plane-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:dsp
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:http
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:iam-mock
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:jersey-micrometer
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:jetty-micrometer
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:json-ld
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:junit
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:management-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:micrometer-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:monitor-jdk-logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:provision-aws-s3
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:runtime-metamodel
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:transfer-data-plane
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:transfer-process-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:transfer-pull-http-receiver
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:transfer-pull-http-dynamic-receiver
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:util
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:vault-azure
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.eclipse.edc:vault-filesystem
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* adapt

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ndr_brt <[email protected]>
  • Loading branch information
dependabot[bot] and ndr-brt authored Mar 29, 2024
1 parent 37382c4 commit e9d9ef7
Show file tree
Hide file tree
Showing 30 changed files with 238 additions and 248 deletions.
1 change: 1 addition & 0 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Test Code (Style, Tests)

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
paths-ignore:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "NegotiationInitiateRequestDto",
"connectorId": "provider",
"@type": "ContractRequest",
"counterPartyAddress": "http://provider:19194/protocol",
"consumerId": "consumer",
"providerId": "provider",
"protocol": "dataspace-protocol-http",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@id": "{{contract-offer-id}}",
"@type": "Set",
"@type": "Offer",
"permission": [],
"prohibition": [],
"obligation": [],
"assigner": "provider",
"target": "assetId"
}
}
14 changes: 9 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,12 @@ allprojects {
}

configure<org.eclipse.edc.plugins.edcbuild.extensions.BuildExtension> {
versions {
// override default dependency versions here
metaModel.set(edcVersion)
}
publish.set(false)
}

configure<CheckstyleExtension> {
configFile = rootProject.file("resources/edc-checkstyle-config.xml")
configDirectory.set(rootProject.file("resources"))
maxWarnings = 0
}

// EdcRuntimeExtension uses this to determine the runtime classpath of the module to run.
Expand All @@ -58,4 +53,13 @@ allprojects {
println(sourceSets["main"].runtimeClasspath.asPath)
}
}

tasks.test {
testLogging {
showStandardStreams = true
}
}

}


5 changes: 3 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ format.version = "1.1"
[versions]
assertj = "3.25.3"
awaitility = "4.2.1"
edc = "0.5.1"
edc = "0.6.0"
jakarta-json = "2.0.1"
junit-pioneer = "2.2.0"
jupiter = "5.10.2"
Expand Down Expand Up @@ -45,7 +45,8 @@ edc-http = { module = "org.eclipse.edc:http", version.ref = "edc" }
edc-iam-mock = { module = "org.eclipse.edc:iam-mock", version.ref = "edc" }
edc-jersey-micrometer = { module = "org.eclipse.edc:jersey-micrometer", version.ref = "edc" }
edc-jetty-micrometer = { module = "org.eclipse.edc:jetty-micrometer", version.ref = "edc" }
edc-json-ld = { module = "org.eclipse.edc:json-ld", version.ref = "edc" }
edc-json-ld-lib = { module = "org.eclipse.edc:json-ld-lib", version.ref = "edc" }
edc-json-ld-spi = { module = "org.eclipse.edc:json-ld-spi", version.ref = "edc" }
edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" }
edc-management-api = { module = "org.eclipse.edc:management-api", version.ref = "edc" }
edc-micrometer-core = { module = "org.eclipse.edc:micrometer-core", version.ref = "edc" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ 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)
implementation(libs.edc.iam.mock)
implementation(libs.edc.http)
}

application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ 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)
implementation(libs.edc.iam.mock)
implementation(libs.edc.http)

implementation(project(":policy:policy-01-policy-enforcement:policy-functions"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {

dependencies {
api(libs.edc.data.plane.spi)
api(libs.edc.json.ld.spi)

implementation(libs.edc.control.plane.core)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
import org.eclipse.edc.spi.system.ServiceExtensionContext;

import static org.eclipse.edc.connector.contract.spi.validation.ContractValidationService.NEGOTIATION_SCOPE;
import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.ODRL_USE_ACTION_ATTRIBUTE;
import static org.eclipse.edc.policy.engine.spi.PolicyEngine.ALL_SCOPES;
import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE;

public class PolicyFunctionsExtension implements ServiceExtension {
private static final String LOCATION_CONSTRAINT_KEY = "location";
private static final String LOCATION_CONSTRAINT_KEY = EDC_NAMESPACE + "location";

@Inject
private RuleBindingRegistry ruleBindingRegistry;
Expand All @@ -41,7 +43,7 @@ public String name() {
public void initialize(ServiceExtensionContext context) {
var monitor = context.getMonitor();

ruleBindingRegistry.bind("use", ALL_SCOPES);
ruleBindingRegistry.bind(ODRL_USE_ACTION_ATTRIBUTE, ALL_SCOPES);
ruleBindingRegistry.bind(LOCATION_CONSTRAINT_KEY, NEGOTIATION_SCOPE);
policyEngine.registerFunction(ALL_SCOPES, Permission.class, LOCATION_CONSTRAINT_KEY, new LocationConstraintFunction(monitor));
}
Expand Down
48 changes: 20 additions & 28 deletions policy/policy-01-policy-enforcement/resources/contract-request.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
{
"@context": {
"edc": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "NegotiationInitiateRequestDto",
"connectorId": "provider",
"consumerId": "consumer",
"providerId": "provider",
"connectorAddress": "http://localhost:19194/protocol",
"@type": "ContractRequest",
"counterPartyAddress": "http://localhost:19194/protocol",
"protocol": "dataspace-protocol-http",
"offer": {
"offerId": "1:test-document:3a75736e-001d-4364-8bd4-9888490edb58",
"assetId": "test-document",
"policy": {
"@id": "1:test-document:13dce0f1-52ed-4554-a194-e83e92733ee5",
"@type": "Set",
"odrl:permission": [
{
"odrl:action": "use",
"odrl:target": "test-document",
"odrl:constraint": {
"@type": "AtomicConstraint",
"odrl:leftOperand": "location",
"odrl:operator": {
"@id": "odrl:eq"
},
"odrl:rightOperand": "eu"
}
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@id": "1:test-document:13dce0f1-52ed-4554-a194-e83e92733ee5",
"@type": "Offer",
"permission": [
{
"action": "use",
"target": "test-document",
"constraint": {
"@type": "AtomicConstraint",
"leftOperand": "location",
"operator": "eq",
"rightOperand": "eu"
}
],
"odrl:target": "test-document"
}
}
],
"assigner": "provider",
"target": "test-document"
}
}
20 changes: 10 additions & 10 deletions policy/policy-01-policy-enforcement/resources/create-policy.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "eu-policy",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Set",
"odrl:permission": [
"permission": [
{
"odrl:action": "use",
"odrl:constraint": {
"action": "use",
"constraint": {
"@type": "AtomicConstraint",
"odrl:leftOperand": "location",
"odrl:operator": {
"leftOperand": "location",
"operator": {
"@id": "odrl:eq"
},
"odrl:rightOperand": "eu"
"rightOperand": "eu"
}
}
],
"odrl:prohibition": [],
"odrl:obligation": []
"prohibition": [],
"obligation": []
}
}
3 changes: 2 additions & 1 deletion system-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ plugins {

dependencies {
testImplementation(libs.edc.junit)
testImplementation(libs.edc.json.ld)
testImplementation(libs.edc.json.ld.lib)
testImplementation(libs.edc.json.ld.spi)
testImplementation(libs.edc.control.plane.spi)
testImplementation(libs.awaitility)
testImplementation(libs.okhttp.mockwebserver)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,16 @@ public static String negotiateContract(String negotiateContractFilePath, String
}

public static String getContractAgreementId(String contractNegotiationId) {
String url = PrerequisitesCommon.CONSUMER_MANAGEMENT_URL + V2_CONTRACT_NEGOTIATIONS_PATH + contractNegotiationId;
var url = PrerequisitesCommon.CONSUMER_MANAGEMENT_URL + V2_CONTRACT_NEGOTIATIONS_PATH + contractNegotiationId;
return await()
.atMost(TIMEOUT)
.pollInterval(POLL_INTERVAL)
.until(() -> get(url, CONTRACT_AGREEMENT_ID), Objects::nonNull);
}
public static void checkContractNegotiationState(String contractNegotiationId, String expectedState) {

public static String getContractNegotiationState(String contractNegotiationId) {
var url = PrerequisitesCommon.CONSUMER_MANAGEMENT_URL + V2_CONTRACT_NEGOTIATIONS_PATH + contractNegotiationId;

await()
.atMost(TIMEOUT)
.pollInterval(POLL_INTERVAL)
.until(() -> get(url, "state"), state -> state.equals(expectedState));
return get(url, "state");
}

public static String runNegotiation() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,21 @@
import static org.eclipse.edc.samples.util.TransferUtil.post;

public class PolicyCommon {

private static final String CREATE_ASSET_FILE_PATH = "policy/policy-01-policy-enforcement/resources/create-asset.json";

private static final String V3_ASSETS_PATH = "/v3/assets";
private static final String CREATE_POLICY_FILE_PATH = "policy/policy-01-policy-enforcement/resources/create-policy.json";
private static final String V2_POLICY_DEFINITIONS_PATH = "/v2/policydefinitions";
private static final String CREATE_CONTRACT_DEFINITION_FILE_PATH = "policy/policy-01-policy-enforcement/resources/create-contract-definition.json";
private static final String V2_CONTRACT_DEFINITIONS_PATH = "/v2/contractdefinitions";

public static void createAsset() {
post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V3_ASSETS_PATH, getFileContentFromRelativePath(CREATE_ASSET_FILE_PATH));
public static void createAsset(String createAssetFilePath) {
post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V3_ASSETS_PATH, getFileContentFromRelativePath(createAssetFilePath));
}

public static void createPolicy() {
post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V2_POLICY_DEFINITIONS_PATH, getFileContentFromRelativePath(CREATE_POLICY_FILE_PATH));
public static void createPolicy(String createPolicyFilePath) {
post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V2_POLICY_DEFINITIONS_PATH, getFileContentFromRelativePath(createPolicyFilePath));
}

public static void createContractDefinition() {
post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V2_CONTRACT_DEFINITIONS_PATH, getFileContentFromRelativePath(CREATE_CONTRACT_DEFINITION_FILE_PATH));
public static void createContractDefinition(String createContractDefinitionFilePath) {
post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V2_CONTRACT_DEFINITIONS_PATH, getFileContentFromRelativePath(createContractDefinitionFilePath));
}

}

This file was deleted.

Loading

0 comments on commit e9d9ef7

Please sign in to comment.