Forum Discussion

Nat_Thirasuttakorn's avatar
May 04, 2005

add new member to class (in/external) not save to file

Hi all,

 

 

Sorry if I ask question that has been asked before. I have tried search but cannot find the right one.

 

 

I have test adding class by iControl both internal and external. After new member has been added successfully, the data is shown if I run bigpipe command to display the value. But it will not be saved to bigip.conf (for internal type) or external file.

 

 

here is the code which I use to add class member

 

====================

 

$newmember = "five 5";

 

$name = "number";

 

$StringClass2 = { name => $name, members => [$newmember] };

 

$soapResponse = $Class->add_string_class_member

 

(

 

SOAP::Data->name(class_members => [$StringClass2])

 

);

 

&checkResponse($soapResponse);

 

====================

 

 

Am I missing something?

 

I just use basic iControl code with Perl/win32.

 

 

PS: I also tried saving data with ConfigSync. It works but rather slow. (is it because bigip has invalid certificate?) And it may not be efficient if data has been added very often.

 

 

====================

 

$Sync = SOAP::Lite

 

-> uri('urn:iControl:System/ConfigSync')

 

-> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi");

 

 

 

$soapResponse = $Sync->save_configuration

 

(

 

SOAP::Data->name(filename => ""),

 

SOAP::Data->name(save_flag => 1)

 

);

 

&checkResponse($soapResponse);

 

=======================

 

 

Thanks in advance.

 

Nat
  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    When adding class members to internal or external classes via iControl, the data will not be saved to bigip.conf or any external class file until you explicitly save the configuration. This is consistent with how all configuration changes are updated via iControl.

     

     

    Note that you can call ConfigSync::save_configuration (...) with the SaveMode flag being SAVE_HIGH_LEVEL_CONFIG. This would just save the high-level configuration to disk, and avoid a lengthy configsync that you don't need. If you need to add class member data often, then just add all the class members at once, and then do a save at the end.

     

     

    Loc