Forum Discussion

Andreas_Lorenze's avatar
Andreas_Lorenze
Icon for Nimbostratus rankNimbostratus
Aug 11, 2005

Problems with Perl samples

Hi Joe (or whoever will maybe answer my questions),

 

 

I´m just trying to start with some basic iControl development.

 

I read the FAQ and Quickstart Guides, as well surfing the forum to find something related to my actual problem.

 

Seems to me, the environment overall is working properly. (ActivePerl update with actual SOAPlite and SSL-Library).

 

Just tried to start testing with LocalLBglobal.pl using the appropriate FQDN Port(443) User(highest access level) and password. I got following error message:

 

 

401 Authorization Required at localLBglobal.pl line 60

 

 

Has this maybe something to to with the certificate exchange? Something to do manually? (Found something in the forum what I did not really understand).

 

 

 

Thanks in advance

 

 

Andreas

5 Replies

  • Thanks Joe - if live would always be so easy ....

     

    I´d just mixed login and password for 2 accounts (to my defence I will say we are normally using RADIUS accounts :-))) )

     

    Sample script did run without any problems. Afterwards I tried build a little one myself, just doing a remote config save. This is working as well. So a good point to start from.

     

     

    Cheers

     

     

    Andreas
  • Great!

     

     

    If it was a valid set of creds then it would be quite difficult to diagnose as it would have likely been an issue with the perl module.

     

     

    As for the sample, did you use the ConfigSync sample in the SDK as a basis for yours? If you did that your self, then you picked one of the more complicated methods to use as it requires multiple calls in a loop which isn't very intuitive. Glad to hear things are working!

     

     

    You might want to hop over to my blog to check out my iControl related postings (Click here). I've got some good perl goodies in there.

     

     

    And, if you are using BIG-IP v4.x, then I've got a tech tip on the ConfigSync interfaces in the tech tips (Click here)

     

     

    Good luck and keep in touch!

     

     

    -Joe
  • Hi Joe,

     

     

    yes, I picked up the ConfigSync stuff. Just check out what I have done. I will have a look at the blogs as well. Didn´t realize it is possible to find something useful in. :-)

     

     

    cheers

     

     

    Andreas

     

     

    use SOAP::Lite;

     

     

    ----------------------------------------------------------------------------

     

    Validate Arguments

     

    ----------------------------------------------------------------------------

     

    my $sHost = $ARGV[0];

     

    my $sPort = $ARGV[1];

     

    my $sUID = $ARGV[2];

     

    my $sPWD = $ARGV[3];

     

    my $sFILE = $ARGV[4];

     

     

    if ( ($sHost eq "") or ($sPort eq "") or ($sUID eq "") or ($sPWD eq "") or ($sFILE eq "") )

     

    {

     

    die ("Usage: Test.pl host port uid pwd filename\n");

     

    }

     

     

    ----------------------------------------------------------------------------

     

    Transport Information

     

    ----------------------------------------------------------------------------

     

    sub SOAP::Transport::HTTP::Client::get_basic_credentials

     

    {

     

    return "$sUID" => "$sPWD";

     

    }

     

     

    $soap = SOAP::Lite

     

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

     

    -> readable(1)

     

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

     

     

    ----------------------------------------------------------------------------

     

     

    $soap_response =

     

    $soap->save_configuration

     

    (

     

    SOAP::Data->name

     

    (

     

    filename => $sFILE

     

    ),

     

    SOAP::Data->name

     

    (

     

    save_flag => 0

     

    )

     

    );

     

     

    if ( $soap_response->fault )

     

    {

     

    print $soap_response->faultcode, " ", $soap_response->faultstring, "\n";

     

    }

     

    else

     

    {

     

    my $result = $soap_response->result;

     

    print "Configuration saved to: $sFILE";

     

    }

     

  • Hi Joe,

     

     

    by the way. When I had a look a the blogs I recognised, that there is a complete solution for dealing with configs. Is there anything existing you know related to storing data collections in database readable formats (separator etcx ). What we like to do is bringing information for several devices together in an Access database. As we not like to develop this in .NET our idea is, to collect it running scheduled perl scripts, storing the outcome in a database readable format and import it into Access. We just like to keep it simple and doing a complete rebuild of a table each time.

     

     

    cheers

     

     

    Andreas
  • Andreas,

     

     

    I'm sure there are examples out there of customers extracting data from the BIG-IP and storing it in databases, but I don't personally know of any reference applications in doing so. We tried to make our samples in the SDK as independent of other software as possible so that they can work in all environments.

     

     

    If you end up getting something working, please let us know how it's going. Also consider sharing it with everyone in the CodeShare section of this site.

     

     

    -Joe