Forum Discussion

DMA_95966's avatar
DMA_95966
Icon for Nimbostratus rankNimbostratus
Apr 16, 2018

How to get virtual server availability using F5 python SDK

How to get virtual server availability using F5 python SDK .

 

F5 ver = 11.6.0

 

I have tried below code , but it's not working as expected.

 

vs_stats = ibbm.tm.ltm.virtuals.virtual.load(partition='Common', name= vs_name)

 

vip_details = vs_stats.stats.load()

 

Appreciate any help .

 

1 Reply

  • You have to get the status.availabilitystate entry, add the next lines to your code:

     

    state= vip_details.entries.get('status.availabilityState')['description']
    print state