Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit bc738a3

Browse files
author
Simon Stone
authored
Merge pull request #146 from sstone1/issue-127
Add collections config file option to smart contract (resolves #127)
2 parents 985bad0 + 557b30a commit bc738a3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ Example Playbook
316316
- <<: *channel1
317317
# The endorsement policy for this contract on this channel.
318318
endorsement_policy: "AND('Org1MSP.peer')"
319+
# The path to the file containing the private data collection configuration
320+
# for this contract on this channel.
321+
collections_config: "{{ playbook_dir }}/collections-config.json"
319322
# The list of endorsing members for this contract on this channel.
320323
endorsing_members:
321324
# Reference to the organization Org1.

tasks/manage-contract/instantiate-contract.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
-v {{ contract.version }}
4545
-P {{ channel.endorsement_policy | quote }}
4646
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
47+
{{ '--collections-config "' + channel.collections_config + '"' if channel.collections_config is defined else '' }}
4748
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
4849
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
4950
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
@@ -65,6 +66,7 @@
6566
-v {{ contract.version }}
6667
-P {{ channel.endorsement_policy | quote }}
6768
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
69+
{{ '--collections-config "' + channel.collections_config + '"' if channel.collections_config is defined else '' }}
6870
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
6971
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
7072
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}

0 commit comments

Comments
 (0)