{ "info": { "author": "Mike Meacham", "author_email": "mdmeacham@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "A python library for accessing IGEL's IMI\n\n``` {.sourceCode .python}\nfrom igel import IMI, Devices, Directories, Profiles\nfrom igel import IMIAuthError, IMIConnectionError, MoveError, CreateError\nimport sys\n\n# First, create your IMI session\ntry:\n imi = IMI(server='192.168.56.12', user='igel', password='igel#123')\nexcept IMIAuthError as err:\n print(err)\n sys.exit(1)\nexcept IMIConnectionError as err:\n print(err)\n sys.exit(1)\n\n# retrieve a list of your devices\ndevices = Devices(imi)\n\n# and also a list of your directories\ndirectories = Directories(imi)\n\n# and also a list of your Profiles\nprofiles = Profiles(imi)\n\n# you can iterate through the retreived items\nfor device in devices:\n print(device.name)\n\nfor directory in directories:\n print(directory.name)\n\nfor profile in profiles:\n print(profile.name)\n\n# Or, to find a paricular device, you can search\n# by name, IP address, or MAC\ndevice1 = devices.find(name=\"ITC080027B8A48E\")\ndevice2 = devices.find(ip=\"192.168.56.104\")\n#device3 = devices.find(mac=\"080027B8A48E\")\n\nif device1:\n print(\"device1 IP address is\", device1.ip)\n\nif device2:\n print(\"device2 name is\", device2.name)\n\n# Check if your device is online like this\nprint(\"Is device1 online?\", device1.online)\nprint(\"Is device2 online?\", device2.online)\n\n# You can find a directory by name\nmy_directory = directories.find(name=\"Portland\")\nif my_directory:\n print(\"Found directory\")\nelse:\n print(\"directory was not found\")\n\n# Create a new directory for devices like this\ntry:\n directories.create(\"Vancouver\")\nexcept CreateError as err:\n print(err)\n\n\n# Now that you have both a device and a directory,\n# you can move the device into that directory\ntry:\n device1.move(my_directory)\nexcept MoveError as err:\n print(err)\n\n# And you can also move a device directory into another directory\nmy_directory2 = directories.find(name=\"Bend\")\ntry:\n my_directory2.move(my_directory)\nexcept MoveError as err:\n print(err)\n\n\n# Here's how you assign a profile to a device or a directory\nbrowser_profile = profiles.find(name='Browser')\ndevice1.assign(browser_profile)\nmy_directory.assign(browser_profile)\n\n# And then you can unassign a profile like this\ndevice1.unassign(browser_profile)\nmy_directory.unassign(browser_profile)\n\n\n# Get some additional information about your device\ndevice1.get_info()\nprint(\"A smaller set of device info includes:\", device1.info)\n\n# Get more detailed information\ndevice1.get_info(detailed=True)\n# Now, device info shows more\nprint(\"A much larger set of device info includes:\", device1.info)\n\n# Run some commands on your device\ndevice1.reboot()\ndevice1.shutdown()\ndevice1.wakeup()\ndevice1.settings2tc()\n#device1.factory()\n\n# For now, when you factory a device\n# you should retrieve all devices again to have a\n# valid list\n```\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mdmeacham/imi", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "igel", "package_url": "https://pypi.org/project/igel/", "platform": "", "project_url": "https://pypi.org/project/igel/", "project_urls": { "Homepage": "https://github.com/mdmeacham/imi" }, "release_url": "https://pypi.org/project/igel/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "A python library for accessing IGEL's IMI", "version": "0.0.2" }, "last_serial": 5200663, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "c9987cc2a2a4276b19f264f7e7a6b236", "sha256": "3d57e5099af3cb5dcdfe9077c210c9b5f971c8892385ad77a48358d52ff330c3" }, "downloads": -1, "filename": "igel-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c9987cc2a2a4276b19f264f7e7a6b236", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7684, "upload_time": "2019-04-28T20:23:15", "url": "https://files.pythonhosted.org/packages/2b/5d/cdb2d48befe597ec238af2e20c3f5125b458dc4df87efbd9aea421274363/igel-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41608d6b3b9f92de08b46f9b89921020", "sha256": "9637ef71bf39d3bd110c003e309627d8e96b72f254903c916b67995c2180a282" }, "downloads": -1, "filename": "igel-0.0.2.tar.gz", "has_sig": false, "md5_digest": "41608d6b3b9f92de08b46f9b89921020", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4599, "upload_time": "2019-04-28T20:23:18", "url": "https://files.pythonhosted.org/packages/3e/e8/11476a95f6ad751d6c6530131f84b42118d6270cf4c363d5977eeb4dac83/igel-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c9987cc2a2a4276b19f264f7e7a6b236", "sha256": "3d57e5099af3cb5dcdfe9077c210c9b5f971c8892385ad77a48358d52ff330c3" }, "downloads": -1, "filename": "igel-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c9987cc2a2a4276b19f264f7e7a6b236", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7684, "upload_time": "2019-04-28T20:23:15", "url": "https://files.pythonhosted.org/packages/2b/5d/cdb2d48befe597ec238af2e20c3f5125b458dc4df87efbd9aea421274363/igel-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41608d6b3b9f92de08b46f9b89921020", "sha256": "9637ef71bf39d3bd110c003e309627d8e96b72f254903c916b67995c2180a282" }, "downloads": -1, "filename": "igel-0.0.2.tar.gz", "has_sig": false, "md5_digest": "41608d6b3b9f92de08b46f9b89921020", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4599, "upload_time": "2019-04-28T20:23:18", "url": "https://files.pythonhosted.org/packages/3e/e8/11476a95f6ad751d6c6530131f84b42118d6270cf4c363d5977eeb4dac83/igel-0.0.2.tar.gz" } ] }