Skip to content

Commit 09903d6

Browse files
committed
fixing merge issue
1 parent 255989b commit 09903d6

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

netmaster/mastercfg/servicelbState.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ type CfgServiceLBState struct {
5454

5555
// Write the state
5656
func (s *CfgServiceLBState) Write() error {
57-
id := s.ServiceName + "\\" + s.Tenant
58-
key := fmt.Sprintf(serviceLBConfigPath, id)
57+
key := fmt.Sprintf(serviceLBConfigPath, s.ID)
5958
return s.StateDriver.WriteState(key, s, json.Marshal)
6059
}
6160

@@ -72,8 +71,7 @@ func (s *CfgServiceLBState) ReadAll() ([]core.State, error) {
7271

7372
// Clear removes the configuration from the state store.
7473
func (s *CfgServiceLBState) Clear() error {
75-
id := s.ServiceName + "\\" + s.Tenant
76-
key := fmt.Sprintf(serviceLBConfigPath, id)
74+
key := fmt.Sprintf(serviceLBConfigPath, s.ID)
7775
return s.StateDriver.ClearState(key)
7876
}
7977

netmaster/objApi/objapi_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ func verifyServiceCreate(t *testing.T, tenant, network, serviceName string, port
804804

805805
serviceLbState := mastercfg.CfgServiceLBState{}
806806
serviceLbState.StateDriver = stateStore
807-
serviceLbState.ID = serviceName + "\\" + tenant
807+
serviceLbState.ID = serviceName + ":" + tenant
808808

809809
err = serviceLbState.Read(serviceLbState.ID)
810810
if err != nil {
@@ -834,7 +834,7 @@ func verifyServiceDelete(t *testing.T, tenant, serviceName string) {
834834

835835
serviceLbState := mastercfg.CfgServiceLBState{}
836836
serviceLbState.StateDriver = stateStore
837-
serviceLbState.ID = serviceName + "\\" + tenant
837+
serviceLbState.ID = serviceName + ":" + tenant
838838

839839
err := serviceLbState.Read(serviceLbState.ID)
840840
if err == nil {
@@ -882,8 +882,8 @@ func verifyProviderUpdate(t *testing.T, providerIP, network, containerID,
882882

883883
svcProvider := &mastercfg.SvcProvider{}
884884
svcProvider.StateDriver = stateStore
885-
svcProvider.ID = service + "\\" + tenant
886-
svcProvider.ServiceName = service + "\\" + tenant
885+
svcProvider.ID = service + ":" + tenant
886+
svcProvider.ServiceName = service + ":" + tenant
887887
err := svcProvider.Read(svcProvider.ID)
888888
if err != nil {
889889
t.Fatalf("Error reading from service provider state %s", err)

0 commit comments

Comments
 (0)