Forum Discussion
Joe_Pawlicki_70
Nimbostratus
Dec 11, 2008perl ConfigSync = Epic Fail
I'm not getting this to work, so reluctantly will ask for help. There are many good threads with examples of saving the config after iControl changes, but after several hours of trying, I'm unable to get successful results. Granted, I'm green to iControl, and no coding whiz, but the examples seem straightforward.
What works: I'm able to add a member to a pool via my perl script, and can verify it's in memory via "b pool show".
What doesn't: ConfigSync::save_configuration - no config files are getting updated in /config.
My config:
$Sync = SOAP::Lite
-> uri('urn:iControl:ITCMSystem/ConfigSync')
-> readable(1)
-> proxy("https://$sHost:$sPort/iControl/iControlPortal.cgi");
$save_flag = "SAVE_HIGH_LEVEL_CONFIG";
$soap_response = $Sync->save_configuration
(
SOAP::Data->name(save_flag => $save_flag)
);
Another attempt...
$filename = "config/bigip.conf";
$soap_response = $Sync->save_configuration
(
SOAP::Data->name(filename => $filename),
SOAP::Data->name(save_flag => 0)
);
And just for the heck of it...(it doesn't seem to mind the flag)
$soap_response = $Sync->save_configuration
(
SOAP::Data->name(save_flag => 99)
);
7 Replies
- In the SDK, there is a ConfigSync.pl sample that illustrates how to use the ConfigSync methods with perl. I've just added it to the Wiki so you can get it from there as well.
http://devcentral.f5.com/wiki/default.aspx/iControl/PerlConfigSync.html
- JRahm
Admin
Title of the Week for me! - Colin_Walker_12Historic F5 AccountYeah, I love it...
- Joe_Pawlicki_70
Nimbostratus
Thanks, as always, for the valuable and timely help.$thisfilename = "bigip.conf.joe"; $thissave_flag = "SAVE_COMMON"; $soap_response = $Sync->save_configuration ( SOAP::Data->name(filename => $thisfilename), SOAP::Data->name(save_flag => $thissave_flag) );
- Totally my bad. This was a script I migrated from v4.x but didn't test the other deviations of the save_flag. I've updated the codeshare entry to work correctly.
http://devcentral.f5.com/wiki/default.aspx/iControl/System__ConfigSync__SaveMode.html
- Joe_Pawlicki_70
Nimbostratus
Problem solved. Looks like I picked up some bad syntax from some of the older threads in this forum. In particular, the "urn:iControl:ITCMSystem/ConfigSync" here: https://devcentral.f5.com/Default.aspx?tabid=53&forumid=2&postid=3769&view=topic$ConfigSync = SOAP::Lite -> uri('urn:iControl:System/ConfigSync') -> readable(1) -> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi"); eval { $ConfigSync->transport->http_request->header ( 'Authorization' => 'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '') ); };
- Again, sorry for the confusion. The loosely typed languages are always the hardest because it's up to you to get everything right.
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