Forum Discussion
Joe_47002
Feb 07, 2012Nimbostratus
How to use get_httpclass_profile?
Are there any examples on how to use the command get_httpclass_profile?
Feb 07, 2012
I don't know of any samples in the CodeShare that use that method, but it's pretty easy. The definition is:
VirtualServerHttpClass [] [] get_httpclass_profile(
in String [] virtual_servers
);
How you would code this depends on the language you choose. For PowerShell, it would be something like this
$vipList = @("vip1", "vip2");
$classListAofA = (Get-F5.iControl).LocalLBVirtualServer.get_httpclass_profile($vipList);
Loop over each VIP
for($i=0; $i -lt $classListAofA.Length; $i++)
{
$vip = $vipList[$i];
Write-Host "VIP: $vip";
loop over each of the class profiles in the given VIP
$classListA = $classListAofA[$i];
foreach($class in $classListA)
{
$profile_name = $class.profile_name;
$priority = $class.priority;
Write-Host " $profile_name ($priority)"
}
}
Hope this helps...
-Joe
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