Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Oasees On Boarding
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iturraspe Barturen, Urtza
Oasees On Boarding
Commits
a0eeff2b
Commit
a0eeff2b
authored
8 months ago
by
Iturraspe Barturen, Urtza
Browse files
Options
Downloads
Patches
Plain Diff
Generate contract definition for all asswts
parent
c4b90b9f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
API_OASEES/app/utils/create_contract_definition.py
+16
-2
16 additions, 2 deletions
API_OASEES/app/utils/create_contract_definition.py
with
16 additions
and
2 deletions
API_OASEES/app/utils/create_contract_definition.py
+
16
−
2
View file @
a0eeff2b
...
...
@@ -45,8 +45,22 @@ def invoke_create_contract_definition_equal(contract_id, policy_id, asset_id):
def
generate_contract_metadata
(
contract_id
,
policy_id
,
asset_id
):
contract_metadata
=
{
"
@context
"
:
{
"
edc
"
:
"
https://w3id.org/edc/v0.0.1/ns/
"
},
"
@id
"
:
contract_id
,
"
accessPolicyId
"
:
policy_id
,
"
contractPolicyId
"
:
policy_id
,
"
assetsSelector
"
:
[]
}
return
contract_metadata
"""
def generate_contract_metadata(contract_id, policy_id, asset_id):
contract_metadata = {
"
@context
"
: {
"
edc
"
:
"
https://w3id.org/edc/v0.0.1/ns/
"
...
...
@@ -61,7 +75,7 @@ def generate_contract_metadata(contract_id, policy_id, asset_id):
"
edc:operandRight
"
: asset_id
}
}
return
contract_metadata
return contract_metadata
"""
def
generate_contract_metadata_equal
(
contract_id
,
policy_id
,
asset_id
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment