mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
Rename ArgRemoveAttrProfile
This commit is contained in:
committed by
Dan Christian Bogos
parent
38f1ab3da0
commit
022aa48070
@@ -52,14 +52,14 @@ func (apierV1 *ApierV1) SetAttributeProfile(extAls *engine.ExternalAttributeProf
|
||||
return nil
|
||||
}
|
||||
|
||||
type ArgRemoveAttrPrf struct {
|
||||
type ArgRemoveAttrProfile struct {
|
||||
Tenant string
|
||||
ID string
|
||||
Contexts []string
|
||||
}
|
||||
|
||||
//RemAttributeProfile remove a specific Attribute Profile
|
||||
func (apierV1 *ApierV1) RemAttributeProfile(arg *ArgRemoveAttrPrf, reply *string) error {
|
||||
func (apierV1 *ApierV1) RemAttributeProfile(arg *ArgRemoveAttrProfile, reply *string) error {
|
||||
if missing := utils.MissingStructFields(arg, []string{"Tenant", "ID", "Contexts"}); len(missing) != 0 { //Params missing
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@ func testAttributeSUpdateAlsPrf(t *testing.T) {
|
||||
func testAttributeSRemAlsPrf(t *testing.T) {
|
||||
var resp string
|
||||
if err := attrSRPC.Call("ApierV1.RemAttributeProfile",
|
||||
&ArgRemoveAttrPrf{Tenant: alsPrf.Tenant, ID: alsPrf.ID, Contexts: alsPrf.Contexts}, &resp); err != nil {
|
||||
&ArgRemoveAttrProfile{Tenant: alsPrf.Tenant, ID: alsPrf.ID, Contexts: alsPrf.Contexts}, &resp); err != nil {
|
||||
t.Error(err)
|
||||
} else if resp != utils.OK {
|
||||
t.Error("Unexpected reply returned", resp)
|
||||
|
||||
@@ -1493,13 +1493,13 @@ func testV1FIdxRemoveAttributeProfile(t *testing.T) {
|
||||
t.Errorf("Error: %+v", reply2)
|
||||
}
|
||||
if err := tFIdxRpc.Call("ApierV1.RemAttributeProfile",
|
||||
&ArgRemoveAttrPrf{Tenant: "cgrates.org", ID: "ApierTest", Contexts: []string{"*rating"}}, &resp); err != nil {
|
||||
&ArgRemoveAttrProfile{Tenant: "cgrates.org", ID: "ApierTest", Contexts: []string{"*rating"}}, &resp); err != nil {
|
||||
t.Error(err)
|
||||
} else if resp != utils.OK {
|
||||
t.Error("Unexpected reply returned", resp)
|
||||
}
|
||||
if err := tFIdxRpc.Call("ApierV1.RemAttributeProfile",
|
||||
&ArgRemoveAttrPrf{Tenant: "cgrates.org", ID: "ApierTest2", Contexts: []string{"*rating"}}, &resp); err != nil {
|
||||
&ArgRemoveAttrProfile{Tenant: "cgrates.org", ID: "ApierTest2", Contexts: []string{"*rating"}}, &resp); err != nil {
|
||||
t.Error(err)
|
||||
} else if resp != utils.OK {
|
||||
t.Error("Unexpected reply returned", resp)
|
||||
|
||||
Reference in New Issue
Block a user