Forum Discussion

Jeff_41325's avatar
Jeff_41325
Icon for Nimbostratus rankNimbostratus
Apr 04, 2013

question updating SendTo field of HttpClass Profile in ASM

I have a need to update the Send to field in Local Traffic -> Profiles->Protocol->HttpClass->className->Actions of the ASM module. The intent is to update the pool name to point to a different pool. In using the web service calls defined in LocalLB.ProfileHttpClass.wsdl I am able to query the data, but the call to set_pool_name within that same wsdl, while it does not return an error, also does not update the pool name, when I check it via the GUI. Is this the correct function to do this? Is there another way via the web service? Eventually, I would also like to update the Send To field to "Redirect URL" also...

 

 

An example code snippet:

 

 

print "Setting @profiles to $pool\n";

 

 

my $soapResponse = $self->{soap}->uri("urn:iControl:LocalLB/ProfileHttpClass")->set_pool_name(

 

SOAP::Data->name(

 

profile_names => [@profiles]),

 

SOAP::Data->name(

 

pool_names => (

 

LocalLB::

 

ProfileString => {

 

 

'value' => $pool,

 

 

'default_flag' => 1

 

})

 

)

 

);

 

 

 

2 Replies

  • It most likely has to do with the way you are defining the pool_names parameter. Try something like this:

     

    $sUID = "username";

     

    $sPWD = "password";

     

     

    $ProfileHttpClass = SOAP::Lite

     

    -> uri('urn:iControl:LocalLB/ProfileHttpClass')

     

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

     

    eval { $ProfileHttpClass->transport->http_request->header

     

    (

     

    'Authorization' => 'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')

     

    ); };

     

     

    $profile = "my_profile_name";

     

    $pool = "my_pool_name";

     

    $default_flag = 1;

     

     

    $ProfileString = {

     

    value => $pool,

     

    default_flag => $default_flag

     

    };

     

     

    $soapResponse = $ProfileHttpClass->set_pool_name (

     

    SOAP::Data->name( profile_names => [$profile] ),

     

    SOAP::Data->name( pool_names => [$ProfileString] )

     

    );

     

     

    This is untested, but it should work for you. Hope this helps...

     

     

    -Joe

     

  • That code does help. I updated the pool_names and the only other thing I had to edit was change the default_flag to 0. Setting it to 1 grayed out the entire box. Thanks for the help!