diff --git a/apier/v1/dispatcher_it_test.go b/apier/v1/dispatcher_it_test.go index e9107217a..ab26ebfea 100644 --- a/apier/v1/dispatcher_it_test.go +++ b/apier/v1/dispatcher_it_test.go @@ -165,9 +165,9 @@ func testDispatcherSUpdateDispatcherProfile(t *testing.T) { ActivationTime: time.Date(2019, 3, 1, 0, 0, 0, 0, time.UTC), ExpiryTime: time.Date(2019, 4, 1, 0, 0, 0, 0, time.UTC), } - dispatcherProfile.Conns = []*engine.DispatcherConn{ - {ID: "HOST1", Weight: 20.0}, - {ID: "HOST2", Weight: 10.0}, + dispatcherProfile.Hosts = engine.DispatcherHostProfiles{ + &engine.DispatcherHostProfile{ID: "HOST1", Weight: 20.0}, + &engine.DispatcherHostProfile{ID: "HOST2", Weight: 10.0}, } if err := dispatcherRPC.Call(utils.ApierV1SetDispatcherProfile, dispatcherProfile, &result); err != nil { diff --git a/data/conf/samples/dispatchers/dispatchers/cgrates.json b/data/conf/samples/dispatchers/dispatchers/cgrates.json index 4f492fd49..a340155ce 100755 --- a/data/conf/samples/dispatchers/dispatchers/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers/cgrates.json @@ -41,17 +41,6 @@ "attributes_conns": [ {"address": "127.0.0.1:5012", "transport": "*json"}, ], - "conns": { - "AttributeS1": [ - {"address": "127.0.0.1:5012", "transport": "*json"}, - ], - "ALL": [ - {"address": "127.0.0.1:6012", "transport": "*json"}, - ], - "ALL2": [ - {"address": "127.0.0.1:7012", "transport": "*json"}, - ], - }, }, "apier": { diff --git a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json index cb4ccf3ea..17c260645 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json @@ -50,17 +50,6 @@ "attributes_conns": [ {"address": "127.0.0.1:5012", "transport": "*json"}, ], - "conns": { - "AttributeS1": [ - {"address": "127.0.0.1:5012", "transport": "*json"}, - ], - "ALL": [ - {"address": "127.0.0.1:6012", "transport": "*json"}, - ], - "ALL2": [ - {"address": "127.0.0.1:7012", "transport": "*json"}, - ], - }, }, diff --git a/data/tariffplans/dispatchers/DispatcherHosts.csv b/data/tariffplans/dispatchers/DispatcherHosts.csv new file mode 100644 index 000000000..e18649da3 --- /dev/null +++ b/data/tariffplans/dispatchers/DispatcherHosts.csv @@ -0,0 +1,4 @@ +#Tenant[0],ID[1],Address[2],Transport[3],TLS[4] +cgrates.org,AttributeS1,127.0.0.1:5012,*json,false +cgrates.org,ALL,127.0.0.1:6012,*json,false +cgrates.org,ALL2,127.0.0.1:7012,*json,false