{ "info": { "author": "Raphael Ritz", "author_email": "raphael.ritz@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Topic :: Utilities" ], "description": "=======================\neudat.accounting.client\n=======================\n\nUpload accounting records to an eudat accounting server\n\nAdministrators of (storage) resources provided through the EUDAT Common Data \nInfrastructure can use this tool to conveniently report current resource \nconsumption per registered resource. Accounting records are submitted per\nindividual resource identified by its (P)ID which is available as soon as\nthe resource has been registered at EUDAT's Data Project Management Tool (DPMT_).\n\nDefault settings are such that only the resource id and the consumed value \nneed to be provided. The default unit is ``byte`` and the default resource \ntype is set to ``storage``.\nThe full documentation of options supported is described in the next section.\n\nIf the tools provided here do not address your use case you can either file\na feature request on the tracker_ or use a more low-level approach as \noutlined in the `server documentation`_.\n\n.. _DPMT: https://dp.eudat.eu\n.. _tracker: https://github.com/EUDAT-DPMT/eudat.accounting.client/issues\n.. _`server documentation`: https://github.com/EUDAT-DPMT/eudat.accounting.server/blob/master/README.rst#adding-records\n\n\nFull documentation and API\n==========================\n\nInstallation\n------------\n\nThe easiest way to install the tool is via ``pip`` or ``easy_install``.\nIt is usually best to do this in a ``virtualenv``:\n\n.. code:: console\n\n $ pip install eudat.accounting.client\n\nCommand line interface\n----------------------\n\nAs a result of the above there are now two console script called \n``addRecord`` and ``iRODScollector``.\nInvoke it with ``-h`` to see its usage pattern and options.\n\naddRecord\n~~~~~~~~~\n\n.. code:: console\n\n $ bin/addRecord -h\n usage: addRecord [-h] [--version] [-b BASE_URL] [-u USER] [-p PASSWORD]\n [-d DOMAIN] [-s SERVICE] [-n NUMBER] [-o OBJECT_TYPE]\n [-k KEY] [-T TYPE] [-m MEASURE_TIME] [-C COMMENT] [-t] [-v]\n account value [unit]\n\n positional arguments:\n account account to be used. Typically the (P)ID of the\n resource to be accounted\n value The value to be recorded\n unit The unit of measurement for the value provided.\n Default: \"byte\"\n\n optional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -b BASE_URL, --base_url BASE_URL\n base URL of the accounting server to use. Default:\n https://accounting.eudat.eu\n -u USER, --user USER user id used for logging into the server. If not\n provided it is looked up in the environment variable\n \"ACCOUNTING_USER\". Default: \"\" - aka not set\n -p PASSWORD, --password PASSWORD\n password used for logging into the server. If not\n provided it is looked up in the environment variable\n \"ACCOUNTING_PW\". Default: \"\" - aka not set\n -d DOMAIN, --domain DOMAIN\n name of the domain holding the account. Default: eudat\n -s SERVICE, --service SERVICE\n UID (or PID) of the registered service component\n reporting the record. Default: \"\" - not set\n -n NUMBER, --number NUMBER\n number of objects associated with this accounting\n record. This is EUDAT specific. Default: \"\" - not set\n -o OBJECT_TYPE, --object_type OBJECT_TYPE\n object type for the number of objects specified with\n \"-n\". This is EUDAT specific. Default: \"registered\n objects\"\n -k KEY, --key KEY key used to refer to the record. If not set the\n accounting server will create the key. Specifying an\n existing key will overwrite the existing record.\n Default: \"\" - not set\n -T TYPE, --type TYPE type of the resource accounted. Default: storage\n -m MEASURE_TIME, --measure_time MEASURE_TIME\n measurement time of the accounting record if different\n from the current time. Default: \"\" - not set\n -C COMMENT, --comment COMMENT\n arbitrary comment (goes into the meta dictionary).\n Default: \"\" - not set\n -t, --test Dry run. Don't push data to server - run only locally\n Default: off\n -v, --verbose return the key of the accounting record created.\n Default: off\n\n\niRODScollector\n~~~~~~~~~~~~~~\n\n.. code:: console\n\n $ bin/iRODScollector -h\n usage: iRODScollector [-h] [--version] [-c CONFIGPATH] [-k KEY] [-T TYPE]\n [-m MEASURE_TIME] [-C COMMENT] [-t] [-v]\n\n optional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -c CONFIGPATH, --configpath CONFIGPATH\n path to configuration file. Default:\n \"./irodscollector.cfg\" (in the current working\n directory)\n -k KEY, --key KEY key used to refer to the record. If not set the\n accounting server will create the key. Specifying an\n existing key will overwrite the existing record.\n Default: \"\" - not set\n -T TYPE, --type TYPE type of the resource accounted. Default: storage\n -m MEASURE_TIME, --measure_time MEASURE_TIME\n measurement time of the accounting record if different\n from the current time. Default: \"\" - not set\n -C COMMENT, --comment COMMENT\n arbitrary comment (goes into the meta dictionary).\n Default: \"\" - not set\n -t, --test Dry run. Don't push data to server - run only locally\n Default: off\n -v, --verbose return the key of the accounting record created.\n Default: off\n\nA template configuration file is included in the distribution and \nlooks like this:\n\n.. code:: console\n\n $ cat irodscollector.ini\n\n #\n # template of a configuration file for EUDAT's irodscollector\n #\n\n # section containing the logging options\n [Logging]\n log_file=eudatacct.log\n\n # section containing the properties to access the accounting server\n # to get statistical data and report them\n [Report]\n # base URL of the accounting server to be used\n base_url=https://accounting.eudat.eu\n # domain: either eudat or test or demo\n domain=eudat\n # uid of the corresponding registered storage resource on DPMT \n # (same as storage_space_uuid on RCT)\n account=\n # username of the provider on the accouniting server\n # owning the account specified above\n # contact dp-admin@mpcdf.mpg.de if you need one\n user=\n # if you have an access token from RCT already reuse that here\n password=\n service_uuid=\n\n # section contains the list of collections to be accounted together, replace\n # the examples with your collections, the script sums the values of all\n # collections and sends it to EUDAT's accounting service.\n [Collections]\n clist=\n /zone/some/path\n /zone/other/path\n\nCopy this to ``irodscollector.cfg`` and adapt it to your site.\n \nMost of this should be self-explaining. Note that you need to \nprovide credentails for the accounting service. If you do not \nhave any contact the EUDAT accounting manager.\n\nIn addition, you need to make sure that the user invoking \nthis script has a suitable iRODS_ environment set up.\n\nBasic usage information as well as error messages are logged \nto a file named ``.accounting.log`` in the current working \ndirectory from where ``addRecord`` has been invoked.\n\n.. _iRODS: https://irods.org/\n\n\nDeveloper notes\n===============\n\nPlease use a ``virtualenv`` to maintain this package, but I should not need to say that.\n\nThe package can be installed directly from GitHub:\n\n.. code:: console\n\n $ pip install git+git://github.com/EUDAT-DPMT/eudat.accounting.client\n\nThe code is organized in a nested namespace package, i.e., the real action\nis happening in the subdirectory \n\n.. code:: console\n\n $ cd src/eudat/accounting/client\n \nStart looking around there.\n\nRun the tests (not really that meaningful so far):\n\n.. code:: console\n\n $ python setup.py test\n $ python run_tests.py\n\n\nAuthors\n=======\n\n - Raphael Ritz, MPCDF (main author)\n\n - Claudio Cacciari, CINECA (initial iRODScollector)\n\n - Pavel Weber, KIT (improved iRODScollector)\n\n\nLinks\n=====\n\nProject home page\n\n https://github.com/EUDAT-DPMT/eudat.accounting.client\n\nSource code\n\n https://github.com/EUDAT-DPMT/eudat.accounting.client\n\nIssues tracker\n\n https://github.com/EUDAT-DPMT/eudat.accounting.client/issues\n\n1.0.1 (2017-08-25)\n------------------\n\n- addRecord now also supports the dry run option '-t' \n This addresses issue #3 [raphael-ritz]\n\n\n1.0.0 (2017-03-15)\n------------------\n\n- Adding iRODScollector based on Claudio's and Pavel's work [raphael-ritz]\n\n- Python 3 compatibility [raphael-ritz]\n\n\n1.0.0rc1 (2016-07-22)\n---------------------\n\n* Initial release [raphael-ritz]", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/raphael-ritz/eudat.accounting.client", "keywords": "EUDAT", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "eudat.accounting.client", "package_url": "https://pypi.org/project/eudat.accounting.client/", "platform": "", "project_url": "https://pypi.org/project/eudat.accounting.client/", "project_urls": { "Homepage": "https://github.com/raphael-ritz/eudat.accounting.client" }, "release_url": "https://pypi.org/project/eudat.accounting.client/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Upload accounting records to an eudat accounting server", "version": "1.0.1" }, "last_serial": 3122958, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4da75dda11761c6c0c4714ac5974b92e", "sha256": "0dac9a6434e7661f83d4a6c9a524d552421e0d8d5cc59eb11f89af421c01af7c" }, "downloads": -1, "filename": "eudat.accounting.client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4da75dda11761c6c0c4714ac5974b92e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14220, "upload_time": "2017-03-15T15:07:47", "url": "https://files.pythonhosted.org/packages/4e/31/25dff3c79965720999a6e51333f178aefd262a54249ed35b4493ed72c2d4/eudat.accounting.client-1.0.0.tar.gz" } ], "1.0.0rc1": [ { "comment_text": "", "digests": { "md5": "88241b2780da9b48bae13fe8b615b4bb", "sha256": "d61afafbea7e757b66b59b5549b48cbe6dd863f61241bafaf924e8ea5004fd70" }, "downloads": -1, "filename": "eudat.accounting.client-1.0.0rc1.tar.gz", "has_sig": false, "md5_digest": "88241b2780da9b48bae13fe8b615b4bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8585, "upload_time": "2016-07-22T09:51:45", "url": "https://files.pythonhosted.org/packages/fb/22/9c7913abf227a7e18a87c5119ea38462ed50525765e43a10fc19fdad98be/eudat.accounting.client-1.0.0rc1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "383b5358e674eecab0ca73b91e7f946a", "sha256": "1214ab1106b0928ffdbbba9c13cc46bfb6adad0f7cb932e67ff99770b475f94b" }, "downloads": -1, "filename": "eudat.accounting.client-1.0.1.tar.gz", "has_sig": false, "md5_digest": "383b5358e674eecab0ca73b91e7f946a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14476, "upload_time": "2017-08-25T12:32:22", "url": "https://files.pythonhosted.org/packages/54/e9/815414be33c94e76ce71ba8e614442ab3666df235f38c470970a55a77799/eudat.accounting.client-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "383b5358e674eecab0ca73b91e7f946a", "sha256": "1214ab1106b0928ffdbbba9c13cc46bfb6adad0f7cb932e67ff99770b475f94b" }, "downloads": -1, "filename": "eudat.accounting.client-1.0.1.tar.gz", "has_sig": false, "md5_digest": "383b5358e674eecab0ca73b91e7f946a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14476, "upload_time": "2017-08-25T12:32:22", "url": "https://files.pythonhosted.org/packages/54/e9/815414be33c94e76ce71ba8e614442ab3666df235f38c470970a55a77799/eudat.accounting.client-1.0.1.tar.gz" } ] }