Skip to content

Commit

Permalink
[FAB-11063] default config 'default' to '_default'
Browse files Browse the repository at this point in the history
Change-Id: Iaf32fdcc5670ac7841e9114339f449723ee4e5e1
Signed-off-by: Sudesh Shetty <sudesh.shetty@securekey.com>
  • Loading branch information
sudeshrshetty committed Jul 17, 2018
1 parent 55ab46a commit 73eef90
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pkg/core/config/testdata/config_test_entity_matchers.yaml
Expand Up @@ -217,7 +217,7 @@ organizations:
# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers.
#
orderers:
default:
_default:
# these are standard properties defined by the gRPC library
# they will be passed in as-is to gRPC client constructor
grpcOptions:
Expand Down Expand Up @@ -248,7 +248,7 @@ orderers:
# and event listener registration.
#
peers:
default:
_default:

grpcOptions:
# These parameters should be set in coordination with the keepalive policy on the server,
Expand Down
Expand Up @@ -11,7 +11,7 @@


orderers:
default:
_default:
# these are standard properties defined by the gRPC library
# they will be passed in as-is to gRPC client constructor
grpcOptions:
Expand All @@ -38,7 +38,7 @@ orderers:
ssl-target-name-override: orderer.example.com

peers:
default:
_default:
grpcOptions:
# These parameters should be set in coordination with the keepalive policy on the server,
# as incompatible settings can result in closing of connection.
Expand Down
Expand Up @@ -94,7 +94,7 @@ organizations:
cryptoPath: ordererOrganizations/example.com/users/{username}@example.com/msp

orderers:
default:
_default:
# these are standard properties defined by the gRPC library
# they will be passed in as-is to gRPC client constructor
grpcOptions:
Expand Down Expand Up @@ -129,7 +129,7 @@ orderers:
ssl-target-name-override: orderer.example.com

peers:
default:
_default:
grpcOptions:
# These parameters should be set in coordination with the keepalive policy on the server,
# as incompatible settings can result in closing of connection.
Expand Down
8 changes: 4 additions & 4 deletions pkg/core/config/testdata/template/config.yaml
Expand Up @@ -209,8 +209,8 @@ organizations:
#
orderers:

# default:
# 'default' orderer can contain common configuration between all config orderers to avoid repetitive config entries inside each orderer config element.
# _default:
# '_default' orderer can contain common configuration between all config orderers to avoid repetitive config entries inside each orderer config element.
# url: grpcs://orderer.example.com:7050

# these are standard properties defined by the gRPC library
Expand Down Expand Up @@ -276,8 +276,8 @@ orderers:
# and event listener registration.
#
peers:
# default:
# 'default' peer can contain common configuration between all config peers to avoid repetitive config entries inside each peer config element.
# _default:
# '_default' peer can contain common configuration between all config peers to avoid repetitive config entries inside each peer config element.
# peer0.org1.example.com:
# this URL is used to send endorsement and query requests
# url: grpcs://peer0.org1.example.com:7051
Expand Down
8 changes: 4 additions & 4 deletions pkg/fab/endpointconfig.go
Expand Up @@ -574,7 +574,7 @@ func (c *EndpointConfig) loadNetworkConfig(configEntity *endpointConfigEntity) e
func (c *EndpointConfig) loadAllPeerConfigs(networkConfig *fab.NetworkConfig, entityPeers map[string]PeerConfig) error {
networkConfig.Peers = make(map[string]fab.PeerConfig)
for name, peerConfig := range entityPeers {
if name == "default" || c.isPeerToBeIgnored(name) {
if name == "_default" || c.isPeerToBeIgnored(name) {
//filter default and ignored peers
continue
}
Expand All @@ -595,7 +595,7 @@ func (c *EndpointConfig) loadAllPeerConfigs(networkConfig *fab.NetworkConfig, en
func (c *EndpointConfig) loadAllOrdererConfigs(networkConfig *fab.NetworkConfig, entityOrderers map[string]OrdererConfig) error {
networkConfig.Orderers = make(map[string]fab.OrdererConfig)
for name, ordererConfig := range entityOrderers {
if name == "default" || c.isOrdererToBeIgnored(name) {
if name == "_default" || c.isOrdererToBeIgnored(name) {
//filter default and ignored orderers
continue
}
Expand Down Expand Up @@ -676,7 +676,7 @@ func (c *EndpointConfig) addMissingOrdererConfigItems(config fab.OrdererConfig)

func (c *EndpointConfig) loadDefaultOrderer(configEntity *endpointConfigEntity) error {

defaultEntityOrderer, ok := configEntity.Orderers["default"]
defaultEntityOrderer, ok := configEntity.Orderers["_default"]
if !ok {
defaultEntityOrderer = OrdererConfig{
GRPCOptions: make(map[string]interface{}),
Expand Down Expand Up @@ -730,7 +730,7 @@ func (c *EndpointConfig) loadDefaultOrderer(configEntity *endpointConfigEntity)

func (c *EndpointConfig) loadDefaultPeer(configEntity *endpointConfigEntity) error {

defaultEntityPeer, ok := configEntity.Peers["default"]
defaultEntityPeer, ok := configEntity.Peers["_default"]
if !ok {
defaultEntityPeer = PeerConfig{
GRPCOptions: make(map[string]interface{}),
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/config/config_test.yaml
Expand Up @@ -262,7 +262,7 @@ organizations:
# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers.
#
orderers:
default:
_default:
# common orderer config items between all the orderers in config
# these are standard properties defined by the gRPC library
# they will be passed in as-is to gRPC client constructor
Expand Down Expand Up @@ -303,7 +303,7 @@ orderers:
# and event listener registration.
#
peers:
default:
_default:
#common grpc options between all the peers
grpcOptions:
# These parameters should be set in coordination with the keepalive policy on the server,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/config/config_test_endpoints.yaml
Expand Up @@ -211,7 +211,7 @@ orderers:
#
peers:

default:
_default:
#common grpc options between all the peers
grpcOptions:
# These parameters should be set in coordination with the keepalive policy on the server,
Expand Down

0 comments on commit 73eef90

Please sign in to comment.