public static base_responses add ( nitro_service client , route resources [ ] ) throws Exception { base_responses result = null ; if ( resources != null && resources . length > 0 ) { route addresources [ ] = new route [ resources . length ] ; for ( int i = 0 ; i < resources . length ; i ++ ) { addresources [ i ] = new route ( ) ; addresources [ i ] . network = resources [ i ] . network ; addresources [ i ] . netmask = resources [ i ] . netmask ; addresources [ i ] . gateway = resources [ i ] . gateway ; addresources [ i ] . cost = resources [ i ] . cost ; addresources [ i ] . td = resources [ i ] . td ; addresources [ i ] . distance = resources [ i ] . distance ; addresources [ i ] . cost1 = resources [ i ] . cost1 ; addresources [ i ] . weight = resources [ i ] . weight ; addresources [ i ] . advertise = resources [ i ] . advertise ; addresources [ i ] . protocol = resources [ i ] . protocol ; addresources [ i ] . msr = resources [ i ] . msr ; addresources [ i ] . monitor = resources [ i ] . monitor ; } result = add_bulk_request ( client , addresources ) ; } return result ; }
Use this API to add route resources .