Skip to content

Commit

Permalink
Update cli-validation.md (hyperledger-archives#2131)
Browse files Browse the repository at this point in the history
Changed mySecret to adminpw on line 38 to counter authorisation error. 
Replaced instances of PeerAdmin with admin after the BNA has been deployed.
  • Loading branch information
EllisHenderson authored and Simon Stone committed Sep 20, 2017
1 parent 1747950 commit c363bd4
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions contrib-notes/release-process/cli-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,36 +35,36 @@ Obtain two BNA files from the [Composer Playground on Bluemix](http://composer-p
- deploy the new BNA ``` composer network deploy -a v1_bna -i PeerAdmin -s mySecret -p hlfv1 ```

2) Check the network
- ping: ``` composer network ping -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list assets ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s silent -r org.acme.sample.SampleAsset ```
- ping: ``` composer network ping -n basic-sample-network -p hlfv1 -i admin -s adminpw ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i admin -s mySecret ```
- list assets ``` composer network list -n basic-sample-network -p hlfv1 -i admin -s silent -r org.acme.sample.SampleAsset ```

3) Update with the edited BNA
- update ``` composer network update -i PeerAdmin -s silent -p hlfv1 -a v2_bna ```
- ping ``` composer network ping -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- ping ``` composer network ping -n basic-sample-network -p hlfv1 -i admin -s mySecret ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i admin -s mySecret ```
- check that the new items are listed

4) Create and check participants
- create first ``` composer participant add -n basic-sample-network -p hlfv1 -i PeerAdmin -s secret -d '{"$class":"org.acme.sample.SampleParticipant","participantId":"bob","firstName":"bob","lastName":"bobbington"}' ```
- create second ``` composer participant add -n basic-sample-network -p hlfv1 -i PeerAdmin -s secret -d '{"$class": "org.acme.sample.SampleParticipant","participantId": "participantId:111","firstName": "sally","lastName": "sallyington"}' ```
- check ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s silent ```
- create first ``` composer participant add -n basic-sample-network -p hlfv1 -i admin -s secret -d '{"$class":"org.acme.sample.SampleParticipant","participantId":"bob","firstName":"bob","lastName":"bobbington"}' ```
- create second ``` composer participant add -n basic-sample-network -p hlfv1 -i admin -s secret -d '{"$class": "org.acme.sample.SampleParticipant","participantId": "participantId:111","firstName": "sally","lastName": "sallyington"}' ```
- check ``` composer network list -n basic-sample-network -p hlfv1 -i admin -s silent ```

5) Submit a transaction
- formulate a valid transaction, eg ``` {"$class": "org.acme.sample.SampleAsset","assetId": "newAsset","owner": "resource:org.acme.sample.SampleParticipant#bob","value": "101"} ``` for basic-sample-network asset creation
- run it ``` composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s admin pw -d '{the transaction}' ```
- run it ``` composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s mySecret -d '{the transaction}' ```
- formulate an interaction transaction eg ``` {"$class": "org.acme.sample.SampleTransaction","asset": "resource:org.acme.sample.SampleAsset#newAsset","newValue": "1300"} ```
- run it ``` composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s admin pw -d '{the transaction}' ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list assets ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s silent -r org.acme.sample.SampleAsset ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i admin -s mySecret ```
- list assets ``` composer network list -n basic-sample-network -p hlfv1 -i admin -s silent -r org.acme.sample.SampleAsset ```

6) Work with IDs
- list current IDs ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ```
- list current IDs ``` composer identity list -i admin -n basic-sample-network -p hlfv1 -s secret ```
- issue to bob ``` composer identity issue -p hlfv1 -n basic-sample-network -i admin -u newUser1 -x false -s adminpw -a "resource:org.acme.sample.SampleParticipant#bob" ```
- record the output userid and secret for later.
- list current IDs again ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status)
- list current IDs again ``` composer identity list -i admin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status)
- connect to the business network using the above userId and secret ``` composer network list -n basic-sample-network -p hlfv1 -i newUser1 -s myProvidedSecret ```
- list current IDs again ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status changes)
- list current IDs again ``` composer identity list -i admin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status changes)
- Obtain the long uuid for newUser1
- revoke the id ``` composer identity revoke -p hlfv1 -n basic-sample-network -i admin -s adsf -u theLongUUID ```
- list current IDs again ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status changes)
Expand Down

0 comments on commit c363bd4

Please sign in to comment.