Forum Discussion

Baiju_7927's avatar
Baiju_7927
Icon for Nimbostratus rankNimbostratus
Jan 10, 2008

getList missing from VirtualNode ?

Hey,

I am working with the iControl java wrappers (downloaded the latest today) and the document shows this right at the beginning under "Use"


VirtualNode vn = new VirtualNode(ipAddress, username, password);
String list[] = vn.getList();

But Looking at the VirtualNode reference getList() doesn't seem to exist. Am I missing something obvious ? Is there a way to get Node Addresses using the wrapper classes ?

Keep up the good work.

Baiju

4 Replies

  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    Hi Baiju,

     

     

    You're right! We did some special stuff with VirtualNode - made it more user friendly because it is used so much - and forgot to change the document. The call is actually named getVirtualServers() and it performs the iControl API call get_list()... Which is exactly what you're after.

     

     

    I'll update the document, thanks for the heads up!

     

     

    Don.
  • Don,

    Thanks for the response but getVirtualServers does not do what I need. What I need is the same data as I would get if I were to do the following command on the BigIP hardware

    b node list

    getVirtualServers is returning the equivalent of the following

    b virtual list

    Is there a method (I may be obviously missing it) that gives me the nodes list as same as b node list would?

    Thanks.

    Baiju
  • If it's not in the Java Wrapper Library, then you can find it in the base iControl library on the iControl Assembly Labs project download page.

     

     

    This is the code you'll need to get you going.

     

     

    iControl.Interfaces interfaces = new iControl.Interfaces()
    if ( interfaces.initialize(bigip, port, user, pass) ) {
      iControl.LocalLBNodePortType t = interfaces.getLocalLBNode();
      String [] node_list = t.get_list();
    }

     

     

    -Joe
  • Don_MacVittie_1's avatar
    Don_MacVittie_1
    Historic F5 Account
    Actually, I can't recommend doing what Joe is proposing.

     

     

    The iControl for Java Assembly and the Java Wrappers were being developed at the same time, and have not (yet) been tested together.

     

     

    I am trying to squeeze in a look at the list, but have some other stuff going on at the moment.

     

     

    But remember that you have access to the API from within the Java Wrappers - just set up the connection and make the call the same as is done in the iControl samples. That should get you your list.

     

     

    Regards,

     

    Don.