Forum Discussion

tomatobear_9327's avatar
tomatobear_9327
Icon for Nimbostratus rankNimbostratus
May 23, 2011

Having troubles when constructing LocalLB.MatchPatternString

Hi guys. I'm working on a class to add an httpclass profile.

 

 

def add_profile(self, pool_num):

 

MatchPatternString_1 = self.conn.LocalLB.Pool.typefactory.create('LocalLB.MatchPatternString')

 

MatchPatternString_1.pattern = "*pattern.com"

 

MatchPatternString_1.is_glob = True

 

 

I have no problems to construct other structures, like

 

 

self.conn.LocalLB.Pool.typefactory.create('LocalLB.MonitorRuleType')

 

self.conn.LocalLB.Pool.typefactory.create('LocalLB.Pool.MonitorAssociation')

 

 

But for MatchPatternString, it gives the following errors.

 

 

No handlers could be found for logger "suds.resolver"

 

Traceback (most recent call last):

 

File "./bigip.py", line 175, in

 

bigip.add_2k8fp_profile('590')

 

File "./bigip.py", line 145, in add_2k8fp_profile

 

MatchPatternString = self.conn.LocalLB.Pool.typefactory.create('LocalLB.MatchPatternString')

 

File "/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/client.py", line 234, in create

 

raise TypeNotFound(name)

 

suds.TypeNotFound: Type not found: 'LocalLB.MatchPatternString'

 

 

How do I resolve this? Is this a bug or something?

 

 

Thanks.

 

 

  • Try and print out the suds client - it will show you all of the types that it is expecting to be able to create:

     

    Print self.conn.LocalLB.Pool.suds

     

     

    Then see if that helps.

     

    -Matt Cauthorn
  • Try and print out the suds client - it will show you all of the types that it is expecting to be able to create:

     

    Print self.conn.LocalLB.Pool.suds

     

     

    Then see if that helps.

     

    -Matt Cauthorn
  • Thanks, Matt.

     

     

    As you expected, no MatchPatternString type is under the output of self.conn.LocalLB.Pool.suds. I've also tried other interfaces, like VirtualServer. Same result.

     

     

    Do you have any ideas how I can consturct MatchPatternString mentioned in the api reference under LocalLB?

     

  • Resolved.

     

     

    suds is able to construct MatchPatternString under LocalLB.ProfileHttpClass.

     

     

  • Resolved.

     

     

    suds is able to construct MatchPatternString under LocalLB.ProfileHttpClass.

     

     

  • Resolved.

     

     

    suds is able to construct MatchPatternString under LocalLB.ProfileHttpClass.