Skip to content

Commit daf29b8

Browse files
author
Jason Yellick
committed
[FAB-1649] Normalize orderer config item names
https://jira.hyperledger.org/browse/FAB-1649 The orderer configuration items have been added one by one as needed, so some commonalities have been ignored, and some names are inconsitent or misleading. This CR is normalizes those names. Suggested review start: protos/orderer/configuration.proto orderer/common/bootstrap/provisional/item.go Change-Id: I415c5e7e3ed410f82d01a4ea30ff48a10bed7a98 Signed-off-by: Jason Yellick <[email protected]>
1 parent 81d5152 commit daf29b8

23 files changed

+277
-257
lines changed

common/configtx/inspector/orderer_types.go

+15-15
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,24 @@ func (ot ordererTypes) Value(configItem *cb.ConfigurationItem) Viewable {
5656
return viewableError(name, err)
5757
}
5858
return viewableCreationPolicy(configItem.Key, value)
59-
case "IngressPolicy":
60-
value := &ab.IngressPolicy{}
59+
case "IngressPolicyNames":
60+
value := &ab.IngressPolicyNames{}
6161
if err := proto.Unmarshal(configItem.Value, value); err != nil {
6262
return viewableError(name, err)
6363
}
64-
return viewableIngressPolicy(configItem.Key, value)
65-
case "EgressPolicy":
66-
value := &ab.EgressPolicy{}
64+
return viewableIngressPolicyNames(configItem.Key, value)
65+
case "EgressPolicyNames":
66+
value := &ab.EgressPolicyNames{}
6767
if err := proto.Unmarshal(configItem.Value, value); err != nil {
6868
return viewableError(name, err)
6969
}
70-
return viewableEgressPolicy(configItem.Key, value)
71-
case "ChainCreators":
72-
value := &ab.ChainCreators{}
70+
return viewableEgressPolicyNames(configItem.Key, value)
71+
case "ChainCreationPolicyNames":
72+
value := &ab.ChainCreationPolicyNames{}
7373
if err := proto.Unmarshal(configItem.Value, value); err != nil {
7474
return viewableError(name, err)
7575
}
76-
return viewableChainCreators(configItem.Key, value)
76+
return viewableChainCreationPolicyNames(configItem.Key, value)
7777
case "KafkaBrokers":
7878
value := &ab.KafkaBrokers{}
7979
if err := proto.Unmarshal(configItem.Value, value); err != nil {
@@ -99,24 +99,24 @@ func viewableBatchTimeout(name string, batchTimeout *ab.BatchTimeout) Viewable {
9999
}
100100
}
101101

102-
func viewableIngressPolicy(name string, ingressPolicy *ab.IngressPolicy) Viewable {
102+
func viewableIngressPolicyNames(name string, ingressPolicy *ab.IngressPolicyNames) Viewable {
103103
return &field{
104104
name: name,
105-
values: []Viewable{viewableString("Name", ingressPolicy.Name)},
105+
values: []Viewable{viewableStringSlice("Name", ingressPolicy.Names)},
106106
}
107107
}
108108

109-
func viewableEgressPolicy(name string, egressPolicy *ab.EgressPolicy) Viewable {
109+
func viewableEgressPolicyNames(name string, egressPolicy *ab.EgressPolicyNames) Viewable {
110110
return &field{
111111
name: name,
112-
values: []Viewable{viewableString("Name", egressPolicy.Name)},
112+
values: []Viewable{viewableStringSlice("Names", egressPolicy.Names)},
113113
}
114114
}
115115

116-
func viewableChainCreators(name string, creators *ab.ChainCreators) Viewable {
116+
func viewableChainCreationPolicyNames(name string, chainCreationPolicyNames *ab.ChainCreationPolicyNames) Viewable {
117117
return &field{
118118
name: name,
119-
values: []Viewable{viewableStringSlice("Policies", creators.Policies)},
119+
values: []Viewable{viewableStringSlice("Names", chainCreationPolicyNames.Names)},
120120
}
121121
}
122122

common/configtx/manager.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ type Manager interface {
5757
Sequence() uint64
5858
}
5959

60-
// DefaultModificationPolicyID is the ID of the policy used when no other policy can be resolved, for instance when attempting to create a new config item
61-
const DefaultModificationPolicyID = "DefaultModificationPolicy"
60+
// NewConfigurationItemPolicyKey is the ID of the policy used when no other policy can be resolved, for instance when attempting to create a new config item
61+
const NewConfigurationItemPolicyKey = "NewConfigurationItemPolicy"
6262

6363
type acceptAllPolicy struct{}
6464

@@ -187,7 +187,7 @@ func (cm *configurationManager) processConfig(configtx *cb.ConfigurationEnvelope
187187
return nil, fmt.Errorf("Config is for the wrong chain, expected %s, got %s", cm.chainID, chainID)
188188
}
189189

190-
defaultModificationPolicy, defaultPolicySet := cm.pm.GetPolicy(DefaultModificationPolicyID)
190+
defaultModificationPolicy, defaultPolicySet := cm.pm.GetPolicy(NewConfigurationItemPolicyKey)
191191

192192
// If the default modification policy is not set, it indicates this is an uninitialized chain, so be permissive of modification
193193
if !defaultPolicySet {

common/configtx/test/orderer.template

18 Bytes
Binary file not shown.

orderer/common/bootstrap/provisional/item.go

+26-26
Original file line numberDiff line numberDiff line change
@@ -25,83 +25,83 @@ import (
2525
"github.com/hyperledger/fabric/protos/utils"
2626
)
2727

28-
func (cbs *commonBootstrapper) encodeConsensusType() *cb.ConfigurationItem {
28+
func (cbs *commonBootstrapper) templateConsensusType() *cb.ConfigurationItem {
2929
configItemKey := sharedconfig.ConsensusTypeKey
3030
configItemValue := utils.MarshalOrPanic(&ab.ConsensusType{Type: cbs.consensusType})
31-
modPolicy := configtx.DefaultModificationPolicyID
31+
modPolicy := configtx.NewConfigurationItemPolicyKey
3232

3333
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
3434
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)
3535
}
3636

37-
func (cbs *commonBootstrapper) encodeBatchSize() *cb.ConfigurationItem {
37+
func (cbs *commonBootstrapper) templateBatchSize() *cb.ConfigurationItem {
3838
configItemKey := sharedconfig.BatchSizeKey
3939
configItemValue := utils.MarshalOrPanic(cbs.batchSize)
40-
modPolicy := configtx.DefaultModificationPolicyID
40+
modPolicy := configtx.NewConfigurationItemPolicyKey
4141

4242
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
4343
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)
4444
}
4545

46-
func (cbs *commonBootstrapper) encodeBatchTimeout() *cb.ConfigurationItem {
46+
func (cbs *commonBootstrapper) templateBatchTimeout() *cb.ConfigurationItem {
4747
configItemKey := sharedconfig.BatchTimeoutKey
4848
configItemValue := utils.MarshalOrPanic(&ab.BatchTimeout{Timeout: cbs.batchTimeout})
49-
modPolicy := configtx.DefaultModificationPolicyID
49+
modPolicy := configtx.NewConfigurationItemPolicyKey
5050

5151
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
5252
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)
5353
}
5454

55-
func (cbs *commonBootstrapper) encodeChainCreators() *cb.ConfigurationItem {
56-
configItemKey := sharedconfig.ChainCreatorsKey
57-
configItemValue := utils.MarshalOrPanic(&ab.ChainCreators{Policies: DefaultChainCreators})
58-
modPolicy := configtx.DefaultModificationPolicyID
55+
func (cbs *commonBootstrapper) templateChainCreationPolicyNames() *cb.ConfigurationItem {
56+
configItemKey := sharedconfig.ChainCreationPolicyNamesKey
57+
configItemValue := utils.MarshalOrPanic(&ab.ChainCreationPolicyNames{Names: DefaultChainCreationPolicyNames})
58+
modPolicy := configtx.NewConfigurationItemPolicyKey
5959

6060
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
6161
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)
6262
}
6363

64-
func (cbs *commonBootstrapper) encodeAcceptAllPolicy() *cb.ConfigurationItem {
64+
func (cbs *commonBootstrapper) templateAcceptAllPolicy() *cb.ConfigurationItem {
6565
configItemKey := AcceptAllPolicyKey
6666
configItemValue := utils.MarshalOrPanic(utils.MakePolicyOrPanic(cauthdsl.AcceptAllPolicy))
67-
modPolicy := configtx.DefaultModificationPolicyID
67+
modPolicy := configtx.NewConfigurationItemPolicyKey
6868

6969
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
7070
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Policy, lastModified, modPolicy, configItemKey, configItemValue)
7171
}
7272

73-
func (cbs *commonBootstrapper) encodeIngressPolicy() *cb.ConfigurationItem {
74-
configItemKey := sharedconfig.IngressPolicyKey
75-
configItemValue := utils.MarshalOrPanic(&ab.IngressPolicy{Name: AcceptAllPolicyKey})
76-
modPolicy := configtx.DefaultModificationPolicyID
73+
func (cbs *commonBootstrapper) templateIngressPolicyNames() *cb.ConfigurationItem {
74+
configItemKey := sharedconfig.IngressPolicyNamesKey
75+
configItemValue := utils.MarshalOrPanic(&ab.IngressPolicyNames{Names: []string{AcceptAllPolicyKey}})
76+
modPolicy := configtx.NewConfigurationItemPolicyKey
7777

7878
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
7979
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)
8080
}
8181

82-
func (cbs *commonBootstrapper) encodeEgressPolicy() *cb.ConfigurationItem {
83-
configItemKey := sharedconfig.EgressPolicyKey
84-
configItemValue := utils.MarshalOrPanic(&ab.EgressPolicy{Name: AcceptAllPolicyKey})
85-
modPolicy := configtx.DefaultModificationPolicyID
82+
func (cbs *commonBootstrapper) templateEgressPolicyNames() *cb.ConfigurationItem {
83+
configItemKey := sharedconfig.EgressPolicyNamesKey
84+
configItemValue := utils.MarshalOrPanic(&ab.EgressPolicyNames{Names: []string{AcceptAllPolicyKey}})
85+
modPolicy := configtx.NewConfigurationItemPolicyKey
8686

8787
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
8888
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)
8989
}
9090

91-
func (cbs *commonBootstrapper) lockDefaultModificationPolicy() *cb.ConfigurationItem {
92-
// Lock down the default modification policy to prevent any further policy modifications
93-
configItemKey := configtx.DefaultModificationPolicyID
91+
func (cbs *commonBootstrapper) templateRejectAllPolicy() *cb.ConfigurationItem {
92+
// Lock down the new configuration item policy to prevent any new configuration items from being created
93+
configItemKey := configtx.NewConfigurationItemPolicyKey
9494
configItemValue := utils.MarshalOrPanic(utils.MakePolicyOrPanic(cauthdsl.RejectAllPolicy))
95-
modPolicy := configtx.DefaultModificationPolicyID
95+
modPolicy := configtx.NewConfigurationItemPolicyKey
9696

9797
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, cbs.chainID, epoch)
9898
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Policy, lastModified, modPolicy, configItemKey, configItemValue)
9999
}
100100

101-
func (kbs *kafkaBootstrapper) encodeKafkaBrokers() *cb.ConfigurationItem {
101+
func (kbs *kafkaBootstrapper) templateKafkaBrokers() *cb.ConfigurationItem {
102102
configItemKey := sharedconfig.KafkaBrokersKey
103103
configItemValue := utils.MarshalOrPanic(&ab.KafkaBrokers{Brokers: kbs.kafkaBrokers})
104-
modPolicy := configtx.DefaultModificationPolicyID
104+
modPolicy := configtx.NewConfigurationItemPolicyKey
105105

106106
configItemChainHeader := utils.MakeChainHeader(cb.HeaderType_CONFIGURATION_ITEM, msgVersion, kbs.chainID, epoch)
107107
return utils.MakeConfigurationItem(configItemChainHeader, cb.ConfigurationItem_Orderer, lastModified, modPolicy, configItemKey, configItemValue)

orderer/common/bootstrap/provisional/provisional.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ const (
5959
epoch = 0
6060
)
6161

62-
// DefaultChainCreators is the default value of ChainCreatorsKey.
63-
var DefaultChainCreators = []string{AcceptAllPolicyKey}
62+
// DefaultChainCreationPolicyNames is the default value of ChainCreatorsKey.
63+
var DefaultChainCreationPolicyNames = []string{AcceptAllPolicyKey}
6464

6565
type commonBootstrapper struct {
6666
chainID string

orderer/common/bootstrap/provisional/templates.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ import (
2121
)
2222

2323
func (cbs *commonBootstrapper) makeOrdererSystemChainConfig() []*cb.ConfigurationItem {
24-
return []*cb.ConfigurationItem{cbs.encodeChainCreators()}
24+
return []*cb.ConfigurationItem{cbs.templateChainCreationPolicyNames()}
2525
}
2626

2727
func (cbs *commonBootstrapper) TemplateItems() []*cb.ConfigurationItem {
2828
return []*cb.ConfigurationItem{
29-
cbs.encodeConsensusType(),
30-
cbs.encodeBatchSize(),
31-
cbs.encodeBatchTimeout(),
32-
cbs.encodeAcceptAllPolicy(),
33-
cbs.encodeIngressPolicy(),
34-
cbs.encodeEgressPolicy(),
35-
cbs.lockDefaultModificationPolicy(),
29+
cbs.templateConsensusType(),
30+
cbs.templateBatchSize(),
31+
cbs.templateBatchTimeout(),
32+
cbs.templateAcceptAllPolicy(),
33+
cbs.templateIngressPolicyNames(),
34+
cbs.templateEgressPolicyNames(),
35+
cbs.templateRejectAllPolicy(),
3636
}
3737
}
3838

3939
func (kbs *kafkaBootstrapper) TemplateItems() []*cb.ConfigurationItem {
40-
return append(kbs.commonBootstrapper.TemplateItems(), kbs.encodeKafkaBrokers())
40+
return append(kbs.commonBootstrapper.TemplateItems(), kbs.templateKafkaBrokers())
4141
}

orderer/common/deliver/deliver.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (ds *deliverServer) Handle(srv ab.AtomicBroadcast_DeliverServer) error {
9292
return sendStatusReply(srv, cb.Status_NOT_FOUND)
9393
}
9494

95-
sf := sigfilter.New(chain.SharedConfig().EgressPolicy, chain.PolicyManager())
95+
sf := sigfilter.New(chain.SharedConfig().EgressPolicyNames, chain.PolicyManager())
9696
result, _ := sf.Apply(envelope)
9797
if result != filter.Forward {
9898
return sendStatusReply(srv, cb.Status_FORBIDDEN)

orderer/common/deliver/deliver_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func newMockMultichainManager() *mockSupportManager {
114114
}
115115
mm.chains[systemChainID] = &mockSupport{
116116
ledger: rl,
117-
sharedConfig: &mocksharedconfig.Manager{},
117+
sharedConfig: &mocksharedconfig.Manager{EgressPolicyNamesVal: []string{"somePolicy"}},
118118
policyManager: &mockpolicies.Manager{Policy: &mockpolicies.Policy{}},
119119
}
120120
return mm

orderer/common/sharedconfig/sharedconfig.go

+42-42
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ const (
4040
// BatchTimeoutKey is the cb.ConfigurationItem type key name for the BatchTimeout message
4141
BatchTimeoutKey = "BatchTimeout"
4242

43-
// ChainCreatorsKey is the cb.ConfigurationItem type key name for the ChainCreators message
44-
ChainCreatorsKey = "ChainCreators"
43+
// ChainCreationPolicyNamesKey is the cb.ConfigurationItem type key name for the ChainCreationPolicyNames message
44+
ChainCreationPolicyNamesKey = "ChainCreationPolicyNames"
4545

4646
// KafkaBrokersKey is the cb.ConfigurationItem type key name for the KafkaBrokers message
4747
KafkaBrokersKey = "KafkaBrokers"
4848

49-
// IngressPolicyKey is the cb.ConfigurationItem type key name for the IngressPolicy message
50-
IngressPolicyKey = "IngressPolicy"
49+
// IngressPolicyNamesKey is the cb.ConfigurationItem type key name for the IngressPolicyNames message
50+
IngressPolicyNamesKey = "IngressPolicyNames"
5151

52-
// EgressPolicyKey is the cb.ConfigurationItem type key name for the EgressPolicy message
53-
EgressPolicyKey = "EgressPolicy"
52+
// EgressPolicyNamesKey is the cb.ConfigurationItem type key name for the EgressPolicyNames message
53+
EgressPolicyNamesKey = "EgressPolicyNames"
5454
)
5555

5656
var logger = logging.MustGetLogger("orderer/common/sharedconfig")
@@ -69,30 +69,30 @@ type Manager interface {
6969
// BatchTimeout returns the amount of time to wait before creating a batch
7070
BatchTimeout() time.Duration
7171

72-
// ChainCreators returns the policy names which are allowed for chain creation
72+
// ChainCreationPolicyNames returns the policy names which are allowed for chain creation
7373
// This field is only set for the system ordering chain
74-
ChainCreators() []string
74+
ChainCreationPolicyNames() []string
7575

7676
// KafkaBrokers returns the addresses (IP:port notation) of a set of "bootstrap"
7777
// Kafka brokers, i.e. this is not necessarily the entire set of Kafka brokers
7878
// used for ordering
7979
KafkaBrokers() []string
8080

81-
// IngressPolicy returns the name of the policy to validate incoming broadcast messages against
82-
IngressPolicy() string
81+
// IngressPolicyNames returns the name of the policy to validate incoming broadcast messages against
82+
IngressPolicyNames() []string
8383

84-
// EgressPolicy returns the name of the policy to validate incoming broadcast messages against
85-
EgressPolicy() string
84+
// EgressPolicyNames returns the name of the policy to validate incoming broadcast messages against
85+
EgressPolicyNames() []string
8686
}
8787

8888
type ordererConfig struct {
89-
consensusType string
90-
batchSize *ab.BatchSize
91-
batchTimeout time.Duration
92-
chainCreators []string
93-
kafkaBrokers []string
94-
ingressPolicy string
95-
egressPolicy string
89+
consensusType string
90+
batchSize *ab.BatchSize
91+
batchTimeout time.Duration
92+
chainCreationPolicies []string
93+
kafkaBrokers []string
94+
ingressPolicyNames []string
95+
egressPolicyNames []string
9696
}
9797

9898
// ManagerImpl is an implementation of Manager and configtx.ConfigHandler
@@ -124,10 +124,10 @@ func (pm *ManagerImpl) BatchTimeout() time.Duration {
124124
return pm.config.batchTimeout
125125
}
126126

127-
// ChainCreators returns the policy names which are allowed for chain creation
127+
// ChainCreationPolicyNames returns the policy names which are allowed for chain creation
128128
// This field is only set for the system ordering chain
129-
func (pm *ManagerImpl) ChainCreators() []string {
130-
return pm.config.chainCreators
129+
func (pm *ManagerImpl) ChainCreationPolicyNames() []string {
130+
return pm.config.chainCreationPolicies
131131
}
132132

133133
// KafkaBrokers returns the addresses (IP:port notation) of a set of "bootstrap"
@@ -137,14 +137,14 @@ func (pm *ManagerImpl) KafkaBrokers() []string {
137137
return pm.config.kafkaBrokers
138138
}
139139

140-
// IngressPolicy returns the name of the policy to validate incoming broadcast messages against
141-
func (pm *ManagerImpl) IngressPolicy() string {
142-
return pm.config.ingressPolicy
140+
// IngressPolicyNames returns the name of the policy to validate incoming broadcast messages against
141+
func (pm *ManagerImpl) IngressPolicyNames() []string {
142+
return pm.config.ingressPolicyNames
143143
}
144144

145-
// EgressPolicy returns the name of the policy to validate incoming deliver seeks against
146-
func (pm *ManagerImpl) EgressPolicy() string {
147-
return pm.config.egressPolicy
145+
// EgressPolicyNames returns the name of the policy to validate incoming deliver seeks against
146+
func (pm *ManagerImpl) EgressPolicyNames() []string {
147+
return pm.config.egressPolicyNames
148148
}
149149

150150
// BeginConfig is used to start a new configuration proposal
@@ -221,24 +221,24 @@ func (pm *ManagerImpl) ProposeConfig(configItem *cb.ConfigurationItem) error {
221221
return fmt.Errorf("Attempted to set the batch timeout to a non-positive value: %s", timeoutValue.String())
222222
}
223223
pm.pendingConfig.batchTimeout = timeoutValue
224-
case ChainCreatorsKey:
225-
chainCreators := &ab.ChainCreators{}
226-
if err := proto.Unmarshal(configItem.Value, chainCreators); err != nil {
224+
case ChainCreationPolicyNamesKey:
225+
chainCreationPolicies := &ab.ChainCreationPolicyNames{}
226+
if err := proto.Unmarshal(configItem.Value, chainCreationPolicies); err != nil {
227227
return fmt.Errorf("Unmarshaling error for ChainCreator: %s", err)
228228
}
229-
pm.pendingConfig.chainCreators = chainCreators.Policies
230-
case IngressPolicyKey:
231-
ingressPolicy := &ab.IngressPolicy{}
232-
if err := proto.Unmarshal(configItem.Value, ingressPolicy); err != nil {
233-
return fmt.Errorf("Unmarshaling error for IngressPolicy: %s", err)
229+
pm.pendingConfig.chainCreationPolicies = chainCreationPolicies.Names
230+
case IngressPolicyNamesKey:
231+
ingressPolicyNames := &ab.IngressPolicyNames{}
232+
if err := proto.Unmarshal(configItem.Value, ingressPolicyNames); err != nil {
233+
return fmt.Errorf("Unmarshaling error for IngressPolicyNames: %s", err)
234234
}
235-
pm.pendingConfig.ingressPolicy = ingressPolicy.Name
236-
case EgressPolicyKey:
237-
egressPolicy := &ab.EgressPolicy{}
238-
if err := proto.Unmarshal(configItem.Value, egressPolicy); err != nil {
239-
return fmt.Errorf("Unmarshaling error for EgressPolicy: %s", err)
235+
pm.pendingConfig.ingressPolicyNames = ingressPolicyNames.Names
236+
case EgressPolicyNamesKey:
237+
egressPolicyNames := &ab.EgressPolicyNames{}
238+
if err := proto.Unmarshal(configItem.Value, egressPolicyNames); err != nil {
239+
return fmt.Errorf("Unmarshaling error for EgressPolicyNames: %s", err)
240240
}
241-
pm.pendingConfig.egressPolicy = egressPolicy.Name
241+
pm.pendingConfig.egressPolicyNames = egressPolicyNames.Names
242242
case KafkaBrokersKey:
243243
kafkaBrokers := &ab.KafkaBrokers{}
244244
if err := proto.Unmarshal(configItem.Value, kafkaBrokers); err != nil {

0 commit comments

Comments
 (0)