Rename ArgRemoveAttrProfile

This commit is contained in:
TeoV
2018-01-10 13:18:37 +02:00
committed by Dan Christian Bogos
parent 38f1ab3da0
commit 022aa48070
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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