File: examples.rst

package info (click to toggle)
python-infoblox-client 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: python: 9,572; makefile: 213
file content (24 lines) | stat: -rw-r--r-- 640 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
=========
Examples
=========

Print WAPI response page by page
--------------------------------

If you want to print WAPI response page by page, please use the :meth:`~infoblox_client.utils.paging` helper
function as described in the following example:

.. code:: python

    from infoblox_client import connector, objects, utils

    opts = {'host': '192.168.1.10', 'username': 'admin', 'password': 'admin'}
    conn = connector.Connector(opts)

    resp = objects.DNSZone.search_all(conn, view='default', paging=True)

    for page in utils.paging(resp, max_results=2):
        print(page)
        input("Press enter to read more...")