Forum Discussion
Wes_98098
Nimbostratus
Jul 24, 2009iControl.CommonIPPortDefinition
Hello, I have a BIG-IP 9.1.2 Build 40.6 that I'm trying to query with the PowerShell iControls and I'm not sure about the results I'm getting back.
Here are the steps that I have been through:
add-pssnapin icontrolsnapin
Initialize-F5.iControl -hostname ... (I'm getting logged in fine)
$ic = Get-F5.iControl
$objVirtualServers = $ic.LocalLBVirtualServer.get_list()
$objPools = $ic.LocalLBVirtualServer.get_default_pool_name($objVirtualServers[0])
$objPoolMembers = $ic.LocalLBPool.get_member($objPools)
$objPoolMembers
address port
------- ----
192.168.1.101 80
192.168.1.102 80
192.168.1.103 80
192.168.1.104 80
$ic.LocalLBPoolMember.get_object_status($objPools)
member object_status
------ -------------
iControl.CommonIPPortDefinition iControl.LocalLBObjectStatus
iControl.CommonIPPortDefinition iControl.LocalLBObjectStatus
iControl.CommonIPPortDefinition iControl.LocalLBObjectStatus
iControl.CommonIPPortDefinition iControl.LocalLBObjectStatus
$ic.LocalLBPoolMember.get_session_status($objPools)
member session_status
------ --------------
iControl.CommonIPPortDefinition SESSION_STATUS_ADDRESS_DISABLED
iControl.CommonIPPortDefinition SESSION_STATUS_ENABLED
iControl.CommonIPPortDefinition SESSION_STATUS_ENABLED
iControl.CommonIPPortDefinition SESSION_STATUS_ADDRESS_DISABLED
So my question is: Why am I getting results that say "iControl.CommonIPPortDefinition" and "iControl.LocalLBObjectStatus"?
- Let's look at the get_object_status method first. The signature for that method is:
MemberObjectStatus [] [] LocalLB.PoolMember.get_object_status( in String [] pool_names );
struct MemberObjectStatus { IPPortDefinition member; ObjectStatus object_status; }; struct IPPortDefinition { string address; long port; }; struct ObjectStatus { AvailabilityStatus availability_status; EnabledStatus enabled_status; string status_description; };
http://devcentral.f5.com/wiki/default.aspx/iControl/PsPoolMemberControl.html
http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__PoolMember__get_object_status.html
- Another thing to point out in your example, you are only passing in the first virtual server (array element 0) returned from the get_list method in the get_default_pool_name method. You can pass the entire array in and you will be returned the default_pool names for all of the virtual servers. Just thought I'd point that out...
- Wes_98098
Nimbostratus
Thanks for the reply, Joe. I'll take a look at the example you posted... Yeah, I only included the first element in the virtual server array here so I could post the exact results I'm getting (instead of the hundreds of lines of results that my entire script is pulling). I'll let you know if I can get my script working.
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