Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 73eef90

Browse files
committed
[FAB-11063] default config 'default' to '_default'
Change-Id: Iaf32fdcc5670ac7841e9114339f449723ee4e5e1 Signed-off-by: Sudesh Shetty <sudesh.shetty@securekey.com>
1 parent 55ab46a commit 73eef90

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

pkg/core/config/testdata/config_test_entity_matchers.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ organizations:
217217
# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers.
218218
#
219219
orderers:
220-
default:
220+
_default:
221221
# these are standard properties defined by the gRPC library
222222
# they will be passed in as-is to gRPC client constructor
223223
grpcOptions:
@@ -248,7 +248,7 @@ orderers:
248248
# and event listener registration.
249249
#
250250
peers:
251-
default:
251+
_default:
252252

253253
grpcOptions:
254254
# These parameters should be set in coordination with the keepalive policy on the server,

pkg/core/config/testdata/matcher-samples/matchers_sample5.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

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

4040
peers:
41-
default:
41+
_default:
4242
grpcOptions:
4343
# These parameters should be set in coordination with the keepalive policy on the server,
4444
# as incompatible settings can result in closing of connection.

pkg/core/config/testdata/matcher-samples/matchers_sample6.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ organizations:
9494
cryptoPath: ordererOrganizations/example.com/users/{username}@example.com/msp
9595

9696
orderers:
97-
default:
97+
_default:
9898
# these are standard properties defined by the gRPC library
9999
# they will be passed in as-is to gRPC client constructor
100100
grpcOptions:
@@ -129,7 +129,7 @@ orderers:
129129
ssl-target-name-override: orderer.example.com
130130

131131
peers:
132-
default:
132+
_default:
133133
grpcOptions:
134134
# These parameters should be set in coordination with the keepalive policy on the server,
135135
# as incompatible settings can result in closing of connection.

pkg/core/config/testdata/template/config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ organizations:
209209
#
210210
orderers:
211211

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

216216
# these are standard properties defined by the gRPC library
@@ -276,8 +276,8 @@ orderers:
276276
# and event listener registration.
277277
#
278278
peers:
279-
# default:
280-
# 'default' peer can contain common configuration between all config peers to avoid repetitive config entries inside each peer config element.
279+
# _default:
280+
# '_default' peer can contain common configuration between all config peers to avoid repetitive config entries inside each peer config element.
281281
# peer0.org1.example.com:
282282
# this URL is used to send endorsement and query requests
283283
# url: grpcs://peer0.org1.example.com:7051

pkg/fab/endpointconfig.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ func (c *EndpointConfig) loadNetworkConfig(configEntity *endpointConfigEntity) e
574574
func (c *EndpointConfig) loadAllPeerConfigs(networkConfig *fab.NetworkConfig, entityPeers map[string]PeerConfig) error {
575575
networkConfig.Peers = make(map[string]fab.PeerConfig)
576576
for name, peerConfig := range entityPeers {
577-
if name == "default" || c.isPeerToBeIgnored(name) {
577+
if name == "_default" || c.isPeerToBeIgnored(name) {
578578
//filter default and ignored peers
579579
continue
580580
}
@@ -595,7 +595,7 @@ func (c *EndpointConfig) loadAllPeerConfigs(networkConfig *fab.NetworkConfig, en
595595
func (c *EndpointConfig) loadAllOrdererConfigs(networkConfig *fab.NetworkConfig, entityOrderers map[string]OrdererConfig) error {
596596
networkConfig.Orderers = make(map[string]fab.OrdererConfig)
597597
for name, ordererConfig := range entityOrderers {
598-
if name == "default" || c.isOrdererToBeIgnored(name) {
598+
if name == "_default" || c.isOrdererToBeIgnored(name) {
599599
//filter default and ignored orderers
600600
continue
601601
}
@@ -676,7 +676,7 @@ func (c *EndpointConfig) addMissingOrdererConfigItems(config fab.OrdererConfig)
676676

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

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

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

733-
defaultEntityPeer, ok := configEntity.Peers["default"]
733+
defaultEntityPeer, ok := configEntity.Peers["_default"]
734734
if !ok {
735735
defaultEntityPeer = PeerConfig{
736736
GRPCOptions: make(map[string]interface{}),

test/fixtures/config/config_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ organizations:
262262
# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers.
263263
#
264264
orderers:
265-
default:
265+
_default:
266266
# common orderer config items between all the orderers in config
267267
# these are standard properties defined by the gRPC library
268268
# they will be passed in as-is to gRPC client constructor
@@ -303,7 +303,7 @@ orderers:
303303
# and event listener registration.
304304
#
305305
peers:
306-
default:
306+
_default:
307307
#common grpc options between all the peers
308308
grpcOptions:
309309
# These parameters should be set in coordination with the keepalive policy on the server,

test/fixtures/config/config_test_endpoints.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ orderers:
211211
#
212212
peers:
213213

214-
default:
214+
_default:
215215
#common grpc options between all the peers
216216
grpcOptions:
217217
# These parameters should be set in coordination with the keepalive policy on the server,

0 commit comments

Comments
 (0)