cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
474
Views
2
Helpful
6
Replies
ibrahim.menem
Beginner

How to remove class-map using C API

Hi,

I'm trying to use C API to delete class-maps, I tried using :

1.  onep_policy_entry_op_remove_cmap

2.  onep_policy_cmap_op_delete

but with no success , also for some reason I get additional acl with name udb_temp_acl...

I'm using All-in-one vm, with sdk version 1.2.0.173

What is the correct way to delelet class-maps? why I get the udb_temp? if this is a platform problem where I can get the most updated API compatibility matrix?

Thanks in advance.

Ibrahim

1 ACCEPTED SOLUTION

Accepted Solutions

onep_policy_cmap_op_delete does work correctly, the problem was trying to reuse the op_list variable! creating new one solves the problem

View solution in original post

6 REPLIES 6
Joe Clarke
Hall of Fame Cisco Employee

Are you trying to remove a configured class-map, or one installed through the onePK API?

Installed through onePK using the bulk method from the  Datapath tutorial

onep_policy_cmap_op_delete does work correctly, the problem was trying to reuse the op_list variable! creating new one solves the problem

View solution in original post

well, it removes the cmap content but doesnt remove the entry!  I get a none entry

Joe Clarke
Hall of Fame Cisco Employee

Is this with the newly proposed code of:

/* modify an entry op */

rc= onep_policy_pmap_op_entry_remove(pmap_op,entry_handle,&entry_op) ;

if(rc != ONEP_OK){

LOG(ERROR, POLICY , "entry remove failed (%d) %s" , rc, onep_strerror(rc));

}

It does work when preceded with onep_policy_pmap_op_modify, I wanted to leave the thread clean indicating that the "old correct answer" was partially correct (I couldn´t edit it).

Still wondering why it is so complicated to find the correct calls needed to achieve such a basic functionality

Content for Community-Ad

This widget could not be displayed.