bigsuds
23 TopicsPython data class values
I have some python code (bigsuds) I use to display data class members names but do not know how to display the data group values. What I would like is to output the following name value name value name value Any help would be appreciated. def member_list(b,name): try: data = b.get_string_class([name]) except Exception, e: print e for x in data: myclass = x print name for m in myclass['members']: print m b = f5.LocalLB.Class member_list(b,'classname')899Views0likes8CommentsBigSuds - bigsuds.ConnectionError: BadStatusLine: ''
On a certain F5 (V11) I keep getting a Connecti : BasStatusLine: '' Looks like BigSuds is getting back a response that is making puke Anyone have any bright ideas? 2014-08-17 18:10:28 INFO: Retrieving interface statistics... 2014-08-17 18:10:28 DEBUG: Executing iControl method: Networking.Interfaces.get_statistics((['mgmt', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '2.1', '2.2'],), {}) Traceback (most recent call last): File "/opt/f5collect/f5-agent.py", line 715, in main() File "/opt/f5collect/f5-agent.py", line 678, in main metric_list = gather_f5_metrics(ltm_host, user, password, prefix, remote_ts) File "/opt/f5collect/f5-agent.py", line 330, in gather_f5_metrics int_stats = b.Networking.Interfaces.get_statistics(interfaces) File "/usr/local/lib/python2.7/dist-packages/bigsuds-1.0.1-py2.7.egg/bigsuds.py", line 430, in wrapped_method raise Connecti ('BadStatusLine: %s' % e) bigsuds.Connecti : BadStatusLine: ''528Views0likes14CommentsBigsuds - How to enable / disable certain pool members?
Hello all, this is my first post here, to quickly introduce myself - I'm Aled, I work in London (GB) for an online gaming company. I'm currently getting an automated deployment system in place for Continuous Intergration and the part I'm struggling with is automating the BigIP loadbalancer pools which brings me to my question: Here's what I'm trying to achieve, for an automated web deployment I need to disable half the pool members for a given Loadbalanced Pool, and then re-enable them post deployment. Then disable the other half of the pool members and re-enable them post deployment too. So I need a way to disable pool members and to specify which pool members to disable and vice versa. Ive been reading a lot about Bigsuds and I'm very impressed by this and the whole iControl system. I've played around with this within python and can access the BigIP appliance and display pools etc., but I cant figure out the code I need to do the above. I was hoping it would be something like this... b.LocalLB.PoolMember.set_session_enabled_state(pool_names = ['poolnamehere'], members = ['10.10.10.10:80', '10.10.10.11:80'], session_states = ['STATE_ENABLED'], [1]) This doesnt work, Ive got the syntax wrong and its probably not as simple as that. Can anyone help please? Let me know if you need more info etc.. Thanks Aled404Views0likes6CommentsiApp elements in iControl (bigsuds)
I have two LTM boxes running BigIP 11.5 on which I configured several iApps. Now I'd like to use iControl to check the pool/node status, statistics, enable and disable nodes, etc. However, I can't get a list of the iApps and pools configured. Here's what I tried using the (awesome!) bigsuds library: bs = bigsuds.BIGIP(hostname="my_ltm_box", username="my_username", password="some_pass") print bs.Management.ApplicationService.get_list() print bs.LocalLB.Pool.get_list() I would expect at least the first, but preferably also the second print out a list of items. But both commands return an empty list (I currently don't have any pools configured normally, only through iApps, though when I add one it gets listed). To make it even a bit more confusing, the listing of nodes works (both for normally configured nodes as for nodes configured in an iApp): print bs.LocalLB.NodeAddressV2.get_list() Am I missing something? How can I find out which iApps are configured and more importantly, how can I find the pools and possibly other elements related to these iApps, since they don't seem to be available through the regular API calls.Solved383Views0likes2CommentsGet current connection of pool members
Hi, I tried write a script (python) to checking numeber current connection and when is 0 mark member 'disabled'. How can I get only value of current connection and then check is 0 ? member_stat = b.LocalLB.Pool.get_member_statistics( ['/Common/' + pool], [[{'address': member, 'port': port}]]) for statistic in member_stat: .... if ( 'STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS' == 0 ) : pl.set_member_session_enabled_state(['/Common/' + pool ], [[{'address': member, 'port': port}]], [['STATE_DISABLED']]) pl.set_member_monitor_state(['/Common/' + pool ], [[{'address': member, 'port': port}]], [['STATE_DISABLED']])377Views0likes2Commentspython f5 sys.argv
Building a python script to enable and disable pool members. I have everything already working great, but i want to pass sys.argv. example i want to issue this command command.py 192.168.1.245 admin admin pool 12.12.12.1 90 and want to use these system variables for my script. I am having trouble with sys.argv. If anyone has an example, it would be awesome. a = sys.argv[1:] b = bigsuds.BIGIP( hostname = a[0], username = a[1], password = a[2], pool = a[3], member = a[4], port = a[5], )342Views0likes2CommentsPython/Bigsuds: change_my_password does not work for guest user
Hi, I'd like to change the password of a user with guest permissions on a BIG-IP v10.2.4 using python with bigsuds. Although the login is successful (I can get a list of pools etc.), Management.UserManagement.change_my_password exits with an error: ServerError: Server raised fault: 'Exception caught in Management::urn:iControl:Management/UserManagement::change_my_password() Exception: Common::OperationFailed primary_error_code : 17238053 (0x01070825) secondary_error_code : 0 error_string : 01070825:3: Access denied - Administrators only: User (guestuser) is not an Administrator and must supply the old password.' How can I either supply the old password or change my password any other way? Thanks in advance Lukas327Views0likes2Comments