For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

elastic_82555's avatar
elastic_82555
Icon for Nimbostratus rankNimbostratus
Sep 24, 2013
Solved

Retrieving VS, pool, and nodes from F5

Hi, Using Chef extensively internally, and now would like to take all the node ip's(hostnames) out of chef, then programatically(using RESTful) interface, query the F5, to retrieve the nodes, pool...
  • mhite_60883's avatar
    Oct 09, 2013

    Example Python code:

     

    try:
        logging.info("Connecting to BIG-IP and pulling statistics...")
        b = bigsuds.BIGIP(hostname=ltm_host, username=user, password=password)
        logging.info("Requesting session...")
        b = b.with_session_id()
    except bigsuds.Connecti , detail:
        logging.critical("Unable to connect to BIG-IP. Details: %s" % pformat(detail))
        sys.exit(1)
    logging.info("Setting recursive query state to enabled...")
    b.System.Session.set_recursive_query_state(state='STATE_ENABLED')
    logging.info("Switching active folder to root...")
    b.System.Session.set_active_folder(folder="/")