Skip to content

Commit

Permalink
[FAB-7808] Fix inconsistent configtx.yaml
Browse files Browse the repository at this point in the history
The sample and example configtx.yaml file have profiles with similar
names, but slightly different content.  As this is a sample, it should
be fixed to read consistently.  This ensures that the capabilities
section for the channel is always specified along with the one for
capabilities in the orderer.  It also renames the alias
"GlobalCapabilities" to "ChannelCapabilities" as this is how the doc
refers to them.

Change-Id: I407918c604de1ee546d101edccdcb32693cdf043
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Jan 18, 2018
1 parent 29863eb commit fb53715
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 10 deletions.
8 changes: 3 additions & 5 deletions examples/e2e_cli/configtx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Profiles:

TwoOrgsOrdererGenesis:
Capabilities:
<<: *GlobalCapabilities
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
Organizations:
Expand All @@ -37,8 +37,6 @@ Profiles:
- *Org2
Capabilities:
<<: *ApplicationCapabilities
Resources:
DefaultModPolicy: /Channel/Application/Writers

################################################################################
#
Expand Down Expand Up @@ -179,9 +177,9 @@ Application: &ApplicationDefaults
#
################################################################################
Capabilities:
# Global capabilities apply to both the orderers and the peers and must be
# Channel capabilities apply to both the orderers and the peers and must be
# supported by both. Set the value of the capability to true to require it.
Global: &GlobalCapabilities
Global: &ChannelCapabilities
# V1.1 for Global is a catchall flag for behavior which has been
# determined to be desired for all orderers and peers running v1.0.x,
# but the modification of which would cause imcompatibilities. Users
Expand Down
33 changes: 28 additions & 5 deletions sampleconfig/configtx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,22 @@ Profiles:
# but additionally defines the v1.1 only capabilities which do
# not allow a mixed v1.0.x v1.1.x network
SampleDevModeSoloV1_1:
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Capabilities:
<<: *ApplicationCapabilities
Consortiums:
SampleConsortium:
Organizations:
Expand All @@ -85,6 +94,11 @@ Profiles:
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Consortiums:
SampleConsortium:
Organizations:
Expand All @@ -95,6 +109,8 @@ Profiles:
# but additionally defines the v1.1 only capabilities which do
# not allow a mixed v1.0.x v1.1.x network
SampleDevModeKafkaV1_1:
Capabilities:
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
OrdererType: kafka
Expand All @@ -103,6 +119,13 @@ Profiles:
AdminPrincipal: Role.MEMBER
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *SampleOrg
AdminPrincipal: Role.MEMBER
Capabilities:
<<: *ApplicationCapabilities
Consortiums:
SampleConsortium:
Organizations:
Expand Down Expand Up @@ -140,7 +163,7 @@ Profiles:
# mixed v1.0.x v1.1.x network.
SampleSingleMSPSoloV1_1:
Capabilities:
<<: *GlobalCapabilities
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
Organizations:
Expand All @@ -156,7 +179,7 @@ Profiles:
# SampleSingleMSPSoloV1_1 one only in that it uses the Kafka-based orderer.
SampleSingleMSPKafkaV1_1:
Capabilities:
<<: *GlobalCapabilities
<<: *ChannelCapabilities
Orderer:
<<: *OrdererDefaults
OrdererType: kafka
Expand Down Expand Up @@ -328,10 +351,10 @@ Application: &ApplicationDefaults
#
################################################################################
Capabilities:
# Global capabilities apply to both the orderers and the peers and must be
# Channel capabilities apply to both the orderers and the peers and must be
# supported by both. Set the value of the capability to true to require it.
Global: &GlobalCapabilities
# V1.1 for Global is a catchall flag for behavior which has been
Channel: &ChannelCapabilities
# V1.1 for Channel is a catchall flag for behavior which has been
# determined to be desired for all orderers and peers running v1.0.x,
# but the modification of which would cause imcompatibilities. Users
# should leave this flag set to true.
Expand Down

0 comments on commit fb53715

Please sign in to comment.