Forum Discussion

GavinW_29074's avatar
GavinW_29074
Icon for Nimbostratus rankNimbostratus
Jul 03, 2012

Create iFile through iControl???

Hi there,

 

 

I'm trying to set-up an iControl client against a v11.1 F5.

 

The purpose of the client is to allow the import and creation of iFiles...

 

 

However I'm struggling to see the right method within the SDK...

 

 

My understanding is that I need to create an iFile File object using LocalLB::iFileFile->create before I can create the iFile iRule object using LocalLB::iFile->create.

 

 

However looking at the doc for LocalLB::iFileFile->create, it's asking for a 'paths' parameter, which is described as: The paths to the files to load into the system..

 

Am I right in reading that as I've got to manually create the file somewhere on the local F5 filesystem before I can create the iFileFile object?

 

 

If so, that sounds like a bit of a pain...

 

 

Comments welcome.

 

 

Cheers

 

Gavin

 

3 Replies

  • Hi Gavin, I think that is the path to the file on your local system, not the BIG-IP, but I haven't used the iFile interface yet.
  • Posted By Jason Rahm on 07/03/2012 03:08 PM

     

    Hi Gavin, I think that is the path to the file on your local system, not the BIG-IP, but I haven't used the iFile interface yet.

     

    Jason

     

     

    Unfortunately it looks like it's expecting a local BigIP File-system path...

     

     

    I tried with the local path on my PC and it failed with:

     

    SOAP::Transport::HTTP::Client::send_receive: POST https://test-f5:443/iControl/iControlPortal.cgi HTTP/1.1

     

    Accept: text/xml

     

    Accept: multipart/*

     

    Accept: application/soap

     

    Authorization: Basic Z2F2aW53OmZhN21jZ2F2Lg==

     

    Content-Length: 703

     

    Content-Type: text/xml; charset=utf-8

     

    SOAPAction: "urn:iControl:LocalLB/iFileFilecreate"

     

     

    ="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://sch

     

    emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

     

    DISCOVERYWS-1-0D:\Products\Schemas\schemas\DISCOVERYWS-1-0.dtd

     

    SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Server Error

     

    Connection: close

     

    ...

     

     

    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

     

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

     

    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

     

     

     

    xsi:type="xsd:string">SOAP-ENV:Server

     

    xsi:type="xsd:string">Exception caught in LocalLB::urn:iControl:LocalLB/iFileFile::create()

     

    Common::InvalidArgument

     

     

     

     

     

    SOAP-ENV:Server Exception caught in LocalLB::urn:iControl:LocalLB/iFileFile::create()

     

    Common::InvalidArgument

     

     

    If I copy the file onto the F5 and change the path, it works...

     

    Attempting to create iFileFile...

     

    Local Path = /tmp/DISCOVERYWS-1-0.dtd

     

    SOAP::Transport::HTTP::Client::send_receive: POST https://test-f5:443/iControl/iControlPortal.cgi HTTP/1.1

     

    Accept: text/xml

     

    Accept: multipart/*

     

    Accept: application/soap

     

    Authorization: Basic Z2F2aW53OmZhN21jZ2F2Lg==

     

    Content-Length: 680

     

    Content-Type: text/xml; charset=utf-8

     

    SOAPAction: "urn:iControl:LocalLB/iFileFilecreate"

     

     

    ="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://sch

     

    emas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

     

    DISCOVERYWS-1-0/tmp/DISCOVERYWS-1-0.dtd

     

    SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK

     

    ...

     

     

    xmlns:E="http://schemas.xmlsoap.org/soap/envelope/"

     

    xmlns:A="http://schemas.xmlsoap.org/soap/encoding/"

     

    xmlns:s="http://www.w3.org/2001/XMLSchema-instance"

     

    xmlns:y="http://www.w3.org/2001/XMLSchema"

     

    xmlns:iControl="urn:iControl"

     

    E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

     

     

    xmlns:m="urn:iControl:LocalLB/iFileFile">

     

     

     

    Soap call was successful.

     

     

    Unfortunately that does complicate things as I've now got to work out a way of copying the file onto F5 and then running the iFile create?

     

     

    Feels like a good candidate for an improvement to the iControl interface...

     

     

    Cheers

     

    Gavin

     

  • Kinda looks like I've hit a brick wall on this one for the time being, as the files gotta be local to the F5 to import, and i'm struggling to find a working SCP/SFTP perl client that'll work on a Windows host :(

     

     

    Could we get this raised as an enhancement request?

     

     

    Gav