From 6c291eb1164717d7823f44f7a439f9f1e79e433d Mon Sep 17 00:00:00 2001 From: DanB Date: Fri, 17 Apr 2015 18:03:49 +0200 Subject: [PATCH] Renaming QOS_THRESHOLD --- engine/calldesc.go | 8 ++++---- engine/lcr.go | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engine/calldesc.go b/engine/calldesc.go index 3eb2d4aa7..02dd603ec 100644 --- a/engine/calldesc.go +++ b/engine/calldesc.go @@ -751,7 +751,7 @@ func (cd *CallDescriptor) GetLCR(stats StatsInterface) (*LCRCost, error) { lcrCD.Subject = supplier var asr, acd float64 var qosSortParams []string - if lcrCost.Entry.Strategy == LCR_STRATEGY_QOS || lcrCost.Entry.Strategy == LCR_STRATEGY_QOS_WITH_THRESHOLD { + if lcrCost.Entry.Strategy == LCR_STRATEGY_QOS || lcrCost.Entry.Strategy == LCR_STRATEGY_QOS_THRESHOLD { rpfKey := utils.ConcatenatedKey(ratingProfileSearchKey, supplier) if rpf, err := dataStorage.GetRatingProfile(rpfKey, false); err == nil || rpf != nil { rpf.RatingPlanActivations.Sort() @@ -783,10 +783,10 @@ func (cd *CallDescriptor) GetLCR(stats StatsInterface) (*LCRCost, error) { acdValues.Sort() asr = utils.Avg(asrValues) acd = utils.Avg(acdValues) - if lcrCost.Entry.Strategy == LCR_STRATEGY_QOS_WITH_THRESHOLD { + if lcrCost.Entry.Strategy == LCR_STRATEGY_QOS_THRESHOLD { qosSortParams = lcrCost.Entry.GetParams() } - if lcrCost.Entry.Strategy == LCR_STRATEGY_QOS_WITH_THRESHOLD { + if lcrCost.Entry.Strategy == LCR_STRATEGY_QOS_THRESHOLD { // filter suppliers by qos thresholds asrMin, asrMax, acdMin, acdMax := lcrCost.Entry.GetQOSLimits() // skip current supplier if off limits @@ -828,7 +828,7 @@ func (cd *CallDescriptor) GetLCR(stats StatsInterface) (*LCRCost, error) { Cost: cc.Cost, Duration: cc.GetDuration(), } - if utils.IsSliceMember([]string{LCR_STRATEGY_QOS, LCR_STRATEGY_QOS_WITH_THRESHOLD}, lcrCost.Entry.Strategy) { + if utils.IsSliceMember([]string{LCR_STRATEGY_QOS, LCR_STRATEGY_QOS_THRESHOLD}, lcrCost.Entry.Strategy) { supplCost.QOS = map[string]float64{"ASR": asr, "ACD": acd} supplCost.qosSortParams = qosSortParams } diff --git a/engine/lcr.go b/engine/lcr.go index 95a0a9342..e1e3cd21b 100644 --- a/engine/lcr.go +++ b/engine/lcr.go @@ -29,11 +29,11 @@ import ( ) const ( - LCR_STRATEGY_STATIC = "*static" - LCR_STRATEGY_LOWEST = "*lowest_cost" - LCR_STRATEGY_HIGHEST = "*highest_cost" - LCR_STRATEGY_QOS_WITH_THRESHOLD = "*qos_with_threshold" - LCR_STRATEGY_QOS = "*qos" + LCR_STRATEGY_STATIC = "*static" + LCR_STRATEGY_LOWEST = "*lowest_cost" + LCR_STRATEGY_HIGHEST = "*highest_cost" + LCR_STRATEGY_QOS_THRESHOLD = "*qos_threshold" + LCR_STRATEGY_QOS = "*qos" ) type LCR struct {