From fb537157c0f01df75acc926fb26542ab93b80a07 Mon Sep 17 00:00:00 2001 From: Jason Yellick Date: Thu, 18 Jan 2018 15:40:47 -0500 Subject: [PATCH] [FAB-7808] Fix inconsistent configtx.yaml 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 --- examples/e2e_cli/configtx.yaml | 8 +++----- sampleconfig/configtx.yaml | 33 ++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/examples/e2e_cli/configtx.yaml b/examples/e2e_cli/configtx.yaml index a434ee194ff..58543482433 100644 --- a/examples/e2e_cli/configtx.yaml +++ b/examples/e2e_cli/configtx.yaml @@ -16,7 +16,7 @@ Profiles: TwoOrgsOrdererGenesis: Capabilities: - <<: *GlobalCapabilities + <<: *ChannelCapabilities Orderer: <<: *OrdererDefaults Organizations: @@ -37,8 +37,6 @@ Profiles: - *Org2 Capabilities: <<: *ApplicationCapabilities - Resources: - DefaultModPolicy: /Channel/Application/Writers ################################################################################ # @@ -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 diff --git a/sampleconfig/configtx.yaml b/sampleconfig/configtx.yaml index c1a6ef88721..92aa7722967 100644 --- a/sampleconfig/configtx.yaml +++ b/sampleconfig/configtx.yaml @@ -63,6 +63,8 @@ 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: @@ -70,6 +72,13 @@ Profiles: AdminPrincipal: Role.MEMBER Capabilities: <<: *OrdererCapabilities + Application: + <<: *ApplicationDefaults + Organizations: + - <<: *SampleOrg + AdminPrincipal: Role.MEMBER + Capabilities: + <<: *ApplicationCapabilities Consortiums: SampleConsortium: Organizations: @@ -85,6 +94,11 @@ Profiles: Organizations: - <<: *SampleOrg AdminPrincipal: Role.MEMBER + Application: + <<: *ApplicationDefaults + Organizations: + - <<: *SampleOrg + AdminPrincipal: Role.MEMBER Consortiums: SampleConsortium: Organizations: @@ -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 @@ -103,6 +119,13 @@ Profiles: AdminPrincipal: Role.MEMBER Capabilities: <<: *OrdererCapabilities + Application: + <<: *ApplicationDefaults + Organizations: + - <<: *SampleOrg + AdminPrincipal: Role.MEMBER + Capabilities: + <<: *ApplicationCapabilities Consortiums: SampleConsortium: Organizations: @@ -140,7 +163,7 @@ Profiles: # mixed v1.0.x v1.1.x network. SampleSingleMSPSoloV1_1: Capabilities: - <<: *GlobalCapabilities + <<: *ChannelCapabilities Orderer: <<: *OrdererDefaults Organizations: @@ -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 @@ -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.