route-map on onePK

Document created by cdnadmin on Jan 25, 2014
Version 1Show Document
  • View in full screen mode
This document was generated from CDN thread

Created by: Tiago Primini on 05-10-2013 08:54:15 AM
Hi everyone!

I was looking for how to apply some policies through onePK API, and I have to set the following route-map configuration using API:

1#show route-map 
2route-map TESTE, permit, sequence 10 
3  Match clauses:   
4    ip address (access-lists): END_POINT_1  
5  Set clauses:   
6    ip next-hop 192.168.10.2 
7  Policy routing matches: 3201025 packets, 4837334143 bytes

I found in SDK docs and tutorials that I can use QosPolicy class in order to work work with actions, class maps, etc, and using this this class I can apply the changes using Target class.

But, I did not found how to work with routing policy using QosPolicy. I just found in docs that I can use PolicyMap class in order to add next hop action, but I do not know if I have to use this second one class and I did not know if there is some way to apply this changes and my configuration be set like displayed above (route-map). I found the code below in docs:

 1// Create a policy.
 2PolicyMap policy1 = new PolicyMap(capability);
 3
 4// Create an entry in the policy map, add class map to
 5// the entry, and then add an action to the entry.
 6PolicyMap.Entry entry1 = policy1.createEntry();
 7entry1.addClassMap(cmap1);
 8entry1.addAction(new Action.NextHop(inetAddr));
 9
10//how to apply this ???

PolicyMap doc: "If the user wants changes to occur over on the Network Element, BulkService class must be used to submit those changes so that they will be visible on the Network Element." 

How can I do it?

Thks, T Primini

Subject: RE: route-map on onePK
Replied by: Joseph Clarke on 05-10-2013 10:58:50 AM
There currently isn't any API to create route-maps.  We have already requested this (CSCuj42848) of our product team, and this should find its way into a future release.

Attachments

    Outcomes