Forum Discussion

Steve_Brown_882's avatar
Steve_Brown_882
Historic F5 Account
Sep 21, 2009

pycontrol RAMCacheInformation

 

Having an issue with the get_ramcache_entry function in pycontrol. I am trying to grab the satistics for all hosts and uris on a specific profile, but I can't seem to get it to work. I assumed that the keys paramater would work like others in that it would take a dictionary as I added bellow. However when I run this I get an error that says it is an unhashable type. Any thoughts?

 

 

b.LocalLB_RAMCacheInformation.get_ramcache_entry(

 

keys = { 'profile_name ': profile , 'host_name': "", 'uri': ""}

 

)
  • This should serialize at the very least (I don't have a box to test against):

     
     b.LocalLB_RamCacheInformation.get_ramcache_entry(keys = [{'profile_name':'http', 'host_name':'*', 'uri':'*', 'maximum_responses':100}]) 
     

    Note that the askterisk may not be valid (I'm not sure) so give it a try and post back if it's not working for you.

    -Matt
  • Steve_Brown_882's avatar
    Steve_Brown_882
    Historic F5 Account
    Thanks. I just had to make one minor tweak.(Removed the *)

     

     

    b.LocalLB_RAMCacheInformation.get_ramcache_entry(

     

    keys = [{'profile_name':'http', 'host_name':'', 'uri':'', 'maximum_responses':100}])