{ "info": { "author": "Jeff Leary", "author_email": "sillymonkeysoftware@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "AMOSHELL\n=============\nPython convenience class to interface with Ericsson's amos/moshell commands.\n\n\nInstall\n=======\n::\n\n pip install amoshell\n\n\nSynopsis\n========\n::\n\n import amoshell\n mo = amoshell.Amos()\n rval, out, err = mo.moshell('RBS003', 'lt all; alt')\n if rval:\n print err\n else:\n print out\n\n\nAPI\n===\n- Amos(*kwargs*)\n - *bin_path*: keyword-arg to set a non-standard path where the moshell binaries may be installed (optional).\n - *parallel*: keyword-arg to set max number of parallel sessions that mobatch may run (defaults to 10).\n \n- Amos.moshell(*name, command, kwargs*)\n\n Run a moshell command on a node.\n\n - *name*: recognized node name or node ip address.\n - *command*: command string. multiple commands are delimited with semicolon.\n - *kwargs*: any valid options that are normally set with the '-v' on the moshell command line can be entered here. See Ericsson AMOS user guide for more.\n\n Return value is a tuple, containing:\n - *exit code*: 0 = ok, non-zero = a failure.\n - *stdout text*:\n - *stderr text*:\n \n- Amos.mobatch(*nodes, command, kwargs*)\n\n Run mobatch commands against many nodes simultaneously.\n \n - *nodes*: a list of node names (or ip addresses), or a string pointing to an existing sitefile.\n - *command*: command string, or a string identifying the path to an existing moshell command file.\n - *kwargs*: any valid options that are normally set with the '-v' on the moshell command line can be entered here. See Ericsson AMOS user guide for more.\n\n Return value is a list of tuples. Each 3 element tuple contains:\n - *node name*: node this tuple's info relates to.\n - *exit code*: 0 = ok, non-zero = a failure.\n - *path to log*: path to the file containing the moshell results for this node.\n\nExamples\n========\n::\n\n import amoshell\n mo = amoshell.Amos()\n \n # moshell example\n rval, out, err = mo.moshell('RBS003', 'lt all; alt')\n \n # mobatch example\n results = mo.mobatch(['ERBS001', 'ERBS002'], 'lt all; get security', \n ip_database=/tmp/ipdb.dat,\n corba_class=5 )\n for r in results:\n node, rval, logfile = r\n if not rval:\n print \"node %s results found in log %s\" % (node, logfile) \n\n\nKnown Issues\n============\n*Node Passwords*: Some commands in moshell require a password. This tool is not\ndesigned to have an interactive shell, and a password request will cause this\nto hang indefinitely.\n\nTo prevent this, you should use a custom ip_database file containing nodes and their passwords.\nThe file is then referenced with the \"ip_database\" optional arg.\n\n::\n\n Amos.moshell(node, command, ip_database='/path/to/file')\n \n\nSee Ericsson documentation for more information about these ip_database files.\n\n\nTo Do\n=====\n\n \nAuthor\n======\nJeff Leary (sillymonkeysoftware -at- gmail -dot- com)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jeffleary00/amoshell/tarball/0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jeffleary00/amoshell", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "amoshell", "package_url": "https://pypi.org/project/amoshell/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/amoshell/", "project_urls": { "Download": "https://github.com/jeffleary00/amoshell/tarball/0.1", "Homepage": "https://github.com/jeffleary00/amoshell" }, "release_url": "https://pypi.org/project/amoshell/0.1/", "requires_dist": null, "requires_python": null, "summary": "Python interface to Ericsson's amos/moshell programs", "version": "0.1" }, "last_serial": 2555942, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3f83b17d894ca9e16531013eb97131cc", "sha256": "8067efcb149fee63a01e0270d95c02d86074540dab95444f1f59d4d4bc32ab0f" }, "downloads": -1, "filename": "amoshell-0.1.tar.gz", "has_sig": false, "md5_digest": "3f83b17d894ca9e16531013eb97131cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5196, "upload_time": "2017-01-05T15:58:05", "url": "https://files.pythonhosted.org/packages/2b/35/80cc89d9e4981baf24c4359f89f8243c7998e6644be822cbc56d881c1f2a/amoshell-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f83b17d894ca9e16531013eb97131cc", "sha256": "8067efcb149fee63a01e0270d95c02d86074540dab95444f1f59d4d4bc32ab0f" }, "downloads": -1, "filename": "amoshell-0.1.tar.gz", "has_sig": false, "md5_digest": "3f83b17d894ca9e16531013eb97131cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5196, "upload_time": "2017-01-05T15:58:05", "url": "https://files.pythonhosted.org/packages/2b/35/80cc89d9e4981baf24c4359f89f8243c7998e6644be822cbc56d881c1f2a/amoshell-0.1.tar.gz" } ] }