{ "info": { "author": "Trelay Wang", "author_email": "trelwan@celestica.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Build Tools" ], "description": "CRTT\n====\n\nOnly Python3 is supported.\n\nCRTT is shortened for Common [RESTful] Test Tool; it can be used in following occasions:\n\n* Test the reliability of RESTful server \n* Find unknown issue\n* Stress test for RESTful server \n* Key String matching\n\n\n\nSupport\n-------\n* This tool is intended to support all kinds of RESTful server, from Redfish to...\n\nVersion\n-------\n\n0.8.1\n\nInstallation\n------------\nInstall with pip3::\n\n pip3 install CRTT\n\nQuick Start\n-----------\n.. code-block:: python\n\n from CRTT.get_nodes import GET_NODE\n get_node=GET_NODE(host, client_app_ver, port)\n get_node.scan_node()\n\nOr use build-in sample::\n\n `./test.py `_\n\n\nArguments & CLI options:\n------------------------\n\n* --help: Print help message and exit\n* --config-dir: Path to a config directory to pull \\*.conf files from.\n* --config-file: Path to a config file to use. Multiple config files can be specified, with values in later files taking precedence.\n* --CLI-comp_file: The url response data comparing file\n* --CLI-cycles: How many times we scan the nodes\n* --CLI-time_to_stop: CLI_TIME_TO_STOP: If both this option and --CLI-cycles are set, the one which comes first will take effect.\n* --CLI-retry: How many times retries after failure\n\nResponse check from URL:\n------------------------\n\nThe conf file for checking response from URL is defined in file `value_check.conf `_ by default, but you can also define it when run CLI, refer the help::\n\n\n [MemoryModule]\t#The name of current url, can be found by key \"Name\"\n\n SizeGB= 16\t\t#The size of memory of current url\n\n VoltageVolt= 1.21 < 1.30 < x < 1.40 < 1.51\t\t#The threshold check format, it should have LowerThresholdFatal, LowerThresholdWarning, UpperThresholdWarning, UpperThresholdCritical\n\n\nIf the node_name or the check_key is not defined properly, it won't check without any warning.\n\nFor Advanced user:\n------------------\n\nThis application provides a config file to let user customize, modify. One can change the setting in file `CRTT.conf `_, here is the help for this document::\n\n [REST]\n\n root_node='http://10.204.29.243:8888/redfish/v1/Chassis/Defaultstring/Thermal'\n #Noen by default, This one will take effect of rest of this section.\n client_name=redfish #The name of the RESTful client application.\n host=10.204.29.244 #The IP of this RESTful server \n bind_port = 8888 #The port of the RESTful service.\n ver_support = 1 #The ver list of the RESTful client application.\n client_app_ver=1 #The ver of this RESTful client app\n subnode_keys= '@odata.id'\t# All sub nodes should be found in a dict, and this defines the key to find sub nodes\n\n \n\n [MAIN]\n\n value_file=Red_lib/product/url_dict.conf #This file is used to check the\n #response(response is in JSON format) from RESTful server .\n cycle=20 #How many cycles to scan all the nodes\n processes =4\t\t\t#How many of processes in this running host\n\n [LOG]\n app_name='redfish_test' #The log channel name\n logfilename='redfish.html' #The file name to save html log file\n log_format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s'\n root_level=10 #The root log level\n ch_level=10 #The log level for console stream logging\n fh_level=20 #The log level for html file stream logging\n html_color=color_2 #How we display the msg in the html file, it has options, choose one from below dict.\n color_1=err_color: red, warn_color: yellow, info_color: white, dbg_color: white\n color_2=err_color: red, warn_color: orange, info_color: white, dbg_color:blue\n\n Keyword_Italic=True #The setting of keyword in html log\n Keyword_FontSize=3 #The setting of keyword in html log\n Keyword_tag_start=\"\" #The setting of keyword in html log\n Keyword_tag_end=\"\" #The setting of keyword in html log\n title=Red fish log #The tile for html log\n console_log=True #Display log to console?\n HtmlmaxBytes=52428800 # You can specify particular values of maxBytes and backupCount to allow the \n #file to rollover at predetermined size if rotating is set to True, otherwise\n #rotate file without backCount limited.\n Html_backupCount=5\n Html_Rotating=True\n\n [REQUEST]\n http_time_warn=0.5 #Setting of response time from RESTful server \n http_time_error=1.2 #Setting of response time from RESTful server \n timeout=3 #The max time(second) to get response from RESTful server \n retries=4 #How many times to retry if error occurs\n delay=1.5 #Time delay during a next retry if error occurs\n backoff=2 #backoff of delay\n failonerror=False #Stop test if fail still occurs if retries.\n\n\nModules defined:\n----------------\n\n|\n\n`[get_nodes.py] `_: \n\nThis file contains classes and functions: GEN_URL, GET_NODE, URL_REQUEST and Responses check:\n\nGEN_URL: This class is to build complete URL. \n\nA complete URL to interact with RESTful server is like this: :\n\n http://10.204.29.221:8888/redfish/v1/Managers/1\n\nhere is example to use::\n\n url=GEN_URL('10.204.29.221')\n gen_url=GEN_URL('10.204.29.221')\n url=gen_url.get_url('/redfish/v1/Managers/1')\n\nGET_NODE: Scan and find all the child nodes from root(is node_path=None) or any node that is defined in function \"scan_node\", and put them into a list, during this scanning and searching, one can compare the value returned from RESTful server . url_list contains all the urls after scanning.\n\nURL_REQUEST: Send Request to RESTful server, generally, the request should be one of GET, PUT, POST, DELETE. This class can handle all http errors. Example::\n\n url_request=URL_REQUEST('http://10.204.29.221:8888/redfish/v1/Managers/1',username,password)\n url_request.get_req(value) #Value: a python dict\n\nReponse_check: It has two functions: 1. Check the response from RESTful server which defined in file [url_dict.conf] 2. Check if request time exceeds the limit.\n\n|\n\n`[retry.py] `_:\n\nThis file is an independent module, it's a decorator and used to retry a function in a particular error occurs.\nretry calling the decorated function using an exponential backoff. Example:\n\n.. code-block:: python\n\n @retry(ExceptionToCheck=ValueError, tries=3, delay=1, backoff=1,stoponerror=False, logger=None)\n def foo():\n try:\n raise ValueError\n except ValueError as ve:\n raise\n\n**Free Software, Hell Yeah!**\n\n.. (Contact trelwan@celestica.com if you have any questions.)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/trelay/CRTT/tarball/0.8.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/trelay/CRTT", "keywords": "restful test tool", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "CRTT", "package_url": "https://pypi.org/project/CRTT/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/CRTT/", "project_urls": { "Download": "https://github.com/trelay/CRTT/tarball/0.8.1", "Homepage": "https://github.com/trelay/CRTT" }, "release_url": "https://pypi.org/project/CRTT/0.8.1/", "requires_dist": null, "requires_python": null, "summary": "Common Restful Test Tool", "version": "0.8.1" }, "last_serial": 2301676, "releases": { "0.8": [ { "comment_text": "", "digests": { "md5": "bdc35717585505f32111a1ff04507328", "sha256": "d9282ca7c6d17c8b0d45f5c3c08b042efbaad2310f7517d4ec91bd9c9e617e56" }, "downloads": -1, "filename": "CRTT-0.8.tar.gz", "has_sig": false, "md5_digest": "bdc35717585505f32111a1ff04507328", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15204, "upload_time": "2016-08-23T06:44:16", "url": "https://files.pythonhosted.org/packages/0a/dc/361ca2986597bb37318f0914ace4cd51b4df8deca399de43f30ef6cabfdc/CRTT-0.8.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "4892fa28c58ae1c65299535f5a26f6bc", "sha256": "d56a04c9a94e65c10566298bdca51fdcbb8c5b2ebe3fe3be295a7245a3e26fac" }, "downloads": -1, "filename": "CRTT-0.8.1.tar.gz", "has_sig": false, "md5_digest": "4892fa28c58ae1c65299535f5a26f6bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17535, "upload_time": "2016-08-25T03:39:14", "url": "https://files.pythonhosted.org/packages/a5/bb/de16e38b05cd0143ffa9a161fbc42458336f0d0cba9620fcb8ad9dd6357f/CRTT-0.8.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4892fa28c58ae1c65299535f5a26f6bc", "sha256": "d56a04c9a94e65c10566298bdca51fdcbb8c5b2ebe3fe3be295a7245a3e26fac" }, "downloads": -1, "filename": "CRTT-0.8.1.tar.gz", "has_sig": false, "md5_digest": "4892fa28c58ae1c65299535f5a26f6bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17535, "upload_time": "2016-08-25T03:39:14", "url": "https://files.pythonhosted.org/packages/a5/bb/de16e38b05cd0143ffa9a161fbc42458336f0d0cba9620fcb8ad9dd6357f/CRTT-0.8.1.tar.gz" } ] }