Skip to content

Commit

Permalink
Update cli validation guide (hyperledger-archives#2418)
Browse files Browse the repository at this point in the history
On deploy add admin user
only use admin to issue commands not PeerAdmin except deploy
update submit transaction steps

contributes to hyperledger/composer#2415

Signed-off-by: Caroline Church <[email protected]>
  • Loading branch information
cazfletch authored and bestbeforetoday committed Oct 20, 2017
1 parent cd7c815 commit b9f2e39
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions contrib-notes/release-process/cli-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Obtain two BNA files from the [Composer Playground on Bluemix](http://composer-p
- unzip the exported BNA file
- delete the original BNA file
- build a BNA by targetting the folder that was created on unzip ``` composer archive create -t dir -a v1_bna -n basic-sample-network_V1 ```
- deploy the new BNA ``` composer network deploy -a v1_bna -i PeerAdmin -s mySecret -p hlfv1 ```
- deploy the new BNA ``` composer network deploy -a v1_bna -i PeerAdmin -s mySecret -p hlfv1 -A admin -S```

2) Check the network
- 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 ```
- update ``` composer network update -i admin -s silent -p hlfv1 -a v2_bna ```
- 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
Expand All @@ -51,10 +51,8 @@ Obtain two BNA files from the [Composer Playground on Bluemix](http://composer-p
- 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 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}' ```
- submit a system transaction to add asset ```composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s silent -d '{"$class": "org.hyperledger.composer.system.AddAsset","registryType": "Asset","registryId": "org.acme.sample.SampleAsset", "targetRegistry" : "resource:org.hyperledger.composer.system.AssetRegistry#org.acme.sample.SampleAsset", "resources": [{"$class": "org.acme.sample.SampleAsset","assetId": "newAsset","owner": "resource:org.acme.sample.SampleParticipant#bob","value": "101"}]}'```
- Submit a user transaction ```composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s mySecret -d '{"$class": "org.acme.sample.SampleTransaction", "asset": "resource:org.acme.sample.SampleAsset#newAsset", "newValue": "5"}'
- 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 ```

Expand All @@ -67,6 +65,6 @@ Obtain two BNA files from the [Composer Playground on Bluemix](http://composer-p
- 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)
- list current IDs again ``` composer identity list -i admin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status changes)


0 comments on commit b9f2e39

Please sign in to comment.