mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixed conflicts
This commit is contained in:
committed by
Dan Christian Bogos
parent
93df974ba7
commit
d4d602001c
@@ -216,7 +216,7 @@ type ReplicatorSv1Interface interface {
|
||||
GetAttributeProfile(tntID *utils.TenantIDWithAPIOpts, reply *engine.AttributeProfile) error
|
||||
GetChargerProfile(tntID *utils.TenantIDWithAPIOpts, reply *engine.ChargerProfile) error
|
||||
GetDispatcherProfile(tntID *utils.TenantIDWithAPIOpts, reply *engine.DispatcherProfile) error
|
||||
GetRateProfile(tntID *utils.TenantIDWithAPIOpts, reply *engine.RateProfile) error
|
||||
GetRateProfile(tntID *utils.TenantIDWithAPIOpts, reply *utils.RateProfile) error
|
||||
GetDispatcherHost(tntID *utils.TenantIDWithAPIOpts, reply *engine.DispatcherHost) error
|
||||
GetItemLoadIDs(itemID *utils.StringWithAPIOpts, reply *map[string]int64) error
|
||||
SetThresholdProfile(th *engine.ThresholdProfileWithAPIOpts, reply *string) error
|
||||
|
||||
@@ -1020,7 +1020,7 @@ func (dS *DispatcherReplicatorSv1) GetDispatcherProfile(tntID *utils.TenantIDWit
|
||||
}
|
||||
|
||||
// GetRateProfile
|
||||
func (dS *DispatcherReplicatorSv1) GetRateProfile(tntID *utils.TenantIDWithAPIOpts, reply *engine.RateProfile) error {
|
||||
func (dS *DispatcherReplicatorSv1) GetRateProfile(tntID *utils.TenantIDWithAPIOpts, reply *utils.RateProfile) error {
|
||||
return dS.dS.ReplicatorSv1GetRateProfile(tntID, reply)
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
)
|
||||
|
||||
// GetRateProfile returns an Rate Profile
|
||||
func (apierSv1 *APIerSv1) GetRateProfile(arg *utils.TenantIDWithAPIOpts, reply *engine.RateProfile) error {
|
||||
func (apierSv1 *APIerSv1) GetRateProfile(arg *utils.TenantIDWithAPIOpts, reply *utils.RateProfile) error {
|
||||
if missing := utils.MissingStructFields(arg, []string{utils.ID}); len(missing) != 0 { //Params missing
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
@@ -88,7 +88,7 @@ func (apierSv1 *APIerSv1) GetRateProfileIDsCount(args *utils.TenantWithAPIOpts,
|
||||
}
|
||||
|
||||
//SetRateProfile add/update a new Rate Profile
|
||||
func (apierSv1 *APIerSv1) SetRateProfile(ext *engine.APIRateProfileWithOpts, reply *string) error {
|
||||
func (apierSv1 *APIerSv1) SetRateProfile(ext *utils.APIRateProfileWithOpts, reply *string) error {
|
||||
if missing := utils.MissingStructFields(ext.APIRateProfile, []string{utils.ID, utils.Rates}); len(missing) != 0 {
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
@@ -115,7 +115,7 @@ func (apierSv1 *APIerSv1) SetRateProfile(ext *engine.APIRateProfileWithOpts, rep
|
||||
}
|
||||
|
||||
//SetRateProfileRates add/update Rates from existing RateProfiles
|
||||
func (apierSv1 *APIerSv1) SetRateProfileRates(ext *engine.APIRateProfileWithOpts, reply *string) (err error) {
|
||||
func (apierSv1 *APIerSv1) SetRateProfileRates(ext *utils.APIRateProfileWithOpts, reply *string) (err error) {
|
||||
if missing := utils.MissingStructFields(ext.APIRateProfile, []string{utils.ID, utils.Rates}); len(missing) != 0 {
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ func (rplSv1 *ReplicatorSv1) GetDispatcherHost(tntID *utils.TenantIDWithAPIOpts,
|
||||
}
|
||||
|
||||
// GetRateProfile is the remote method coresponding to the dataDb driver method
|
||||
func (rplSv1 *ReplicatorSv1) GetRateProfile(tntID *utils.TenantIDWithAPIOpts, reply *engine.RateProfile) error {
|
||||
func (rplSv1 *ReplicatorSv1) GetRateProfile(tntID *utils.TenantIDWithAPIOpts, reply *utils.RateProfile) error {
|
||||
engine.UpdateReplicationFilters(utils.RateProfilePrefix, tntID.TenantID.TenantID(), utils.IfaceAsString(tntID.APIOpts[utils.RemoteHostOpt]))
|
||||
rcv, err := rplSv1.dm.DataDB().GetRateProfileDrv(tntID.Tenant, tntID.ID)
|
||||
if err != nil {
|
||||
|
||||
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package console
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -27,7 +26,7 @@ func init() {
|
||||
c := &CmdSetRateProfile{
|
||||
name: "rates_profile_set",
|
||||
rpcMethod: utils.APIerSv1SetRateProfile,
|
||||
rpcParams: &engine.APIRateProfileWithOpts{},
|
||||
rpcParams: &utils.APIRateProfileWithOpts{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -36,7 +35,7 @@ func init() {
|
||||
type CmdSetRateProfile struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.APIRateProfileWithOpts
|
||||
rpcParams *utils.APIRateProfileWithOpts
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -50,11 +49,9 @@ func (self *CmdSetRateProfile) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetRateProfile) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &v1.APIRateProfileWithCache{
|
||||
APIRateProfileWithOpts: &utils.APIRateProfileWithOpts{
|
||||
APIRateProfile: new(utils.APIRateProfile),
|
||||
Opts: make(map[string]interface{}),
|
||||
},
|
||||
self.rpcParams = &utils.APIRateProfileWithOpts{
|
||||
APIRateProfile: new(utils.APIRateProfile),
|
||||
Opts: make(map[string]interface{}),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
@@ -459,7 +459,7 @@ func (dS *DispatcherService) ReplicatorSv1GetDispatcherHost(args *utils.TenantID
|
||||
}, utils.MetaReplicator, utils.ReplicatorSv1GetDispatcherHost, args, reply)
|
||||
}
|
||||
|
||||
func (dS *DispatcherService) ReplicatorSv1GetRateProfile(args *utils.TenantIDWithAPIOpts, reply *engine.RateProfile) (err error) {
|
||||
func (dS *DispatcherService) ReplicatorSv1GetRateProfile(args *utils.TenantIDWithAPIOpts, reply *utils.RateProfile) (err error) {
|
||||
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
||||
if args.TenantID != nil && args.TenantID.Tenant != utils.EmptyString {
|
||||
tnt = args.TenantID.Tenant
|
||||
|
||||
Reference in New Issue
Block a user