Forum Discussion
Sadhna_80746
May 01, 2012Nimbostratus
APIs to read zone resource record data
Hi,
I was trying to use the following APIs to read zone and resource record data from F5 device and found following issues:
1. iControl::Management::ResourceRecord::get_rrs_detailed
RRList [] get_rrs_detailed(
in Management_ViewZone [] view_zones
);
The syntax says that the input should be array of Management_ViewZone.
But when I pass array of Management_ViewZone to it, it considers only the first Management_ViewZone in the array and ignores rest.
2. iControl::Management::Zone::get_zone
ZoneInfo [] get_zone(
in Management_ViewZone [] view_zones
);
I found the same problem as mentioned for the above API.
Am I missing something? Can someone please help on this?
Thanks
- George_Watkins_Historic F5 AccountHi Sadhna,
package com.f5se.examples; import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; public class GetDetailedResourceRecord { public static void main(String[] args) { iControl.BigIP bigip = new iControl.BigIP("test-ltm-01", "admin", "admin"); bigip.setIgnoreInvalidCert(true); iControl.services.ManagementViewZone[] view_zones = new iControl.services.ManagementViewZone[2]; view_zones[0] = new iControl.services.ManagementViewZone(); view_zones[0].setView_name("external"); view_zones[0].setZone_name("test.local."); view_zones[1] = new iControl.services.ManagementViewZone(); view_zones[1].setView_name("external"); view_zones[1].setZone_name("test2.local."); try { iControl.services.ManagementRRList[] rr_list = bigip.ManagementResourceRecord().get_rrs_detailed(view_zones); for (iControl.services.ManagementRRList rr : rr_list) { iControl.services.ManagementARecord[] a_records = rr.getA_list(); System.out.print("domain_name: "); System.out.print(a_records[0].getDomain_name()); System.out.print(", IP: "); System.out.println(a_records[0].getIp_address()); } } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects