Forum Discussion
robertoq_79472
Nimbostratus
Sep 02, 2009Get ALL virtual server names?
Hi There,
Fairly new to using iControl. I've been going through the API reference and I don't seem to find a way to get a list of ALL the virtual servers currently on my LTM. I want to be able to get the full list and then the pool-names followed by their respective members and IPs.
Has anyone done this already?
14 Replies
- JRahm
Admin
if you have virtuals not in the common partition, you'll need to set the partition first:my $Partition = SOAP::Lite -> uri('urn:iControl:Management/Partition') -> proxy("https://yourBigIP/"."/iControl/iControlPortal.cgi"); $Partition->transport->http_request->header ( 'Authorization' => 'Basic ' . MIME::Base64::encode($user.":".$password, '') ); my $results = $Partition->set_active_partition( SOAP::Data->name('active_partition')->value(thenameofyourpartition) );
Snippet from the Perl Development FAQ in the wiki: Click here - jethro_106302
Nimbostratus
I guess I'll have to loop through all available partitions then.
thanks for the pointer. - jethro_106302
Nimbostratus
Hello,
I ended up getting the list of partitions the following way:sub getPartition () { my $soapResponse = $Partition->get_partition_list(); &checkResponse($soapResponse); my $plist = %{$soapResponse}->{'_content'}[4]{'Body'}{'get_partition_listResponse'}{'return'}; return $plist; } my $rplist = &getPartition(); if (scalar($rplist) > 1) { foreach my $partition (@$rplist) { print "Dumping VS Details for partition $partition->{'partition_name'}\n"; &lookup($partition->{'partition_name'}); } } else { &lookup(); }
thanks to Data::Dumper to figure the mess out of the structure returned.
Is there a better way of dealing with the soapresponse, and populate an array of references to the partition hashes? - Hem_66900
Cirrus
Do we've a similar perl script to pull just list of virtuals with corresponding pools,irules,SSL profiles used on LTM in CSV format if possible.
Software version:- 11.2.1 HF9 ( Any version 11 should be ok )
Please share if you do so.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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