{ "info": { "author": "Jay Mehta", "author_email": "jay87.mehta@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7" ], "description": "==============\ndhcpstatus\n==============\n\n**dhcpstatus** is a pure python implementation of DHCPSTATUS (http://dhcpstatus.sourceforge.net/),\nimplementing most of its functionalities.\n\nWith subnet status operation, **dhcpstatus** will return IP details for each subnet. It will provide:\n 1. IP range defined for the subnet\n 2. Total number of IPs defined for use\n 3. Count of free IPs in the subnet\n 4. Count of used IPs in the subnet\n 5. IPs leased out from each subnet\n 6. MAC address of the host the IP is leased\n 7. Hostname of the machine DHCP IP is leased to\n\n\nUsage **dhcpstatus** command : **dhcpstatus_subnet**\n------------------------------------------------------\n\n**dhcpstatus** installation also comes with command style entry point **dhcpstatus_subnet**. You can run **dhcpstatus**\nin standalone cli mode using binary **dhcpstatus_subnet**:\n\n.. code:: bash\n\n $ dhcpstatus_subnet /path/to/dhcp_subnet.conf /path/to/dhcpd.lease\n\n Subnet | Netmask | Low Address | High Address | IPs defined | IPs free | IPs in use | IPs | MACs | Hostname\n 10.30.217.0 | 255.255.255.192 | 10.30.217.4 | 10.30.217.62 | 59 | 53 | 6 | 10.30.217.39 | 9c:b6:54:aa:78:c3 | host1\n | | | | | | | 10.30.217.5 | 9c:b6:54:aa:88:9f | host2\n | | | | | | | 10.30.217.21 | 9c:b6:54:aa:8b:07 | host3\n | | | | | | | 10.30.217.18 | 9c:b6:54:ab:b9:eb | host4\n | | | | | | | 10.30.217.56 | 9c:b6:54:ab:bb:2f | host5\n | | | | | | | 10.30.217.37 | 9c:b6:54:ab:bb:9b | host6\n 10.30.217.64 | 255.255.255.192 | 10.30.217.68 | 10.30.217.126 | 59 | 53 | 6 | 10.30.217.86 | 9c:b6:54:aa:8f:7b | host7\n | | | | | | | 10.30.217.100 | 9c:b6:54:73:60:41 | host8\n | | | | | | | 10.30.217.83 | 9c:b6:54:aa:8b:93 | host9\n | | | | | | | 10.30.217.114 | 9c:b6:54:aa:8b:0f | host10\n | | | | | | | 10.30.217.101 | 9c:b6:54:aa:8e:bf | host11\n | | | | | | | 10.30.217.117 | 9c:b6:54:aa:8b:03 | host12\n 10.30.241.160 | 255.255.255.248 | 10.30.241.164 | 10.30.241.166 | 3 | 3 | 0 | - | - | -\n 10.30.221.64 | 255.255.255.192 | 10.30.221.68 | 10.30.221.126 | 59 | 54 | 5 | 10.30.221.99 | 70:10:6f:ca:94:74 | host13\n | | | | | | | 10.30.221.78 | 70:10:6f:ca:90:2c | host14\n | | | | | | | 10.30.221.77 | 70:10:6f:ca:8f:2c | host15\n | | | | | | | 10.30.221.85 | 70:10:6f:ca:7d:f4 | host16\n | | | | | | | 10.30.221.69 | 70:10:6f:ca:83:fc | host17\n 10.30.220.0 | 255.255.255.192 | 10.30.220.4 | 10.30.220.62 | 59 | 58 | 1 | 10.30.220.33 | 34:17:eb:e8:06:25 | host18\n\n\n**dhcpstatus** API usage\n-------------------------\n\n.. code:: python\n\n from dhcpstatus import *\n import pprint\n\n d=DHCPStatus('/path/to/dhcp_subnet.conf ', ' /path/to/dhcpd.lease')\n status = d.subnet_status()\n\n pprint.pprint(status)\n\n\nOR\n\n.. code:: python\n\n import dhcpstatus\n import pprint\n\n d=dhcpstatus.DHCPStatus('/path/to/dhcp_subnet.conf ', ' /path/to/dhcpd.lease')\n status = d.subnet_status()\n\n pprint.pprint(status)\n\n\nAnd you can see output as:\n\n.. code:: bash\n\n {('10.30.217.4', '10.30.217.62'): {'netmask': '255.255.255.192',\n 'option': {'broadcast-address': '10.30.217.63',\n 'domain-name': '\"con.dcg02.paypalc3.net\"',\n 'domain-name-servers': '10.190.18.19,10.190.18.20',\n 'routers': '10.30.217.1'},\n 'pool': {'failover': ('peer',\n '\"phx04-dhcp-failover\"'),\n 'range': ('10.30.217.4',\n '10.30.217.62')},\n 'status': {'Hostname': ['host1',\n 'host2',\n 'host3',\n 'host4',\n 'host5',\n 'host6'],\n 'IPs': ['10.30.217.39',\n '10.30.217.5',\n '10.30.217.21',\n '10.30.217.18',\n '10.30.217.56',\n '10.30.217.37'],\n 'IPs defined': 59,\n 'IPs free': 53,\n 'IPs in use': 6,\n 'MACs': ['9c:b6:54:aa:78:c3',\n '9c:b6:54:aa:88:9f',\n '9c:b6:54:aa:8b:07',\n '9c:b6:54:ab:b9:eb',\n '9c:b6:54:ab:bb:2f',\n '9c:b6:54:ab:bb:9b']},\n 'subnet': '10.30.217.0'},\n ('10.30.217.68', '10.30.217.126'): { 'netmask': '255.255.255.192',\n 'option': {'broadcast-address': '10.30.217.127',\n 'domain-name': '\"con.dcg02.paypalc3.net\"',\n 'domain-name-servers': '10.190.18.19,10.190.18.20',\n 'routers': '10.30.217.65'},\n 'pool': {'failover': ('peer',\n '\"phx04-dhcp-failover\"'),\n 'range': ('10.30.217.68',\n '10.30.217.126')},\n 'status': {'Hostname': ['host13',\n 'host14',\n 'host15',\n 'host16',\n 'host17',\n 'host18'],\n 'IPs': ['10.30.217.86',\n '10.30.217.100',\n '10.30.217.83',\n '10.30.217.114',\n '10.30.217.101',\n '10.30.217.117',],\n 'IPs defined': 59,\n 'IPs free': 53,\n 'IPs in use': 6,\n 'MACs': ['9c:b6:54:aa:8f:7b',\n '9c:b6:54:73:60:41',\n '9c:b6:54:aa:8b:93',\n '9c:b6:54:aa:8b:0f',\n '9c:b6:54:aa:8e:bf',\n '9c:b6:54:aa:8b:03']},\n 'subnet': '10.30.217.64'},\n ('10.30.241.164', '10.30.241.166'): {'netmask': '255.255.255.248',\n 'option': {'broadcast-address': '10.30.241.167',\n 'domain-name': '\"con.dcg02.paypalc3.net\"',\n 'domain-name-servers': '10.190.18.19,10.190.18.20',\n 'routers': '10.30.241.161'},\n 'pool': {'failover': ('peer',\n '\"phx04-dhcp-failover\"'),\n 'range': ('10.30.241.164',\n '10.30.241.166')},\n 'status': {'Hostname': [],\n 'IPs': [],\n 'IPs defined': 3,\n 'IPs free': 3,\n 'IPs in use': 0,\n 'MACs': []},\n 'subnet': '10.30.241.160'}}\n\n\nInstalling **dhcpstatus**\n----------------------------\n\n.. code:: bash\n\n $ pip install dhcpstatus", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.org/project/dhcpstatus/", "keywords": "DHCP Status", "license": "", "maintainer": "", "maintainer_email": "", "name": "dhcpstatus", "package_url": "https://pypi.org/project/dhcpstatus/", "platform": "", "project_url": "https://pypi.org/project/dhcpstatus/", "project_urls": { "Homepage": "https://pypi.org/project/dhcpstatus/" }, "release_url": "https://pypi.org/project/dhcpstatus/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "Python implementation of DHCP status", "version": "0.0.5" }, "last_serial": 4037236, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3e470729cce5f4843559556db5116b68", "sha256": "92e64bf7017e212a045f9bdaf37c191fd3519edd0ecded535467141b149506db" }, "downloads": -1, "filename": "dhcpstatus-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3e470729cce5f4843559556db5116b68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3147, "upload_time": "2018-05-18T23:43:43", "url": "https://files.pythonhosted.org/packages/78/34/a63ef4966463b1e84947f18ff436a15d384188ea6eac5276afd277dfe184/dhcpstatus-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "d958a21889021c279edd67eac73dab83", "sha256": "fdff688fad3e642b6d350dde349e507eb11afdd070b76622125eccf740e060e1" }, "downloads": -1, "filename": "dhcpstatus-0.0.2.tar.gz", "has_sig": false, "md5_digest": "d958a21889021c279edd67eac73dab83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3160, "upload_time": "2018-05-30T19:18:25", "url": "https://files.pythonhosted.org/packages/29/85/c1b5c243a58b16cd462b53d846f62834e14173a91dbe065305b6ea64b995/dhcpstatus-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "542db1376b6f34cb85f093353e577d0d", "sha256": "196b25e24b4d45b1a0a7463441702ae1bff3ceb81fc26894c8585f75f8693c11" }, "downloads": -1, "filename": "dhcpstatus-0.0.3.tar.gz", "has_sig": false, "md5_digest": "542db1376b6f34cb85f093353e577d0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3897, "upload_time": "2018-05-30T20:49:09", "url": "https://files.pythonhosted.org/packages/89/2c/e50ed82657bdb69e78330cc89c185987c94143c40dab23e7ad747450ca3e/dhcpstatus-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "6f021351095b457844cfb1dcbe4383f3", "sha256": "1364d5cea528f82b855fc988075ffff14b3b6228feef2fc9c0543bf0c2a31373" }, "downloads": -1, "filename": "dhcpstatus-0.0.4.tar.gz", "has_sig": false, "md5_digest": "6f021351095b457844cfb1dcbe4383f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4414, "upload_time": "2018-06-06T22:43:28", "url": "https://files.pythonhosted.org/packages/c6/f6/6aa031b04b43ca906029e64c8873fe2b4c6b1e193792b8e1a053d0d9c596/dhcpstatus-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "8d96a012faf304f25e336b83e66a80a3", "sha256": "3dc6497c0cf9a88d511d48d4bb7f9a37575bbc046167733909d953fea47aecf7" }, "downloads": -1, "filename": "dhcpstatus-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8d96a012faf304f25e336b83e66a80a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4732, "upload_time": "2018-07-06T18:03:52", "url": "https://files.pythonhosted.org/packages/18/c7/5ec06c6a4f12cb6d0249fe349f6b7a4d924501aeec5273282a8583d4f80b/dhcpstatus-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8d96a012faf304f25e336b83e66a80a3", "sha256": "3dc6497c0cf9a88d511d48d4bb7f9a37575bbc046167733909d953fea47aecf7" }, "downloads": -1, "filename": "dhcpstatus-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8d96a012faf304f25e336b83e66a80a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4732, "upload_time": "2018-07-06T18:03:52", "url": "https://files.pythonhosted.org/packages/18/c7/5ec06c6a4f12cb6d0249fe349f6b7a4d924501aeec5273282a8583d4f80b/dhcpstatus-0.0.5.tar.gz" } ] }