Forum Discussion
chadmc_14686
Nimbostratus
Apr 03, 2007download_configuration not transferring
Greetings,
I am having difficulty getting ITCMSystem.ConfigSync.download_configuration (v4.x iControl, Perl) to transfer the full ucs. Only 512 bytes are transferred, regardless of the size...
May 21, 2007
Can you post the section of your code that does the download? I just tested this code from the 4.6.3 SDK against my 4.6.2 machine which worked fine.
----------------------------------------------------------------------------
sub downloadConfiguration
----------------------------------------------------------------------------
sub downloadConfiguration()
{
my ($configName, $localFile, $quiet) = (@_);
$success = 0;
if ( "" eq $localFile )
{
$localFile = $configName;
}
if ( "" eq $configName )
{
&usage("download");
}
open (LOCAL_FILE, ">$localFile") or die("Can't open $localFile for output: $!");
binmode(LOCAL_FILE);
my $file_offset = 0;
my $chunk_size = $defaultChunkSize;
my $chain_type = 0;
my $bContinue = 1;
while ( 1 == $bContinue )
{
$soap_response = $ConfigSync->download_configuration
(
SOAP::Data->name(config_name => $configName),
SOAP::Data->name(chunk_size => $chunk_size),
SOAP::Data->name(file_offset => $file_offset)
);
if ( $soap_response->fault )
{
if ( 1 != $quiet )
{
print $soap_response->faultcode, " ", $soap_response->faultstring, "\n";
}
$bContinue = 0;
}
else
{
$file_offset = $soap_response->result;
@params = $soap_response->paramsout;
$file_data = @params[0];
$chain_type = @params[1];
Append Data to File
print LOCAL_FILE $file_data;
if ( 1 != $quiet )
{
print "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bBytes Transferred: $file_offset";
}
if ( ("FILE_LAST" eq $FileChainType->{$chain_type}) or
("FILE_FIRST_AND_LAST" eq $FileChainType->{$chain_type}) )
{
$bContinue = 0;
$success = 1;
}
}
}
print "\n";
close(LOCAL_FILE);
return $success;
}
-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