Forum Discussion

Rich_W__77692's avatar
Nov 24, 2013

Python/BigSuds using local WSDLs?

Can BigSuds use a local copy of the WSDLs? I ask because sometimes I have to loop through literally 600+ devices and if I only had to parse the WSDLs once, that would speed things up a lot.

 

Thanks.

 

rjwiii

 

  • Perhaps I mis-stated my question. I am not parsing the WSDLs. I know BigSuds does that for me. Currently, BigSuds pulls the WSDL set from the device being accessed and parses it. At times, I have to loop through 600+ devices. Waiting for BigSuds to grab the WSDL set from each device slows down the script's perfromace. If I could have a local set of WSDLs that BigSuds would only have to parse once, it would increase the script's performance. Am I making more sense? Thank you. rjwiii
  • Ow, OK, now I see what you mean.

     

    I know little about SOAP, so not sure, but I suppose this should be doable. If you are familiar with python and SOAP, you could have a look at the bigsuds lib, which is relatively small.

     

    • Rich_W__77692's avatar
      Rich_W__77692
      Icon for Cirrus rankCirrus
      I know enough about SOAP to rip my hair out in large chunks ... :) Perhaps this can be tossed back to the F5 BigSuds maintainer ... ?
  • Just had a quick look at the bigsuds source and it appears this is already possible!

     

    just initialize your api as here:

     

    api = bigsuds.BIGIP(hostname=bigip, username=user, password=password, cachedir=/tmp/)

     

    (cachedir defaults to None; you can also enable debug=True)

     

    • Rich_W__77692's avatar
      Rich_W__77692
      Icon for Cirrus rankCirrus
      I looked at the code, too. I think the "cachedir" paramiter for cache'ing the WSDLs after they are downloaded from the device and NOT for accessing local copies of WSDLs ... :( What I would like to do is have a local copy of the WSDLs like the Ruby gem or the java libs ... Oh well ...
    • Serge_van_Ginde's avatar
      Serge_van_Ginde
      Icon for Nimbostratus rankNimbostratus
      The cache lifetime is hard coded to 1 day. There's nothing stopping you from patching that :-)
    • Rich_W__77692's avatar
      Rich_W__77692
      Icon for Cirrus rankCirrus
      I saw that ... I think it only caches it for the device you're accessing and will read from the cache if it exists. I want to be able to load the WSDLs once and plow through 600+ devices, I access devices running v9 and up. The WSDLs are backwords compatible with all version, so if I have the latest set of all the WSDLs, I'm all set. All I have to do is get the device's version and make the righrt calls ...