mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
add implementation for new ips module
This commit is contained in:
committed by
Dan Christian Bogos
parent
d6676866d5
commit
43cdd396ba
@@ -1422,6 +1422,43 @@ func (trp *TPResourceProfile) CacheClone() any {
|
||||
return trp.Clone()
|
||||
}
|
||||
|
||||
// TPIPProfile is used in APIs to manage remotely offline IPProfile
|
||||
type TPIPProfile struct {
|
||||
TPid string
|
||||
Tenant string
|
||||
ID string
|
||||
FilterIDs []string
|
||||
ActivationInterval *TPActivationInterval
|
||||
TTL string
|
||||
Type string
|
||||
AddressPool string
|
||||
Allocation string
|
||||
Stored bool
|
||||
Weight float64
|
||||
}
|
||||
|
||||
// Clone method for TPIPProfile
|
||||
func (tp *TPIPProfile) Clone() *TPIPProfile {
|
||||
if tp == nil {
|
||||
return nil
|
||||
}
|
||||
return &TPIPProfile{
|
||||
TPid: tp.TPid,
|
||||
Tenant: tp.Tenant,
|
||||
ID: tp.ID,
|
||||
FilterIDs: slices.Clone(tp.FilterIDs),
|
||||
ActivationInterval: tp.ActivationInterval.Clone(),
|
||||
TTL: tp.TTL,
|
||||
Stored: tp.Stored,
|
||||
Weight: tp.Weight,
|
||||
}
|
||||
}
|
||||
|
||||
// CacheClone returns a clone of TPIPProfile used by ltcache CacheCloner
|
||||
func (tp *TPIPProfile) CacheClone() any {
|
||||
return tp.Clone()
|
||||
}
|
||||
|
||||
// TPActivationInterval represents an activation interval for an item
|
||||
type TPActivationInterval struct {
|
||||
ActivationTime string
|
||||
@@ -2312,6 +2349,8 @@ func NewAttrReloadCacheWithOpts() *AttrReloadCacheWithAPIOpts {
|
||||
SharedGroupIDs: []string{MetaAny},
|
||||
ResourceProfileIDs: []string{MetaAny},
|
||||
ResourceIDs: []string{MetaAny},
|
||||
IPProfileIDs: []string{MetaAny},
|
||||
IPIDs: []string{MetaAny},
|
||||
StatsQueueIDs: []string{MetaAny},
|
||||
StatsQueueProfileIDs: []string{MetaAny},
|
||||
RankingIDs: []string{MetaAny},
|
||||
@@ -2329,6 +2368,7 @@ func NewAttrReloadCacheWithOpts() *AttrReloadCacheWithAPIOpts {
|
||||
TimingIDs: []string{MetaAny},
|
||||
AttributeFilterIndexIDs: []string{MetaAny},
|
||||
ResourceFilterIndexIDs: []string{MetaAny},
|
||||
IPFilterIndexIDs: []string{MetaAny},
|
||||
StatFilterIndexIDs: []string{MetaAny},
|
||||
ThresholdFilterIndexIDs: []string{MetaAny},
|
||||
RouteFilterIndexIDs: []string{MetaAny},
|
||||
@@ -2355,6 +2395,8 @@ func NewAttrReloadCacheWithOptsFromMap(arg map[string][]string, tnt string, opts
|
||||
SharedGroupIDs: arg[CacheSharedGroups],
|
||||
ResourceProfileIDs: arg[CacheResourceProfiles],
|
||||
ResourceIDs: arg[CacheResources],
|
||||
IPProfileIDs: arg[CacheIPProfiles],
|
||||
IPIDs: arg[CacheIPs],
|
||||
StatsQueueIDs: arg[CacheStatQueues],
|
||||
StatsQueueProfileIDs: arg[CacheStatQueueProfiles],
|
||||
RankingIDs: arg[CacheRankings],
|
||||
@@ -2373,6 +2415,7 @@ func NewAttrReloadCacheWithOptsFromMap(arg map[string][]string, tnt string, opts
|
||||
TimingIDs: arg[CacheTimings],
|
||||
AttributeFilterIndexIDs: arg[CacheAttributeFilterIndexes],
|
||||
ResourceFilterIndexIDs: arg[CacheResourceFilterIndexes],
|
||||
IPFilterIndexIDs: arg[CacheIPFilterIndexes],
|
||||
StatFilterIndexIDs: arg[CacheStatFilterIndexes],
|
||||
ThresholdFilterIndexIDs: arg[CacheThresholdFilterIndexes],
|
||||
RouteFilterIndexIDs: arg[CacheRouteFilterIndexes],
|
||||
@@ -2396,6 +2439,8 @@ type AttrReloadCacheWithAPIOpts struct {
|
||||
SharedGroupIDs []string `json:",omitempty"`
|
||||
ResourceProfileIDs []string `json:",omitempty"`
|
||||
ResourceIDs []string `json:",omitempty"`
|
||||
IPProfileIDs []string `json:",omitempty"`
|
||||
IPIDs []string `json:",omitempty"`
|
||||
StatsQueueIDs []string `json:",omitempty"`
|
||||
StatsQueueProfileIDs []string `json:",omitempty"`
|
||||
RankingIDs []string `json:",omitempty"`
|
||||
@@ -2414,6 +2459,7 @@ type AttrReloadCacheWithAPIOpts struct {
|
||||
TimingIDs []string `json:",omitempty"`
|
||||
AttributeFilterIndexIDs []string `json:",omitempty"`
|
||||
ResourceFilterIndexIDs []string `json:",omitempty"`
|
||||
IPFilterIndexIDs []string `json:",omitempty"`
|
||||
StatFilterIndexIDs []string `json:",omitempty"`
|
||||
ThresholdFilterIndexIDs []string `json:",omitempty"`
|
||||
RouteFilterIndexIDs []string `json:",omitempty"`
|
||||
@@ -2435,6 +2481,8 @@ func (a *AttrReloadCacheWithAPIOpts) Map() map[string][]string {
|
||||
CacheSharedGroups: a.SharedGroupIDs,
|
||||
CacheResourceProfiles: a.ResourceProfileIDs,
|
||||
CacheResources: a.ResourceIDs,
|
||||
CacheIPProfiles: a.IPProfileIDs,
|
||||
CacheIPs: a.IPIDs,
|
||||
CacheStatQueues: a.StatsQueueIDs,
|
||||
CacheStatQueueProfiles: a.StatsQueueProfileIDs,
|
||||
CacheThresholds: a.ThresholdIDs,
|
||||
@@ -2453,6 +2501,7 @@ func (a *AttrReloadCacheWithAPIOpts) Map() map[string][]string {
|
||||
CacheTimings: a.TimingIDs,
|
||||
CacheAttributeFilterIndexes: a.AttributeFilterIndexIDs,
|
||||
CacheResourceFilterIndexes: a.ResourceFilterIndexIDs,
|
||||
CacheIPFilterIndexes: a.IPFilterIndexIDs,
|
||||
CacheStatFilterIndexes: a.StatFilterIndexIDs,
|
||||
CacheThresholdFilterIndexes: a.ThresholdFilterIndexIDs,
|
||||
CacheRouteFilterIndexes: a.RouteFilterIndexIDs,
|
||||
|
||||
@@ -977,6 +977,8 @@ func TestNewAttrReloadCacheWithOpts(t *testing.T) {
|
||||
SharedGroupIDs: []string{MetaAny},
|
||||
ResourceProfileIDs: []string{MetaAny},
|
||||
ResourceIDs: []string{MetaAny},
|
||||
IPProfileIDs: []string{MetaAny},
|
||||
IPIDs: []string{MetaAny},
|
||||
StatsQueueIDs: []string{MetaAny},
|
||||
StatsQueueProfileIDs: []string{MetaAny},
|
||||
ThresholdIDs: []string{MetaAny},
|
||||
@@ -993,6 +995,7 @@ func TestNewAttrReloadCacheWithOpts(t *testing.T) {
|
||||
TimingIDs: []string{MetaAny},
|
||||
AttributeFilterIndexIDs: []string{MetaAny},
|
||||
ResourceFilterIndexIDs: []string{MetaAny},
|
||||
IPFilterIndexIDs: []string{MetaAny},
|
||||
StatFilterIndexIDs: []string{MetaAny},
|
||||
ThresholdFilterIndexIDs: []string{MetaAny},
|
||||
RouteFilterIndexIDs: []string{MetaAny},
|
||||
|
||||
101
utils/consts.go
101
utils/consts.go
@@ -36,20 +36,31 @@ var (
|
||||
CacheCDRIDs, CacheRPCConnections, CacheUCH, CacheSTIR, CacheEventCharges, MetaAPIBan, MetaSentryPeer,
|
||||
CacheRatingProfilesTmp, CacheCapsEvents, CacheReplicationHosts})
|
||||
|
||||
DataDBPartitions = NewStringSet([]string{CacheDestinations, CacheReverseDestinations, CacheRatingPlans,
|
||||
CacheRatingProfiles, CacheDispatcherProfiles, CacheDispatcherHosts, CacheChargerProfiles, CacheActions, CacheActionTriggers, CacheSharedGroups, CacheTimings,
|
||||
CacheResourceProfiles, CacheResources, CacheEventResources, CacheStatQueueProfiles, CacheRankingProfiles, CacheRankings, CacheStatQueues,
|
||||
CacheThresholdProfiles, CacheThresholds, CacheFilters, CacheRouteProfiles, CacheAttributeProfiles, CacheTrendProfiles, CacheTrends,
|
||||
CacheResourceFilterIndexes, CacheStatFilterIndexes, CacheThresholdFilterIndexes, CacheRouteFilterIndexes,
|
||||
CacheAttributeFilterIndexes, CacheChargerFilterIndexes, CacheDispatcherFilterIndexes, CacheLoadIDs,
|
||||
CacheReverseFilterIndexes, CacheActionPlans, CacheAccountActionPlans, CacheAccounts, CacheVersions})
|
||||
DataDBPartitions = NewStringSet([]string{
|
||||
CacheDestinations, CacheReverseDestinations, CacheRatingPlans,
|
||||
CacheRatingProfiles, CacheDispatcherProfiles, CacheDispatcherHosts,
|
||||
CacheChargerProfiles, CacheActions, CacheActionTriggers, CacheSharedGroups,
|
||||
CacheTimings, CacheResourceProfiles, CacheResources, CacheEventResources,
|
||||
CacheIPProfiles, CacheIPs, CacheEventIPs, CacheStatQueueProfiles,
|
||||
CacheRankingProfiles, CacheRankings, CacheStatQueues, CacheThresholdProfiles,
|
||||
CacheThresholds, CacheFilters, CacheRouteProfiles, CacheAttributeProfiles,
|
||||
CacheTrendProfiles, CacheTrends, CacheResourceFilterIndexes, CacheIPFilterIndexes,
|
||||
CacheStatFilterIndexes, CacheThresholdFilterIndexes, CacheRouteFilterIndexes,
|
||||
CacheAttributeFilterIndexes, CacheChargerFilterIndexes,
|
||||
CacheDispatcherFilterIndexes, CacheLoadIDs, CacheReverseFilterIndexes,
|
||||
CacheActionPlans, CacheAccountActionPlans, CacheAccounts, CacheVersions,
|
||||
})
|
||||
|
||||
StorDBPartitions = NewStringSet([]string{CacheTBLTPTimings, CacheTBLTPDestinations, CacheTBLTPRates, CacheTBLTPDestinationRates,
|
||||
CacheTBLTPRatingPlans, CacheTBLTPRatingProfiles, CacheTBLTPSharedGroups, CacheTBLTPActions,
|
||||
CacheTBLTPActionPlans, CacheTBLTPActionTriggers, CacheTBLTPAccountActions, CacheTBLTPResources,
|
||||
CacheTBLTPStats, CacheTBLTPThresholds, CacheTBLTPRankings, CacheTBLTPFilters, CacheSessionCostsTBL, CacheCDRsTBL,
|
||||
CacheTBLTPRoutes, CacheTBLTPAttributes, CacheTBLTPChargers, CacheTBLTPDispatchers,
|
||||
CacheTBLTPDispatcherHosts, CacheVersions})
|
||||
StorDBPartitions = NewStringSet([]string{
|
||||
CacheTBLTPTimings, CacheTBLTPDestinations, CacheTBLTPRates,
|
||||
CacheTBLTPDestinationRates, CacheTBLTPRatingPlans, CacheTBLTPRatingProfiles,
|
||||
CacheTBLTPSharedGroups, CacheTBLTPActions, CacheTBLTPActionPlans,
|
||||
CacheTBLTPActionTriggers, CacheTBLTPAccountActions, CacheTBLTPResources,
|
||||
CacheTBLTPIPs, CacheTBLTPStats, CacheTBLTPThresholds, CacheTBLTPRankings,
|
||||
CacheTBLTPFilters, CacheSessionCostsTBL, CacheCDRsTBL, CacheTBLTPRoutes,
|
||||
CacheTBLTPAttributes, CacheTBLTPChargers, CacheTBLTPDispatchers,
|
||||
CacheTBLTPDispatcherHosts, CacheVersions,
|
||||
})
|
||||
|
||||
// CachePartitions enables creation of cache partitions
|
||||
CachePartitions = JoinStringSet(extraDBPartition, DataDBPartitions)
|
||||
@@ -66,6 +77,8 @@ var (
|
||||
CacheSharedGroups: SharedGroupPrefix,
|
||||
CacheResourceProfiles: ResourceProfilesPrefix,
|
||||
CacheResources: ResourcesPrefix,
|
||||
CacheIPProfiles: IPProfilesPrefix,
|
||||
CacheIPs: IPsPrefix,
|
||||
CacheTimings: TimingsPrefix,
|
||||
CacheStatQueueProfiles: StatQueueProfilePrefix,
|
||||
CacheStatQueues: StatQueuePrefix,
|
||||
@@ -82,6 +95,7 @@ var (
|
||||
CacheDispatcherProfiles: DispatcherProfilePrefix,
|
||||
CacheDispatcherHosts: DispatcherHostPrefix,
|
||||
CacheResourceFilterIndexes: ResourceFilterIndexes,
|
||||
CacheIPFilterIndexes: IPFilterIndexes,
|
||||
CacheStatFilterIndexes: StatFilterIndexes,
|
||||
CacheThresholdFilterIndexes: ThresholdFilterIndexes,
|
||||
CacheRouteFilterIndexes: RouteFilterIndexes,
|
||||
@@ -100,6 +114,7 @@ var (
|
||||
CacheIndexesToPrefix = map[string]string{ // used by match index to get all the ids when index selects is disabled and for compute indexes
|
||||
CacheThresholdFilterIndexes: ThresholdProfilePrefix,
|
||||
CacheResourceFilterIndexes: ResourceProfilesPrefix,
|
||||
CacheIPFilterIndexes: IPProfilesPrefix,
|
||||
CacheStatFilterIndexes: StatQueueProfilePrefix,
|
||||
CacheRouteFilterIndexes: RouteProfilePrefix,
|
||||
CacheAttributeFilterIndexes: AttributeProfilePrefix,
|
||||
@@ -111,6 +126,7 @@ var (
|
||||
CacheInstanceToCacheIndex = map[string]string{
|
||||
CacheThresholdProfiles: CacheThresholdFilterIndexes,
|
||||
CacheResourceProfiles: CacheResourceFilterIndexes,
|
||||
CacheIPProfiles: CacheIPFilterIndexes,
|
||||
CacheStatQueueProfiles: CacheStatFilterIndexes,
|
||||
CacheRouteProfiles: CacheRouteFilterIndexes,
|
||||
CacheAttributeProfiles: CacheAttributeFilterIndexes,
|
||||
@@ -138,6 +154,7 @@ var (
|
||||
TBLTPActionTriggers: CacheTBLTPActionTriggers,
|
||||
TBLTPAccountActions: CacheTBLTPAccountActions,
|
||||
TBLTPResources: CacheTBLTPResources,
|
||||
TBLTPIPs: CacheTBLTPIPs,
|
||||
TBLTPStats: CacheTBLTPStats,
|
||||
TBLTPTrends: CacheTBLTPTrends,
|
||||
TBLTPRankings: CacheTBLTPRankings,
|
||||
@@ -295,6 +312,8 @@ const (
|
||||
UsersPrefix = "usr_"
|
||||
ResourcesPrefix = "res_"
|
||||
ResourceProfilesPrefix = "rsp_"
|
||||
IPsPrefix = "ips_"
|
||||
IPProfilesPrefix = "ipp_"
|
||||
ThresholdPrefix = "thd_"
|
||||
TrendPrefix = "trd_"
|
||||
RankingPrefix = "rnk_"
|
||||
@@ -481,7 +500,6 @@ const (
|
||||
ID = "ID"
|
||||
UniqueID = "UniqueID"
|
||||
Address = "Address"
|
||||
Addresses = "Addresses"
|
||||
Transport = "Transport"
|
||||
TLS = "TLS"
|
||||
Subsystems = "Subsystems"
|
||||
@@ -552,6 +570,7 @@ const (
|
||||
Timing = "Timing"
|
||||
RQF = "RQF"
|
||||
Resource = "Resource"
|
||||
IP = "IP"
|
||||
User = "User"
|
||||
Subscribers = "Subscribers"
|
||||
DerivedChargersV = "DerivedChargers"
|
||||
@@ -577,6 +596,8 @@ const (
|
||||
UsageTTL = "UsageTTL"
|
||||
AllocationMessage = "AllocationMessage"
|
||||
Stored = "Stored"
|
||||
AddressPool = "AddressPool"
|
||||
Allocation = "Allocation"
|
||||
RatingSubject = "RatingSubject"
|
||||
Categories = "Categories"
|
||||
Blocker = "Blocker"
|
||||
@@ -1057,6 +1078,7 @@ const (
|
||||
MetaActionTriggers = "*action_triggers"
|
||||
MetaActions = "*actions"
|
||||
MetaResourceProfile = "*resource_profiles"
|
||||
MetaIPProfiles = "*ip_profiles"
|
||||
MetaStatQueueProfiles = "*statqueue_profiles"
|
||||
MetaStatQueues = "*statqueues"
|
||||
MetaRankingProfiles = "*ranking_profiles"
|
||||
@@ -1070,6 +1092,8 @@ const (
|
||||
MetaThresholds = "*thresholds"
|
||||
MetaRoutes = "*routes"
|
||||
MetaAttributes = "*attributes"
|
||||
MetaResources = "*resources"
|
||||
MetaIPs = "*ips"
|
||||
MetaSessionsBackup = "*sessions_backup"
|
||||
MetaLoadIDs = "*load_ids"
|
||||
MetaNodeID = "*node_id"
|
||||
@@ -1122,6 +1146,7 @@ const (
|
||||
TrendS = "TrendS"
|
||||
RankingS = "RankingS"
|
||||
ThresholdS = "ThresholdS"
|
||||
IPs = "IPs"
|
||||
)
|
||||
|
||||
// Lower service names
|
||||
@@ -1217,6 +1242,7 @@ const (
|
||||
MetaTpSharedGroups = "*tp_shared_groups"
|
||||
MetaTpRatingProfiles = "*tp_rating_profiles"
|
||||
MetaTpResources = "*tp_resources"
|
||||
MetaTpIPs = "*tp_ips"
|
||||
MetaTpRates = "*tp_rates"
|
||||
MetaTpTimings = "*tp_timings"
|
||||
MetaTpDestinations = "*tp_destinations"
|
||||
@@ -1257,9 +1283,11 @@ const (
|
||||
TpSharedGroups = "TpSharedGroups"
|
||||
TpRatingProfiles = "TpRatingProfiles"
|
||||
TpResources = "TpResources"
|
||||
TpIPs = "TpIPs"
|
||||
TpRates = "TpRates"
|
||||
TpTiming = "TpTiming"
|
||||
TpResource = "TpResource"
|
||||
TpIP = "TpIP"
|
||||
TpDestinations = "TpDestinations"
|
||||
TpRatingPlan = "TpRatingPlan"
|
||||
TpRatingProfile = "TpRatingProfile"
|
||||
@@ -1285,6 +1313,7 @@ const (
|
||||
AttributeSv1 = "AttributeSv1"
|
||||
SessionSv1 = "SessionSv1"
|
||||
ChargerSv1 = "ChargerSv1"
|
||||
IPsV1 = "IPsV1"
|
||||
MetaAuth = "*auth"
|
||||
APIMethods = "APIMethods"
|
||||
NestingSep = "."
|
||||
@@ -1307,7 +1336,6 @@ const (
|
||||
MetaLessOrEqual = "*lte"
|
||||
MetaGreaterThan = "*gt"
|
||||
MetaGreaterOrEqual = "*gte"
|
||||
MetaResources = "*resources"
|
||||
MetaEqual = "*eq"
|
||||
MetaIPNet = "*ipnet"
|
||||
MetaAPIBan = "*apiban"
|
||||
@@ -1360,6 +1388,8 @@ const (
|
||||
ReplicatorSv1GetTiming = "ReplicatorSv1.GetTiming"
|
||||
ReplicatorSv1GetResource = "ReplicatorSv1.GetResource"
|
||||
ReplicatorSv1GetResourceProfile = "ReplicatorSv1.GetResourceProfile"
|
||||
ReplicatorSv1GetIP = "ReplicatorSv1.GetIP"
|
||||
ReplicatorSv1GetIPProfile = "ReplicatorSv1.GetIPProfile"
|
||||
ReplicatorSv1GetActionTriggers = "ReplicatorSv1.GetActionTriggers"
|
||||
ReplicatorSv1GetSharedGroup = "ReplicatorSv1.GetSharedGroup"
|
||||
ReplicatorSv1GetActions = "ReplicatorSv1.GetActions"
|
||||
@@ -1389,6 +1419,8 @@ const (
|
||||
ReplicatorSv1SetTiming = "ReplicatorSv1.SetTiming"
|
||||
ReplicatorSv1SetResource = "ReplicatorSv1.SetResource"
|
||||
ReplicatorSv1SetResourceProfile = "ReplicatorSv1.SetResourceProfile"
|
||||
ReplicatorSv1SetIP = "ReplicatorSv1.SetIP"
|
||||
ReplicatorSv1SetIPProfile = "ReplicatorSv1.SetIPProfile"
|
||||
ReplicatorSv1SetActionTriggers = "ReplicatorSv1.SetActionTriggers"
|
||||
ReplicatorSv1SetSharedGroup = "ReplicatorSv1.SetSharedGroup"
|
||||
ReplicatorSv1SetActions = "ReplicatorSv1.SetActions"
|
||||
@@ -1418,6 +1450,8 @@ const (
|
||||
ReplicatorSv1RemoveTiming = "ReplicatorSv1.RemoveTiming"
|
||||
ReplicatorSv1RemoveResource = "ReplicatorSv1.RemoveResource"
|
||||
ReplicatorSv1RemoveResourceProfile = "ReplicatorSv1.RemoveResourceProfile"
|
||||
ReplicatorSv1RemoveIP = "ReplicatorSv1.RemoveIP"
|
||||
ReplicatorSv1RemoveIPProfile = "ReplicatorSv1.RemoveIPProfile"
|
||||
ReplicatorSv1RemoveActionTriggers = "ReplicatorSv1.RemoveActionTriggers"
|
||||
ReplicatorSv1RemoveSharedGroup = "ReplicatorSv1.RemoveSharedGroup"
|
||||
ReplicatorSv1RemoveActions = "ReplicatorSv1.RemoveActions"
|
||||
@@ -1447,6 +1481,7 @@ const (
|
||||
APIerSv1GetReverseFilterHealth = "APIerSv1.GetReverseFilterHealth"
|
||||
APIerSv1GetThresholdsIndexesHealth = "APIerSv1.GetThresholdsIndexesHealth"
|
||||
APIerSv1GetResourcesIndexesHealth = "APIerSv1.GetResourcesIndexesHealth"
|
||||
APIerSv1GetIPsIndexesHealth = "APIerSv1.GetIPsIndexesHealth"
|
||||
APIerSv1GetStatsIndexesHealth = "APIerSv1.GetStatsIndexesHealth"
|
||||
APIerSv1GetRoutesIndexesHealth = "APIerSv1.GetRoutesIndexesHealth"
|
||||
APIerSv1GetChargersIndexesHealth = "APIerSv1.GetChargersIndexesHealth"
|
||||
@@ -1533,6 +1568,9 @@ const (
|
||||
APIerSv1GetTPResource = "APIerSv1.GetTPResource"
|
||||
APIerSv1SetTPResource = "APIerSv1.SetTPResource"
|
||||
APIerSv1RemoveTPResource = "APIerSv1.RemoveTPResource"
|
||||
APIerSv1GetTPIP = "APIerSv1.GetTPIP"
|
||||
APIerSv1SetTPIP = "APIerSv1.SetTPIP"
|
||||
APIerSv1RemoveTPIP = "APIerSv1.RemoveTPIP"
|
||||
APIerSv1SetTPRate = "APIerSv1.SetTPRate"
|
||||
APIerSv1GetTPRate = "APIerSv1.GetTPRate"
|
||||
APIerSv1RemoveTPRate = "APIerSv1.RemoveTPRate"
|
||||
@@ -1813,6 +1851,20 @@ const (
|
||||
APIerSv1GetResourceProfileIDs = "APIerSv1.GetResourceProfileIDs"
|
||||
)
|
||||
|
||||
// IPs APIs
|
||||
const (
|
||||
IPsV1AuthorizeIPs = "IPsV1.AuthorizeIPs"
|
||||
IPsV1GetIPsForEvent = "IPsV1.GetIPsForEvent"
|
||||
IPsV1AllocateIPs = "IPsV1.AllocateIPs"
|
||||
IPsV1ReleaseIPs = "IPsV1.ReleaseIPs"
|
||||
IPsV1Ping = "IPsV1.Ping"
|
||||
IPsV1GetIP = "IPsV1.GetIP"
|
||||
APIerSv1SetIPProfile = "APIerSv1.SetIPProfile"
|
||||
APIerSv1RemoveIPProfile = "APIerSv1.RemoveIPProfile"
|
||||
APIerSv1GetIPProfile = "APIerSv1.GetIPProfile"
|
||||
APIerSv1GetIPProfileIDs = "APIerSv1.GetIPProfileIDs"
|
||||
)
|
||||
|
||||
// SessionS APIs
|
||||
const (
|
||||
SessionSv1AuthorizeEvent = "SessionSv1.AuthorizeEvent"
|
||||
@@ -2012,6 +2064,7 @@ const (
|
||||
ActionTriggersCsv = "ActionTriggers.csv"
|
||||
AccountActionsCsv = "AccountActions.csv"
|
||||
ResourcesCsv = "Resources.csv"
|
||||
IPsCsv = "IPs.csv"
|
||||
StatsCsv = "Stats.csv"
|
||||
TrendsCsv = "Trends.csv"
|
||||
RankingsCsv = "Rankings.csv"
|
||||
@@ -2038,6 +2091,7 @@ const (
|
||||
TBLTPActionTriggers = "tp_action_triggers"
|
||||
TBLTPAccountActions = "tp_account_actions"
|
||||
TBLTPResources = "tp_resources"
|
||||
TBLTPIPs = "tp_ips"
|
||||
TBLTPStats = "tp_stats"
|
||||
TBLTPRankings = "tp_rankings"
|
||||
TBLTPTrends = "tp_trends"
|
||||
@@ -2067,8 +2121,11 @@ const (
|
||||
CacheSharedGroups = "*shared_groups"
|
||||
CacheResources = "*resources"
|
||||
CacheResourceProfiles = "*resource_profiles"
|
||||
CacheIPs = "*ips"
|
||||
CacheIPProfiles = "*ip_profiles"
|
||||
CacheTimings = "*timings"
|
||||
CacheEventResources = "*event_resources"
|
||||
CacheEventIPs = "*event_ips"
|
||||
CacheStatQueueProfiles = "*statqueue_profiles"
|
||||
CacheStatQueues = "*statqueues"
|
||||
CacheRankingProfiles = "*ranking_profiles"
|
||||
@@ -2087,6 +2144,7 @@ const (
|
||||
CacheDispatcherRoutes = "*dispatcher_routes"
|
||||
CacheDispatcherLoads = "*dispatcher_loads"
|
||||
CacheResourceFilterIndexes = "*resource_filter_indexes"
|
||||
CacheIPFilterIndexes = "*ip_filter_indexes"
|
||||
CacheStatFilterIndexes = "*stat_filter_indexes"
|
||||
CacheThresholdFilterIndexes = "*threshold_filter_indexes"
|
||||
CacheRankingFilterIndexes = "ranking_filter_indexes"
|
||||
@@ -2127,6 +2185,7 @@ const (
|
||||
CacheTBLTPActionTriggers = "*tp_action_triggers"
|
||||
CacheTBLTPAccountActions = "*tp_account_actions"
|
||||
CacheTBLTPResources = "*tp_resources"
|
||||
CacheTBLTPIPs = "*tp_ips"
|
||||
CacheTBLTPStats = "*tp_stats"
|
||||
CacheTBLTPTrends = "*tp_trends"
|
||||
CacheTBLTPRankings = "*tp_rankings"
|
||||
@@ -2144,6 +2203,7 @@ const (
|
||||
// Prefix for indexing
|
||||
const (
|
||||
ResourceFilterIndexes = "rfi_"
|
||||
IPFilterIndexes = "ifi_"
|
||||
StatFilterIndexes = "sfi_"
|
||||
ThresholdFilterIndexes = "tfi_"
|
||||
AttributeFilterIndexes = "afi_"
|
||||
@@ -2553,6 +2613,9 @@ const (
|
||||
MetaUsageTTLCfg = "*usageTTL"
|
||||
MetaUnitsCfg = "*units"
|
||||
|
||||
// IPsCfg
|
||||
MetaTTLCfg = "*ttl"
|
||||
|
||||
// RoutesCfg
|
||||
MetaProfileCountCfg = "*profileCount"
|
||||
MetaIgnoreErrorsCfg = "*ignoreErrors"
|
||||
@@ -2756,8 +2819,8 @@ var CGROptionsSet = NewStringSet([]string{OptsSessionsTTL,
|
||||
OptsRoutesProfileCount, OptsDispatchersProfilesCount, OptsAttributesProfileRuns,
|
||||
OptsAttributesProfileIgnoreFilters, OptsStatsProfileIDs, OptsStatsProfileIgnoreFilters,
|
||||
OptsThresholdsProfileIDs, OptsThresholdsProfileIgnoreFilters, OptsResourcesUsageID, OptsResourcesUsageTTL,
|
||||
OptsResourcesUnits, OptsAttributeS, OptsThresholdS, OptsChargerS, OptsStatS, OptsRALs, OptsRerate,
|
||||
OptsRefund, MetaAccountID})
|
||||
OptsResourcesUnits, OptsIPsUsageID, OptsIPsTTL, OptsIPsUnits, OptsAttributeS, OptsThresholdS, OptsChargerS,
|
||||
OptsStatS, OptsRALs, OptsRerate, OptsRefund, MetaAccountID})
|
||||
|
||||
// EventExporter metrics
|
||||
const (
|
||||
@@ -2806,6 +2869,10 @@ const (
|
||||
OptsResourcesUsageID = "*rsUsageID"
|
||||
OptsResourcesUsageTTL = "*rsUsageTTL"
|
||||
OptsResourcesUnits = "*rsUnits"
|
||||
// IPs
|
||||
OptsIPsUsageID = "*ipUsageID"
|
||||
OptsIPsTTL = "*ipTTL"
|
||||
OptsIPsUnits = "*ipUnits"
|
||||
// Routes
|
||||
OptsRoutesProfileCount = "*rouProfileCount"
|
||||
OptsRoutesLimit = "*rouLimit"
|
||||
|
||||
@@ -48,6 +48,8 @@ var (
|
||||
ErrNotConvertible = errors.New("NOT_CONVERTIBLE")
|
||||
ErrResourceUnavailable = errors.New("RESOURCE_UNAVAILABLE")
|
||||
ErrResourceUnauthorized = errors.New("RESOURCE_UNAUTHORIZED")
|
||||
ErrIPUnavailable = errors.New("IP_UNAVAILABLE")
|
||||
ErrIPUnauthorized = errors.New("IP_UNAUTHORIZED")
|
||||
ErrNoActiveSession = errors.New("NO_ACTIVE_SESSION")
|
||||
ErrPartiallyExecuted = errors.New("PARTIALLY_EXECUTED")
|
||||
ErrMaxUsageExceeded = errors.New("MAX_USAGE_EXCEEDED")
|
||||
@@ -105,6 +107,8 @@ var (
|
||||
ErrNotConvertible.Error(): ErrNotConvertible,
|
||||
ErrResourceUnavailable.Error(): ErrResourceUnavailable,
|
||||
ErrResourceUnauthorized.Error(): ErrResourceUnauthorized,
|
||||
ErrIPUnavailable.Error(): ErrIPUnavailable,
|
||||
ErrIPUnauthorized.Error(): ErrIPUnauthorized,
|
||||
ErrNoActiveSession.Error(): ErrNoActiveSession,
|
||||
ErrPartiallyExecuted.Error(): ErrPartiallyExecuted,
|
||||
ErrMaxUsageExceeded.Error(): ErrMaxUsageExceeded,
|
||||
|
||||
Reference in New Issue
Block a user