Forum Discussion

Roostermiester_'s avatar
Roostermiester_
Icon for Nimbostratus rankNimbostratus
May 14, 2013

Working with members in partitions

I am new to F5 LTM and working with the PS commandlets and iControl. However, there seems to be some inconsistancies in the commands. First off, we are on LTM 11.2 and it seems some of the commands found in the example scripts and documentation on the site have been depricated since 11.0. That didn't help. I've been trying to come up with a consistant way to script disabling and enabling a pool member with PowerShell. The commandlets seems to work fine with pools in the /Common partition but run into trouble with pools in partitions. This is exasterbated by the fact that the iApp creates a seperate partition for each Application Service. Here's what I've run into.

 

The command "get-f5.ltmpoolmember -pool /Common/lbtest.app/lbtest_pool" returns nothing since,presumably, it is in sub partition. I have to use "(Get-F5.iControl).LocalLBPool.get_member("/Common/lbtest.app/lbtest_pool")"

 

Am I missing something or is this the expected behavior?

 

Also, if I run "Get-F5.ltmpool", it only shows me the pools directly in the /Common parition, and nothing in sub folders.

 

2 Replies

  • Sorry about the deprecated methods. We do our best to make the methods both forward and backward compatible but the product does change and as underlying features change, the methods sometimes have to as well. In almost all cases, we've coded workarounds on the backend to make the "deprecated" methods still work with an urging to the user to migrate their code to the new methods.

     

    As for folders, you'll have to look at how they work. Check out this tech tip I wrote a while back.

     

    https://devcentral.f5.com/tech-tips...24-folders

     

    It covers iApps and how they store them as well. If you want to get a list of all objects regardless of the "active" folder, you can use the recursive_query_state method in the System.Session interface.

     

    As for the cmdlets themselves, they were written to cover a few use cases but may not have been updated to fully support folders. You might want to do what you did by using the (Get-F5.iControl) pass through to get access to the core API methods. That's how I've modeled most of my samples on DevCentral.

     

    -Joe