Renaming QOS_THRESHOLD

This commit is contained in:
DanB
2015-04-17 18:03:49 +02:00
parent 87c6217b40
commit 6c291eb116
2 changed files with 9 additions and 9 deletions

View File

@@ -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
}

View File

@@ -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 {