Skip to content

Commit

Permalink
[FAB-7750] E2E with support to FAB-5664
Browse files Browse the repository at this point in the history
This change-set does the following:
- it modifies the e2e_cli to show how to use FAB-5664.
Namely, the identity classification is enabled by
setting EnableNodeOUs to true in crypto-config.yaml.
Then, the endorsement policy is changed to requires
peers and not members.

This is a joint work with Srinivasan Muralidharan.

Change-Id: Ia87c5a02e811266fa98af367e6012032e6e61e52
Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
  • Loading branch information
adecaro authored and denyeart committed Feb 16, 2018
1 parent 6b23bfa commit bbc66fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions examples/e2e_cli/crypto-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ PeerOrgs:
# ---------------------------------------------------------------------------
- Name: Org1
Domain: org1.example.com
EnableNodeOUs: true
CA:
Country: US
Province: California
Expand Down Expand Up @@ -83,6 +84,7 @@ PeerOrgs:
# ---------------------------------------------------------------------------
- Name: Org2
Domain: org2.example.com
EnableNodeOUs: true
CA:
Country: US
Province: California
Expand Down
6 changes: 3 additions & 3 deletions examples/e2e_cli/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ instantiateChaincode () {
# while 'peer chaincode' command can get the orderer endpoint from the peer (if join was successful),
# lets supply it directly as we know it using the "-o" option
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
peer chaincode instantiate -o orderer.example.com:7050 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')" >&log.txt
peer chaincode instantiate -o orderer.example.com:7050 -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')" >&log.txt
else
peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')" >&log.txt
peer chaincode instantiate -o orderer.example.com:7050 --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n mycc -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P "OR ('Org1MSP.peer','Org2MSP.peer')" >&log.txt
fi
res=$?
cat log.txt
Expand Down Expand Up @@ -235,7 +235,7 @@ updateAnchorPeers 2
## Install chaincode on Peer0/Org1 and Peer2/Org2
echo "Installing chaincode on org1/peer0..."
installChaincode 0
echo "Install chaincode on org2/peer2..."
echo "Install chaincode on org2/peer0..."
installChaincode 2

#Instantiate chaincode on Peer2/Org2
Expand Down

0 comments on commit bbc66fb

Please sign in to comment.