Forum Discussion

Mike_63841's avatar
Icon for Nimbostratus rankNimbostratus
Dec 16, 2010

Node members of a specific Partition?

I'm just getting started (day 2) using iControl in .NET but I think I'm missing a concept that maybe I can get some help with here. Essentially what I'm looking to do is to be able and query for specific data contained within a given partition. I'm unclear on how I work within / narrow the scope of my requests to a specific partition when making a call like LocalLB.Pool.get_list. I can successfully make request about an F5’s state (m_SystemFailOver.get_failover_state()) or its Partitions member (F5Partitions() As iControl.ManagementPartitionAuthZPartition = m_management.get_partition_list()) but that’s all high level / system info. I'd like to create a function that will return to me the active nodes on a specific F5 under a specific partition.



Shown below is the basics of the function I’m looking to create. I'd think I should have to pass in the server address as well as the partition I'm interested. As for now (with no specific partition being passed) m_pool.get_list returns 0. I don't see how I can specify a partition. I thought there may be something like a public property to set but I’ve been unsuccessful thus far. Heres what I’m working with:



Private m_pool As iControl.LocalLBPool = New iControl.LocalLBPool



Function getEnabledNodes(ByVal server As String, ByVal partition As String)


Dim Nodes() As String = m_pool.get_list



I'll also note that I'm not an F5 administrator but a developer. So I concede that I might be within the wrong context of the API since I'm not very familiar with the UI/Administration otherwise. Any help to get me off the ground here would be appreciated.






2 Replies

  • Hi Mike,

    I wrote an article on the Partition methods a while back that may provide some insight.

    You probably aren't concerned with the creation of the partitions, but at the end of the article, I talk about how to control the current partition you are accessing with the Management.Partition get_active_partition() and set_active_partition() methods.

    The flow would be like this.

    // Query partition_a's pools
    String [] pool_a_list = _interfaces.LocalLBPool.get_list();
    // Query partition_b's pools
    String [] pool_b_list = _interfaces.LocalLBPool.get_list();

    You only need to call set_active_partition once as it uses a server side state for your current logged in user to determine the partition you are working in. The default setting is Common if you haven't set it.

    Hope this gives you enough to get things going. Please follow up if you have more questions.