Forum Discussion

Alex_110294's avatar
Alex_110294
Icon for Nimbostratus rankNimbostratus
Aug 27, 2012

How to find node name for a member within a local load balancer?

Creating a form application that will allow me to enable/disable specific members within a pool in a local load balancer. Followed one of the tutorials on how to do so, but the tutorial uses the IP:port combination to distinguish a member within the pools being listed.

 

 

However, it is more useful to me if I display the node name that is tied to that IP:port combination for the specific pool. Does anyone know what method I can call that would provide this information so that I can identify by node name the members in the pool? Thanks!

 

2 Replies

  • You'll have to dig into the LocalLB.NodeAddress and/or NodeAddressV2 interfaces to get the display names. For the NodeAddress interface, there is a "get_screen_name" method where you can pull out the screen names for a list of node addresses. With newer versions of the product, you might want to look into the NodeAddressV2 interface. The get_screen_name method is not in there anymore, but I do believe that has moved to a metadata field which you can query with one of the metadata methods. I'll dig into that and see if I can verify which one to use.

     

     

    -Joe
  • Thanks, Joe! I was able to find the get_screen_name method and get the node name. When I tried using NodeAddressV2 it said the method was not found, so I'm guessing we are using the older version of the API. Thanks again!