From 97338dcf373f74a1352dae3fd6a7f9be5e9f0982 Mon Sep 17 00:00:00 2001 From: Jason Yellick Date: Tue, 7 Feb 2017 16:32:14 -0500 Subject: [PATCH] [FAB-2106] Define orderer configtx schema https://jira.hyperledger.org/browse/FAB-2106 This CR defines the acceptable configuration structure for the orderer pieces of the configtx. Change-Id: I09bbf9fd3e37d3d8343cf56e8e88a2e8545f0cb7 Signed-off-by: Jason Yellick --- .../configtx/handlers/orderer/sharedconfig.go | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/common/configtx/handlers/orderer/sharedconfig.go b/common/configtx/handlers/orderer/sharedconfig.go index ce7b6d04c7c..cf66eb8378b 100644 --- a/common/configtx/handlers/orderer/sharedconfig.go +++ b/common/configtx/handlers/orderer/sharedconfig.go @@ -30,6 +30,34 @@ import ( "github.com/op/go-logging" ) +var orgSchema = &cb.ConfigGroupSchema{ + Groups: map[string]*cb.ConfigGroupSchema{}, + Values: map[string]*cb.ConfigValueSchema{ + "MSP": nil, // TODO, consolidate into a constant once common org code exists + }, + Policies: map[string]*cb.ConfigPolicySchema{ + // TODO, set appropriately once hierarchical policies are implemented + }, +} + +var Schema = &cb.ConfigGroupSchema{ + Groups: map[string]*cb.ConfigGroupSchema{ + "": orgSchema, + }, + Values: map[string]*cb.ConfigValueSchema{ + ConsensusTypeKey: nil, + BatchSizeKey: nil, + BatchTimeoutKey: nil, + ChainCreationPolicyNamesKey: nil, + KafkaBrokersKey: nil, + IngressPolicyNamesKey: nil, + EgressPolicyNamesKey: nil, + }, + Policies: map[string]*cb.ConfigPolicySchema{ + // TODO, set appropriately once hierarchical policies are implemented + }, +} + const ( // ConsensusTypeKey is the cb.ConfigItem type key name for the ConsensusType message ConsensusTypeKey = "ConsensusType"